Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsitent requirements on the package name parameters for add #646

Closed
3 tasks done
nlinker opened this issue Nov 19, 2018 · 3 comments
Closed
3 tasks done

Inconsitent requirements on the package name parameters for add #646

nlinker opened this issue Nov 19, 2018 · 3 comments

Comments

@nlinker
Copy link

nlinker commented Nov 19, 2018

  • 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 (-vvv option).

  • 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 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
  1. 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
  1. 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  
  1. 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.

@SpatialDisorder
Copy link

Just wanted to confirm I am also having this issue trying to install several different wheels (Shapely, Fiona, GDAL).


C:\Users\jwalters\Desktop
λ poetry --version
Poetry 0.12.11

C:\Users\jwalters\Desktop
λ poetry new geopandas-test
Created package geopandas-test in geopandas-test

C:\Users\jwalters\Desktop
λ cd geopandas-test\

C:\Users\jwalters\Desktop\geopandas-test
λ poetry add Shapely --path ..\Shapely-1.6.4.post1-cp37-cp37m-win_amd64.whl
Creating virtualenv geopandas-test-py3.7 in C:\Users\jwalters\Desktop\geopandas-test\.venv

Updating dependencies
Resolving dependencies... (0.1s)

[RuntimeError]
The dependency name for shapely does not match the actual package's name: Shapely

add [-D|--dev] [--git GIT] [--path PATH] [-E|--extras EXTRAS] [--optional] [--python PYTHON] [--platform PLATFORM] [--allow-prereleases] [--dry-run] [--] <name> (<name>)...


C:\Users\jwalters\Desktop\geopandas-test
λ poetry add shapely --path ..\Shapely-1.6.4.post1-cp37-cp37m-win_amd64.whl

Updating dependencies
Resolving dependencies... (0.0s)

[RuntimeError]
The dependency name for shapely does not match the actual package's name: Shapely

add [-D|--dev] [--git GIT] [--path PATH] [-E|--extras EXTRAS] [--optional] [--python PYTHON] [--platform PLATFORM] [--allow-prereleases] [--dry-run] [--] <name> (<name>)...


C:\Users\jwalters\Desktop\geopandas-test
λ

Everything in the wheel metadata is showing "Shapely":

Metadata-Version: 2.0
Name: Shapely
Version: 1.6.4.post1
Summary: Geometric objects, predicates, and operations
Home-page: https://github.com/Toblerity/Shapely
Author: Sean Gillies
Author-email: [email protected]
License: BSD
Description-Content-Type: UNKNOWN
Keywords: geometry topology gis
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering :: GIS
Requires: Python (>=2.6)
Requires: libgeos_c (>=3.3)
Provides-Extra: all
Requires-Dist: pytest; extra == 'all'
Requires-Dist: pytest-cov; extra == 'all'
Requires-Dist: numpy; extra == 'all'
Provides-Extra: test
Requires-Dist: pytest; extra == 'test'
Requires-Dist: pytest-cov; extra == 'test'
Provides-Extra: vectorized
Requires-Dist: numpy; extra == 'vectorized'

@sdispater
Copy link
Member

This has been improved n the latest beta release (see #1221 for more information).

Copy link

github-actions bot commented Mar 3, 2024

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants