Issue
The bug is: poetry requires the parameter (package name), which is not needed and another value is not accepted.
The origin point, clean virtualenv, the project just created with new command, python requirement is changed to "^3.6":
(venv) ~/t/p/mnist ❯❯❯ ll
drwxr-xr-x - nick 19 Nov 20:19 mnist
.rw-r--r-- 284 nick 19 Nov 20:19 pyproject.toml
.rw-r--r-- 0 nick 19 Nov 20:19 README.rst
drwxr-xr-x - nick 19 Nov 20:19 tests
- If I omit the parameter => I got the complain, that there is no parameter
(venv) ~/t/p/mnist ❯❯❯ poetry add --path ../tensorflow-1.12.0-cp36-cp36m-linux_x86_64.whl
[MissingArguments]
Not enough arguments
- If I set the parameter to my own name
my_tf => I got the complain, that the parameter has wrong value
(venv) ~/t/p/mnist ❯❯❯ poetry add my_tf --path ../tensorflow-1.12.0-cp36-cp36m-linux_x86_64.whl
Updating dependencies
Resolving dependencies... (1.4s)
[RuntimeError]
The dependency name for my-tf does not match the actual package's name: tensorflow
- If I set the parameter to the one, that encoded inside the wheel, the command succeeds:
(venv) ~/t/p/mnist ❯❯❯ poetry add tensorflow --path ../tensorflow-1.12.0-cp36-cp36m-linux_x86_64.whl
Updating dependencies
Resolving dependencies... (4.5s)
Package operations: 24 installs, 0 updates, 0 removals
Writing lock file
- Installing enum34 (1.1.6)
- Installing futures (3.1.1)
- Installing numpy (1.15.4)
...
- Installing tensorflow (1.12.0 ../tensorflow-1.12.0-cp36-cp36m-linux_x86_64.whl)
(venv) ~/t/p/mnist ❯❯❯
1, 2 and 3 above seems to be contradictory. I'd expect the following one of the behaviors:
poetry add should deduce the package name from the wheel; or
poetry add should allow to add the package with the different name, that is passed as the parameter
I'm pretty sure it is valid with any wheel, I just used the one from https://github.com/tensorflow/tensorflow/releases
Thanks.
I am on the latest Poetry version.
I have searched the issues of this repo and believe that this is not a duplicate.
If an exception occurs when executing a command, I executed it again in debug mode (
-vvvoption).OS version and name: Ubuntu 18.04
Poetry version: 0.12.8
Link of a Gist with the contents of your pyproject.toml file: https://gist.github.com/nlinker/130181762f02e087e707e08c6f7b81ec
Issue
The bug is: poetry requires the parameter (package name), which is not needed and another value is not accepted.
The origin point, clean virtualenv, the project just created with
newcommand, python requirement is changed to"^3.6":my_tf=> I got the complain, that the parameter has wrong value1, 2 and 3 above seems to be contradictory. I'd expect the following one of the behaviors:
poetry addshould deduce the package name from the wheel; orpoetry addshould allow to add the package with the different name, that is passed as the parameterI'm pretty sure it is valid with any wheel, I just used the one from https://github.com/tensorflow/tensorflow/releases
Thanks.