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

pip3 -> debian package being created with version 0.0.0 instead of the pip3 package version #1824

Open
philschwartzsonos opened this issue Aug 26, 2021 · 1 comment

Comments

@philschwartzsonos
Copy link

Running the following command that re-packages platformdirs 2.2.0 from the pip3 source and targeting debian results in the pip3 package being versioned as 0.0.0:

$ fpm --version
1.13.1

fpm -s python --python-bin python3 --python-pip pip3 --python-package-name-prefix python3 --python-install-lib=/usr/lib/python3/dist-packages --python-install-bin=/usr/bin -t deb --deb-no-default-config-files -v 2.2.0 platformdirs
Created package {:path=>"python3-platformdirs_2.2.0_all.deb"}

$ dpkg --contents python3-platformdirs_2.2.0_all.deb | grep egg
drwxrwxr-x 0/0 0 2021-08-26 21:33 ./usr/lib/python3/dist-packages/platformdirs-0.0.0.egg-info/
-rw-rw-r-- 0/0 13 2021-08-26 21:33 ./usr/lib/python3/dist-packages/platformdirs-0.0.0.egg-info/top_level.txt
-rw-rw-r-- 0/0 9172 2021-08-26 21:33 ./usr/lib/python3/dist-packages/platformdirs-0.0.0.egg-info/PKG-INFO
-rw-rw-r-- 0/0 854 2021-08-26 21:33 ./usr/lib/python3/dist-packages/platformdirs-0.0.0.egg-info/SOURCES.txt
-rw-rw-r-- 0/0 151 2021-08-26 21:33 ./usr/lib/python3/dist-packages/platformdirs-0.0.0.egg-info/requires.txt
-rw-rw-r-- 0/0 1 2021-07-29 11:51 ./usr/lib/python3/dist-packages/platformdirs-0.0.0.egg-info/zip-safe
-rw-rw-r-- 0/0 1 2021-08-26 21:33 ./usr/lib/python3/dist-packages/platformdirs-0.0.0.egg-info/dependency_links.txt

Additionally the PKG-INFO file contains "Version: 0.0.0"

installing the fpm-created debian pkg, "pip3" list shows:

platformdirs (0.0.0)

However, when downloading the pip3 package directly

$ pip3 download platformdirs

$ unzip -l platformdirs-2.2.0-py3-none-any.whl | grep egg
Archive: platformdirs-2.2.0-py3-none-any.whl
Length Date Time Name


11051  2021-07-29 11:51   platformdirs/__init__.py
 1078  2021-07-29 11:51   platformdirs/__main__.py
 2830  2021-07-29 11:51   platformdirs/android.py
 4344  2021-07-29 11:51   platformdirs/api.py
 2156  2021-07-29 11:51   platformdirs/macos.py
    0  2021-07-29 11:51   platformdirs/py.typed
 4973  2021-07-29 11:51   platformdirs/unix.py
   80  2021-07-29 11:51   platformdirs/version.py
 5712  2021-07-29 11:51   platformdirs/windows.py
 1096  2021-07-29 11:51   platformdirs-2.2.0.dist-info/LICENSE.txt
 8162  2021-07-29 11:51   platformdirs-2.2.0.dist-info/METADATA
   92  2021-07-29 11:51   platformdirs-2.2.0.dist-info/WHEEL
   13  2021-07-29 11:51   platformdirs-2.2.0.dist-info/top_level.txt
    1  2021-07-29 11:51   platformdirs-2.2.0.dist-info/zip-safe
 1213  2021-07-29 11:51   platformdirs-2.2.0.dist-info/RECORD

42801                     15 files

In extracting the whl, the METADATA file contains "Version: 2.2.0"

So I'm not sure where fpm is inferring the "0.0.0" version from since it breaks anything dependent on platformdirs > 0.0.0 (such as pylint).

@rooterkyberian
Copy link

this Issue seems to be duplicate of #1771

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants