Commit 970193fb by Sébastien Eustace

Add support for space-separated extras in commands

parent 783fb9a5
......@@ -98,6 +98,13 @@ If you do not specify a version constraint, poetry will choose a suitable one ba
constraint['allows-prereleases'] = True
if self.option('extras'):
extras = []
for extra in self.option('extras'):
if ' ' in extra:
extras += [e.strip() for e in extra.split(' ')]
else:
extras.append(extra)
constraint['extras'] = self.option('extras')
if self.option('python'):
......
......@@ -41,7 +41,14 @@ class DebugResolveCommand(Command):
dependencies = []
for name, constraint in requirements.items():
dep = Dependency(name, constraint)
for ex in self.option('extras'):
extras = []
for extra in self.option('extras'):
if ' ' in extra:
extras += [e.strip() for e in extra.split(' ')]
else:
extras.append(extra)
for ex in extras:
dep.extras.append(ex)
dependencies.append(dep)
......
......@@ -36,7 +36,14 @@ exist it will look for <comment>pyproject.toml</> and do the same.
self.poetry.pool
)
installer.extras(self.option('extras'))
extras = []
for extra in self.option('extras'):
if ' ' in extra:
extras += [e.strip() for e in extra.split(' ')]
else:
extras.append(extra)
installer.extras(extras)
installer.dev_mode(not self.option('no-dev'))
installer.develop(self.option('develop'))
installer.dry_run(self.option('dry-run'))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment