Commit 007c0767 by Sébastien Eustace

Fix handling of extras when building projects

parent 5ac97944
......@@ -19,6 +19,7 @@
- Fixed handling of extras when resolving dependencies.
- Fixed `self:update` command for some installation.
- Fixed handling of extras when building projects.
## [0.8.6] - 2018-04-30
......
......@@ -122,6 +122,9 @@ class Dependency(object):
def to_pep_508(self, with_extras=True): # type: (bool) -> str
requirement = self.pretty_name
if self.extras:
requirement += '[{}]'.format(','.join(self.extras))
if isinstance(self.constraint, MultiConstraint):
requirement += ' ({})'.format(','.join(
[str(c).replace(' ', '') for c in self.constraint.constraints]
......
......@@ -24,6 +24,7 @@ classifiers = [
[tool.poetry.dependencies]
python = "^3.6"
cleo = "^0.6"
cachy = { version = "^0.2.0", extras = ["msgpack"] }
pendulum = { version = "^1.4", optional = true }
......
......@@ -122,6 +122,7 @@ Classifier: Programming Language :: Python :: 3.7
Classifier: Topic :: Software Development :: Build Tools
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Provides-Extra: time
Requires-Dist: cachy[msgpack] (>=0.2.0.0,<0.3.0.0)
Requires-Dist: cleo (>=0.6.0.0,<0.7.0.0)
Requires-Dist: pendulum (>=1.4.0.0,<2.0.0.0); extra == "time"
Description-Content-Type: text/x-rst
......
......@@ -131,7 +131,8 @@ def test_make_setup():
'my_package.sub_pkg2'
]
assert ns['install_requires'] == [
'cleo>=0.6.0.0,<0.7.0.0'
'cleo>=0.6.0.0,<0.7.0.0',
'cachy[msgpack]>=0.2.0.0,<0.3.0.0',
]
assert ns['entry_points'] == {
'console_scripts': [
......
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