Nirmal Patel 1 week ago committed by GitHub
commit d60caba663
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -0,0 +1,4 @@
bugfixes:
- pip - when editable set to true, '-e' flag is passed before each package.
When requirments file is used, editable flag does not pass '-e' to avoid
errors.

@ -757,7 +757,11 @@ def main():
break_system_packages=dict(type='bool', default=False),
),
required_one_of=[['name', 'requirements']],
mutually_exclusive=[['name', 'requirements'], ['executable', 'virtualenv']],
mutually_exclusive=[
['name', 'requirements'],
['executable', 'virtualenv'],
['editable', 'requirements'],
],
supports_check_mode=True,
)
@ -773,6 +777,7 @@ def main():
chdir = module.params['chdir']
umask = module.params['umask']
env = module.params['virtualenv']
editable = module.params['editable']
venv_created = False
if env and chdir:
@ -848,15 +853,6 @@ def main():
# if the version specifier is provided by version, append that into the package
packages[0] = Package(to_native(packages[0]), version)
if module.params['editable']:
args_list = [] # used if extra_args is not used at all
if extra_args:
args_list = extra_args.split(' ')
if '-e' not in args_list:
args_list.append('-e')
# Ok, we will reconstruct the option string
extra_args = ' '.join(args_list)
if extra_args:
cmd.extend(shlex.split(extra_args))
@ -866,7 +862,10 @@ def main():
os.environ['PIP_BREAK_SYSTEM_PACKAGES'] = '1'
if name:
cmd.extend(to_native(p) for p in packages)
for p in packages:
if editable:
cmd.append('-e')
cmd.append(to_native(p))
elif requirements:
cmd.extend(['-r', requirements])
elif venv_created and not name and not requirements:

Loading…
Cancel
Save