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

not installable via setuptools #29

Open
Apteryks opened this issue May 3, 2022 · 2 comments
Open

not installable via setuptools #29

Apteryks opened this issue May 3, 2022 · 2 comments

Comments

@Apteryks
Copy link

Apteryks commented May 3, 2022

Hi,

Attempting to package this on my Guix System, I get:

starting phase `build'
running "python setup.py" with command "build" and parameters ()
/gnu/store/b6j1qw1a5rkbfvcy7lc9fm95abbzpa4x-python-3.9.9/lib/python3.9/site-packages/setuptools/dist.py:717: UserWarning: Usage of dash-separated 'home-page' will not be supported in future versions. Please use the underscore name 'home_page' instead
  warnings.warn(
/gnu/store/b6j1qw1a5rkbfvcy7lc9fm95abbzpa4x-python-3.9.9/lib/python3.9/site-packages/setuptools/dist.py:717: UserWarning: Usage of dash-separated 'requires-python' will not be supported in future versions. Please use the underscore name 'requires_python' instead
  warnings.warn(
/gnu/store/b6j1qw1a5rkbfvcy7lc9fm95abbzpa4x-python-3.9.9/lib/python3.9/site-packages/setuptools/dist.py:717: UserWarning: Usage of dash-separated 'scrape-schema-recipe' will not be supported in future versions. Please use the underscore name 'scrape_schema_recipe' instead
  warnings.warn(
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "setup.py", line 4, in <module>
    setup()
  File "/gnu/store/b6j1qw1a5rkbfvcy7lc9fm95abbzpa4x-python-3.9.9/lib/python3.9/site-packages/setuptools/__init__.py", line 153, in setup
    return distutils.core.setup(**attrs)
  File "/gnu/store/b6j1qw1a5rkbfvcy7lc9fm95abbzpa4x-python-3.9.9/lib/python3.9/distutils/core.py", line 121, in setup
    dist.parse_config_files()
  File "/gnu/store/b6j1qw1a5rkbfvcy7lc9fm95abbzpa4x-python-3.9.9/lib/python3.9/site-packages/setuptools/dist.py", line 798, in parse_config_files
    parse_configuration(
  File "/gnu/store/b6j1qw1a5rkbfvcy7lc9fm95abbzpa4x-python-3.9.9/lib/python3.9/site-packages/setuptools/config.py", line 158, in parse_configuration
    meta.parse()
  File "/gnu/store/b6j1qw1a5rkbfvcy7lc9fm95abbzpa4x-python-3.9.9/lib/python3.9/site-packages/setuptools/config.py", line 498, in parse
    section_parser_method(section_options)
  File "/gnu/store/b6j1qw1a5rkbfvcy7lc9fm95abbzpa4x-python-3.9.9/lib/python3.9/site-packages/setuptools/config.py", line 469, in parse_section
    self[name] = value
  File "/gnu/store/b6j1qw1a5rkbfvcy7lc9fm95abbzpa4x-python-3.9.9/lib/python3.9/site-packages/setuptools/config.py", line 222, in __setitem__
    value = parser(value)
  File "/gnu/store/b6j1qw1a5rkbfvcy7lc9fm95abbzpa4x-python-3.9.9/lib/python3.9/site-packages/setuptools/config.py", line 593, in _parse_version
    raise DistutilsOptionError(tmpl.format(**locals()))
distutils.errors.DistutilsOptionError: Version loaded from file:scrape_schema_recipe/VERSION does not comply with PEP 440: 
error: in phase 'build': uncaught exception:
%exception #<&invoke-error program: "python" arguments: ("-c" "import setuptools, tokenize;__file__='setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\\r\\n', '\\n');f.close();exec(compile(code, __file__, 'exec'))" "build") exit-status: 1 term-signal: #f stop-signal: #f> 
phase `build' failed after 3.0 seconds
command "python" "-c" "import setuptools, tokenize;__file__='setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\\r\\n', '\\n');f.close();exec(compile(code, __file__, 'exec'))" "build" failed with status 1
note: keeping build directory `/tmp/guix-build-python-scrape-schema-recipe-0.2.0.drv-0'
builder for `/gnu/store/la366smsjzwjjvdhl729ly6dmfxvhnhm-python-scrape-schema-recipe-0.2.0.drv' failed with exit code 1
build of /gnu/store/la366smsjzwjjvdhl729ly6dmfxvhnhm-python-scrape-schema-recipe-0.2.0.drv failed
View build log at '/var/log/guix/drvs/la/366smsjzwjjvdhl729ly6dmfxvhnhm-python-scrape-schema-recipe-0.2.0.drv'

There doesn't appear to be any VERSION file packaged in the sdist archive.

@micahcochran
Copy link
Owner

Guix is very different from most being an immutable build system. NixOS is similar. My understand of NixOS is that you are required to install python packages via the Nix Packaging system. Does Guix differ when related to Python package installation?

Could you provide more information on what commands you used to issued during installation. Was it pip install scrape-schema-recipe?

Guix is one of the few OSes that I feels really different to use.

It works when installed via pip and conda (on my Linux Mint box):

In [1]: import scrape_schema_recipe

In [2]: scrape_schema_recipe.__version__
Out[2]: '0.2.0'

The VERSION file appears in the wheel file on PyPA. It is in the tar.gz file. Does it work when you install via pip from the repo?

$ pip install https://github.com/micahcochran/scrape-schema-recipe.git

@Apteryks
Copy link
Author

Hi,

I don't think the Guix specifics are at play here; the problem is resolved when building scrape-schema-recipe fetching its sources from Git instead of from its PyPI sdist archive.

As I hinted in the original message, I believe the problem is that the sdist source archive is lacking a VERSION file, which is required by the setuptools build system (python setup.py build).

I hope this clarifies the problem. Thanks.

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