import subprocess

def download(packages, index_url, additional_args = None):
    additional_args = [] if additional_args is None else additional_args
    subprocess.check_call(["pip", "install"] + packages + ["-i", index_url] + additional_args)

def upload(repository, additional_args = None):
    additional_args = [] if additional_args is None else additional_args
    subprocess.check_call(["python", "setup.py", "register", "-r", repository, "sdist", "upload", "-r", repository] + additional_args)

import subprocess

def download(packages, index_url, additional_args = None):
    additional_args = [] if additional_args is None else additional_args
    subprocess.check_call(["pip", "install"] + packages + ["--extra-index-url", index_url] + additional_args)

def upload(repository, additional_args = None):
    additional_args = [] if additional_args is None else additional_args
    subprocess.check_call(["python", "setup.py", "register", "-r", repository, "sdist", "upload", "-r", repository] + additional_args)

Change to use --extra-index-url instead
Change to use --extra-index-url instead

  import subprocess
  
  def download(packages, index_url, additional_args = None):
      additional_args = [] if additional_args is None else additional_args
-     subprocess.check_call(["pip", "install"] + packages + ["-i", index_url] + additional_args)
+     subprocess.check_call(["pip", "install"] + packages + ["--extra-index-url", index_url] + additional_args)
  
  def upload(repository, additional_args = None):
      additional_args = [] if additional_args is None else additional_args
      subprocess.check_call(["python", "setup.py", "register", "-r", repository, "sdist", "upload", "-r", repository] + additional_args)
  
Change to use --extra-index-url instead
## Code Before:
import subprocess

def download(packages, index_url, additional_args = None):
    additional_args = [] if additional_args is None else additional_args
    subprocess.check_call(["pip", "install"] + packages + ["-i", index_url] + additional_args)

def upload(repository, additional_args = None):
    additional_args = [] if additional_args is None else additional_args
    subprocess.check_call(["python", "setup.py", "register", "-r", repository, "sdist", "upload", "-r", repository] + additional_args)

## Instruction:
Change to use --extra-index-url instead
## Code After:
import subprocess

def download(packages, index_url, additional_args = None):
    additional_args = [] if additional_args is None else additional_args
    subprocess.check_call(["pip", "install"] + packages + ["--extra-index-url", index_url] + additional_args)

def upload(repository, additional_args = None):
    additional_args = [] if additional_args is None else additional_args
    subprocess.check_call(["python", "setup.py", "register", "-r", repository, "sdist", "upload", "-r", repository] + additional_args)
