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

Version set to 0.0.0 when building 21.4.0 on Guix #469

Closed
tlc28 opened this issue Oct 2, 2020 · 5 comments
Closed

Version set to 0.0.0 when building 21.4.0 on Guix #469

tlc28 opened this issue Oct 2, 2020 · 5 comments

Comments

@tlc28
Copy link

tlc28 commented Oct 2, 2020

Hi Keyring!

Seems like I'm running in a problem similar to #428. But I'm using setuptools 49.6.0 (>=42), build keyring 21.4.0. .

When I run Poetry, I get the following error:

pkg_resources.ContextualVersionConflict: (keyring 0.0.0 (/gnu/store/95mcnayigxy5bfl58ksh0ydv5wp01izi-python-keyring-21.4.0/lib/python3.8/site-packages), Requirement.parse('keyring<22.0.0,>=21.2.0'), {'poetry'})

Here is the build output:

starting phase `install'
running "python setup.py" with command "install" and parameters ("--prefix=/gnu/store/kddsnrpj439lgpdjy7h9l0h4rz076dyf-python-keyring-21.4.0" "--single-version-externally-managed" "--root=/")
running install
running build
running build_py
running egg_info
writing keyring.egg-info/PKG-INFO
writing dependency_links to keyring.egg-info/dependency_links.txt
writing entry points to keyring.egg-info/entry_points.txt
writing requirements to keyring.egg-info/requires.txt
writing top-level names to keyring.egg-info/top_level.txt
reading manifest file 'keyring.egg-info/SOURCES.txt'
writing manifest file 'keyring.egg-info/SOURCES.txt'
running install_lib
creating /gnu/store/kddsnrpj439lgpdjy7h9l0h4rz076dyf-python-keyring-21.4.0
creating /gnu/store/kddsnrpj439lgpdjy7h9l0h4rz076dyf-python-keyring-21.4.0/lib
creating /gnu/store/kddsnrpj439lgpdjy7h9l0h4rz076dyf-python-keyring-21.4.0/lib/python3.8
creating /gnu/store/kddsnrpj439lgpdjy7h9l0h4rz076dyf-python-keyring-21.4.0/lib/python3.8/site-packages
creating /gnu/store/kddsnrpj439lgpdjy7h9l0h4rz076dyf-python-keyring-21.4.0/lib/python3.8/site-packages/keyring
copying build/lib/keyring/__main__.py -> /gnu/store/kddsnrpj439lgpdjy7h9l0h4rz076dyf-python-keyring-21.4.0/lib/python3.8/site-packages/keyring
copying build/lib/keyring/credentials.py -> /gnu/store/kddsnrpj439lgpdjy7h9l0h4rz076dyf-python-keyring-21.4.0/lib/python3.8/site-packages/keyring
creating /gnu/store/kddsnrpj439lgpdjy7h9l0h4rz076dyf-python-keyring-21.4.0/lib/python3.8/site-packages/keyring/backends
copying build/lib/keyring/backends/SecretService.py -> /gnu/store/kddsnrpj439lgpdjy7h9l0h4rz076dyf-python-keyring-21.4.0/lib/python3.8/site-packages/keyring/backends
copying build/lib/keyring/backends/Windows.py -> /gnu/store/kddsnrpj439lgpdjy7h9l0h4rz076dyf-python-keyring-21.4.0/lib/python3.8/site-packages/keyring/backends
copying build/lib/keyring/backends/fail.py -> /gnu/store/kddsnrpj439lgpdjy7h9l0h4rz076dyf-python-keyring-21.4.0/lib/python3.8/site-packages/keyring/backends
copying build/lib/keyring/backends/null.py -> /gnu/store/kddsnrpj439lgpdjy7h9l0h4rz076dyf-python-keyring-21.4.0/lib/python3.8/site-packages/keyring/backends
copying build/lib/keyring/backends/__init__.py -> /gnu/store/kddsnrpj439lgpdjy7h9l0h4rz076dyf-python-keyring-21.4.0/lib/python3.8/site-packages/keyring/backends
copying build/lib/keyring/backends/OS_X.py -> /gnu/store/kddsnrpj439lgpdjy7h9l0h4rz076dyf-python-keyring-21.4.0/lib/python3.8/site-packages/keyring/backends
copying build/lib/keyring/backends/chainer.py -> /gnu/store/kddsnrpj439lgpdjy7h9l0h4rz076dyf-python-keyring-21.4.0/lib/python3.8/site-packages/keyring/backends
copying build/lib/keyring/backends/_OS_X_API.py -> /gnu/store/kddsnrpj439lgpdjy7h9l0h4rz076dyf-python-keyring-21.4.0/lib/python3.8/site-packages/keyring/backends
copying build/lib/keyring/backends/kwallet.py -> /gnu/store/kddsnrpj439lgpdjy7h9l0h4rz076dyf-python-keyring-21.4.0/lib/python3.8/site-packages/keyring/backends
creating /gnu/store/kddsnrpj439lgpdjy7h9l0h4rz076dyf-python-keyring-21.4.0/lib/python3.8/site-packages/keyring/util
copying build/lib/keyring/util/properties.py -> /gnu/store/kddsnrpj439lgpdjy7h9l0h4rz076dyf-python-keyring-21.4.0/lib/python3.8/site-packages/keyring/util
copying build/lib/keyring/util/platform_.py -> /gnu/store/kddsnrpj439lgpdjy7h9l0h4rz076dyf-python-keyring-21.4.0/lib/python3.8/site-packages/keyring/util
copying build/lib/keyring/util/__init__.py -> /gnu/store/kddsnrpj439lgpdjy7h9l0h4rz076dyf-python-keyring-21.4.0/lib/python3.8/site-packages/keyring/util
copying build/lib/keyring/backend.py -> /gnu/store/kddsnrpj439lgpdjy7h9l0h4rz076dyf-python-keyring-21.4.0/lib/python3.8/site-packages/keyring
creating /gnu/store/kddsnrpj439lgpdjy7h9l0h4rz076dyf-python-keyring-21.4.0/lib/python3.8/site-packages/keyring/testing
copying build/lib/keyring/testing/backend.py -> /gnu/store/kddsnrpj439lgpdjy7h9l0h4rz076dyf-python-keyring-21.4.0/lib/python3.8/site-packages/keyring/testing
copying build/lib/keyring/testing/__init__.py -> /gnu/store/kddsnrpj439lgpdjy7h9l0h4rz076dyf-python-keyring-21.4.0/lib/python3.8/site-packages/keyring/testing
copying build/lib/keyring/testing/util.py -> /gnu/store/kddsnrpj439lgpdjy7h9l0h4rz076dyf-python-keyring-21.4.0/lib/python3.8/site-packages/keyring/testing
copying build/lib/keyring/devpi_client.py -> /gnu/store/kddsnrpj439lgpdjy7h9l0h4rz076dyf-python-keyring-21.4.0/lib/python3.8/site-packages/keyring
copying build/lib/keyring/__init__.py -> /gnu/store/kddsnrpj439lgpdjy7h9l0h4rz076dyf-python-keyring-21.4.0/lib/python3.8/site-packages/keyring
copying build/lib/keyring/cli.py -> /gnu/store/kddsnrpj439lgpdjy7h9l0h4rz076dyf-python-keyring-21.4.0/lib/python3.8/site-packages/keyring
copying build/lib/keyring/errors.py -> /gnu/store/kddsnrpj439lgpdjy7h9l0h4rz076dyf-python-keyring-21.4.0/lib/python3.8/site-packages/keyring
copying build/lib/keyring/core.py -> /gnu/store/kddsnrpj439lgpdjy7h9l0h4rz076dyf-python-keyring-21.4.0/lib/python3.8/site-packages/keyring
copying build/lib/keyring/http.py -> /gnu/store/kddsnrpj439lgpdjy7h9l0h4rz076dyf-python-keyring-21.4.0/lib/python3.8/site-packages/keyring
byte-compiling /gnu/store/kddsnrpj439lgpdjy7h9l0h4rz076dyf-python-keyring-21.4.0/lib/python3.8/site-packages/keyring/__main__.py to __main__.cpython-38.pyc
byte-compiling /gnu/store/kddsnrpj439lgpdjy7h9l0h4rz076dyf-python-keyring-21.4.0/lib/python3.8/site-packages/keyring/credentials.py to credentials.cpython-38.pyc
byte-compiling /gnu/store/kddsnrpj439lgpdjy7h9l0h4rz076dyf-python-keyring-21.4.0/lib/python3.8/site-packages/keyring/backends/SecretService.py to SecretService.cpython-38.pyc
byte-compiling /gnu/store/kddsnrpj439lgpdjy7h9l0h4rz076dyf-python-keyring-21.4.0/lib/python3.8/site-packages/keyring/backends/Windows.py to Windows.cpython-38.pyc
byte-compiling /gnu/store/kddsnrpj439lgpdjy7h9l0h4rz076dyf-python-keyring-21.4.0/lib/python3.8/site-packages/keyring/backends/fail.py to fail.cpython-38.pyc
byte-compiling /gnu/store/kddsnrpj439lgpdjy7h9l0h4rz076dyf-python-keyring-21.4.0/lib/python3.8/site-packages/keyring/backends/null.py to null.cpython-38.pyc
byte-compiling /gnu/store/kddsnrpj439lgpdjy7h9l0h4rz076dyf-python-keyring-21.4.0/lib/python3.8/site-packages/keyring/backends/__init__.py to __init__.cpython-38.pyc
byte-compiling /gnu/store/kddsnrpj439lgpdjy7h9l0h4rz076dyf-python-keyring-21.4.0/lib/python3.8/site-packages/keyring/backends/OS_X.py to OS_X.cpython-38.pyc
byte-compiling /gnu/store/kddsnrpj439lgpdjy7h9l0h4rz076dyf-python-keyring-21.4.0/lib/python3.8/site-packages/keyring/backends/chainer.py to chainer.cpython-38.pyc
byte-compiling /gnu/store/kddsnrpj439lgpdjy7h9l0h4rz076dyf-python-keyring-21.4.0/lib/python3.8/site-packages/keyring/backends/_OS_X_API.py to _OS_X_API.cpython-38.pyc
byte-compiling /gnu/store/kddsnrpj439lgpdjy7h9l0h4rz076dyf-python-keyring-21.4.0/lib/python3.8/site-packages/keyring/backends/kwallet.py to kwallet.cpython-38.pyc
byte-compiling /gnu/store/kddsnrpj439lgpdjy7h9l0h4rz076dyf-python-keyring-21.4.0/lib/python3.8/site-packages/keyring/util/properties.py to properties.cpython-38.pyc
byte-compiling /gnu/store/kddsnrpj439lgpdjy7h9l0h4rz076dyf-python-keyring-21.4.0/lib/python3.8/site-packages/keyring/util/platform_.py to platform_.cpython-38.pyc
byte-compiling /gnu/store/kddsnrpj439lgpdjy7h9l0h4rz076dyf-python-keyring-21.4.0/lib/python3.8/site-packages/keyring/util/__init__.py to __init__.cpython-38.pyc
byte-compiling /gnu/store/kddsnrpj439lgpdjy7h9l0h4rz076dyf-python-keyring-21.4.0/lib/python3.8/site-packages/keyring/backend.py to backend.cpython-38.pyc
byte-compiling /gnu/store/kddsnrpj439lgpdjy7h9l0h4rz076dyf-python-keyring-21.4.0/lib/python3.8/site-packages/keyring/testing/backend.py to backend.cpython-38.pyc
byte-compiling /gnu/store/kddsnrpj439lgpdjy7h9l0h4rz076dyf-python-keyring-21.4.0/lib/python3.8/site-packages/keyring/testing/__init__.py to __init__.cpython-38.pyc
byte-compiling /gnu/store/kddsnrpj439lgpdjy7h9l0h4rz076dyf-python-keyring-21.4.0/lib/python3.8/site-packages/keyring/testing/util.py to util.cpython-38.pyc
byte-compiling /gnu/store/kddsnrpj439lgpdjy7h9l0h4rz076dyf-python-keyring-21.4.0/lib/python3.8/site-packages/keyring/devpi_client.py to devpi_client.cpython-38.pyc
byte-compiling /gnu/store/kddsnrpj439lgpdjy7h9l0h4rz076dyf-python-keyring-21.4.0/lib/python3.8/site-packages/keyring/__init__.py to __init__.cpython-38.pyc
byte-compiling /gnu/store/kddsnrpj439lgpdjy7h9l0h4rz076dyf-python-keyring-21.4.0/lib/python3.8/site-packages/keyring/cli.py to cli.cpython-38.pyc
byte-compiling /gnu/store/kddsnrpj439lgpdjy7h9l0h4rz076dyf-python-keyring-21.4.0/lib/python3.8/site-packages/keyring/errors.py to errors.cpython-38.pyc
byte-compiling /gnu/store/kddsnrpj439lgpdjy7h9l0h4rz076dyf-python-keyring-21.4.0/lib/python3.8/site-packages/keyring/core.py to core.cpython-38.pyc
byte-compiling /gnu/store/kddsnrpj439lgpdjy7h9l0h4rz076dyf-python-keyring-21.4.0/lib/python3.8/site-packages/keyring/http.py to http.cpython-38.pyc
running install_egg_info
Copying keyring.egg-info to /gnu/store/kddsnrpj439lgpdjy7h9l0h4rz076dyf-python-keyring-21.4.0/lib/python3.8/site-packages/keyring-0.0.0-py3.8.egg-info
running install_scripts
Installing keyring script to /gnu/store/kddsnrpj439lgpdjy7h9l0h4rz076dyf-python-keyring-21.4.0/bin
phase `install' succeeded after 1.0 seconds

Am I doing something wrong?! Any help welcome.

@jaraco
Copy link
Owner

jaraco commented Nov 6, 2020

What command did you run and in what environment? What are you trying to accomplish? How can I replicate the issue?

@tlc28
Copy link
Author

tlc28 commented Nov 7, 2020

Hi @jaraco! Thanks for your answer and sorry for not having been clear when I reported my problem!

what environment?: I'm working on Guix System.

What are you trying to accomplish?: And I'm trying to package the latest version of Keyring. We have 21.0.0 at the moment.

How can I replicate the issue?: I guess you won't install Guix just to reproduce this problem. What I've tried building it with setuptools@50.3.2 and setuptools-scm@4.1.2.

I've just gave it another try and, after running python setup.py install, I still end up with […]/lib/python3.8/site-packages/keyring-0.0.0-py3.8.egg-info/. When building version 21.0.0, I get […]/lib/python3.8/site-packages/keyring-21.0.0-py3.8.egg-info/.

I'm pretty sure the problem does not come from keyring itself but, as I've only encountered this problem with keyring, I've reported it here.

Thanks again for your time and help!

@jaraco
Copy link
Owner

jaraco commented Nov 7, 2020

Here are the differences between v21.0.0 and v21.4.0. In particular, I notice setup.py changed to remove the use_scm_version, which required a bump in the build requirements, specifically, the project now needs:

  • setuptools 42 or later
  • setuptools_scm 3.4.1 or later with the toml extra (pip install setuptools_scm[toml] >= 3.4.1).

So you'll want to be sure you have those things installed before attempting to build/install keyring.

The easiest way to accomplish this is to use pip (or other PEP 517/518-compatible builder like build) to build the package. Use of setup.py install is discouraged if not deprecated for all projects.

Does that help?

@tlc28
Copy link
Author

tlc28 commented Nov 8, 2020

Hi @jaraco!

Here are the differences between v21.0.0 and v21.4.0. In particular, I notice setup.py changed to remove the > use_scm_version, which required a bump in the build requirements, specifically, the project now needs:
setuptools 42 or later
setuptools_scm 3.4.1 or later with the toml extra (pip install setuptools_scm[toml] >= 3.4.1).
So you'll want to be sure you have those things installed before attempting to build/install keyring.

Thanks for having taken some time to check. Before trying to build keyring I made sure I had up to date versions of both setuptools en setuptools-scm, indeed.

The easiest way to accomplish this is to use pip (or other PEP 517/518-compatible builder like build) to
build the package. Use of setup.py install is discouraged if not deprecated for all projects.

Thanks for bringing it to my attention! I've (lazily) relied on Poetry for too long and ignored those "new" practices. I'll try and build keyring with the proper tools.

Does that help?

It helped a lot! Thanks for your time! I'm closing this issue as the problem is not keyring itself.

Best regards

@tlc28 tlc28 closed this as completed Nov 8, 2020
@wehlutyk
Copy link

A note for people working on Guix packages: I found that adding python-setuptools (on top of python-setuptools-scm) to the native-inputs of the package makes the python-build-system recognize keyring's version. The misleading part was that the package builds with no apparent errors even without python-setuptools, but the version does not get recognized when importing later in a script/program.

This note is mostly for people stumbling on something similar, since this particular issue will be solved in Guix's python-keyring package config 😄

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

3 participants