Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal for CodeChange #2

Open
mmenkhof opened this issue Oct 26, 2014 · 1 comment
Open

Proposal for CodeChange #2

mmenkhof opened this issue Oct 26, 2014 · 1 comment
Assignees

Comments

@mmenkhof
Copy link

Dear Adam,

please be so kind and change in hooks.py the sub-routine:
def pip_install(packages=None, upgrade=False):
# Build in /tmp or Juju's internal git will be confused
cmd_line = ['pip', 'install', '--src', '/usr/src/']
if packages is None:
return(False)
if upgrade:
cmd_line.append('--upgrade')
if not isinstance(packages, list):
packages = [packages]

for package in packages:
    if package.startswith('svn+') or package.startswith('git+') or package.startswith('hg+') or package.startswith('bzr+'):
        cmd_line.append('-e')
    cmd_line.append(package)

# cmd_line.append('--use-mirrors')
return(subprocess.call(cmd_line))

your current script is not working because you have used for the if statements new lines in "packages for packages" which is not working in python.

@AdamIsrael AdamIsrael self-assigned this Oct 31, 2014
@AdamIsrael
Copy link
Owner

Hello,

What errors are you seeing with that line? I recently changed it, in order to satisfy lint, and I haven't had any problems with it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants