-vvv option).
I can't seem to add a mypyls dependency in any way to pyproject.toml. The project lives here: https://github.com/matangover/mypyls and it's usually installed via:
pip install "https://github.com/matangover/mypyls/archive/master.zip#egg=mypyls[default-mypy]"
The following things don't work:
poetry add https://github.com/matangover/mypyls/archive/master.zip due toTraceback (most recent call last):
File "/home/viraptor/.local/lib/python3.7/site-packages/clikit/console_application.py", line 131, in run
status_code = command.handle(parsed_args, io)
File "/home/viraptor/.local/lib/python3.7/site-packages/clikit/api/command/command.py", line 120, in handle
status_code = self._do_handle(args, io)
File "/home/viraptor/.local/lib/python3.7/site-packages/clikit/api/command/command.py", line 171, in _do_handle
return getattr(handler, handler_method)(args, io, self)
File "/home/viraptor/.local/lib/python3.7/site-packages/cleo/commands/command.py", line 92, in wrap_handle
return self.handle()
File "/home/viraptor/.local/lib/python3.7/site-packages/poetry/console/commands/add.py", line 89, in handle
packages, allow_prereleases=self.option('allow-prereleases')
File "/home/viraptor/.local/lib/python3.7/site-packages/poetry/console/commands/init.py", line 293, in _determine_requirements
requires = self._parse_requirements(requires)
File "/home/viraptor/.local/lib/python3.7/site-packages/poetry/console/commands/init.py", line 388, in _parse_requirements
package = Provider.get_package_from_url(requirement)
File "/home/viraptor/.local/lib/python3.7/site-packages/poetry/puzzle/provider.py", line 466, in get_package_from_url
package = cls.get_package_from_file(temp_dir / file_name)
File "/home/viraptor/.local/lib/python3.7/site-packages/poetry/puzzle/provider.py", line 249, in get_package_from_file
package = Package(info['name'], info['version'])
File "/home/viraptor/.local/lib/python3.7/site-packages/poetry/packages/package.py", line 46, in __init__
self._version = Version.parse(version)
File "/home/viraptor/.local/lib/python3.7/site-packages/poetry/semver/version.py", line 206, in parse
raise ParseVersionError('Unable to parse "{}".'.format(text))
mypyls = {url = "https://github.com/matangover/mypyls/archive/master.zip", extras = ["default-mypy"]}
mypyls = {git = "https://github.com/matangover/mypyls.git", extras = ["default-mypy"]}
due to poetry update mypyls showing:
[SolverProblemError]
Because foobar depends on mypyls (*) which doesn't exist, version solving failed.
For the url dependnecy, the root cause here is because we end up falling back to AST parser for setup.py since the sdist does not containe distrition information. The since the version is populated dynamically, we end up not being able to retirve this information.
https://github.com/matangover/mypyls/blob/616d66257eda8f4b7fc5115260e15f41358852b6/setup.py#L12
As for the git dependency, the issue is the parsing of the direct referene dependencies. At the moment, poetry do not understand understand these. But this should be resolved with (python-poetry/core#22).
https://github.com/matangover/mypyls/blob/616d66257eda8f4b7fc5115260e15f41358852b6/setup.py#L31
As for what we could do to improve this situation;
Most helpful comment
For the
urldependnecy, the root cause here is because we end up falling back to AST parser forsetup.pysince the sdist does not containe distrition information. The since the version is populated dynamically, we end up not being able to retirve this information.https://github.com/matangover/mypyls/blob/616d66257eda8f4b7fc5115260e15f41358852b6/setup.py#L12
As for the git dependency, the issue is the parsing of the direct referene dependencies. At the moment, poetry do not understand understand these. But this should be resolved with (python-poetry/core#22).
https://github.com/matangover/mypyls/blob/616d66257eda8f4b7fc5115260e15f41358852b6/setup.py#L31
As for what we could do to improve this situation;