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

Packaging can be fickle sometimes #132

Open
sajith opened this issue Mar 19, 2025 · 0 comments
Open

Packaging can be fickle sometimes #132

sajith opened this issue Mar 19, 2025 · 0 comments

Comments

@sajith
Copy link
Member

sajith commented Mar 19, 2025

I pushed a tag zfec-1.6.0.1r0 while testing #129 and that made subsequent packaging tests unhappy, because: "Invalid version: '1.6.0.1r0.post0.dev2'". See this CI run, for instance.

Building wheel...
  
  + python -m pip wheel /Users/runner/work/zfec/zfec --wheel-dir=/private/var/folders/0j/bwqcs4y508s2n4ck4dhf3rpc0000gn/T/cibw-run-9_yj0dwr/cp39-macosx_x86_64/built_wheel --no-deps
  Processing /Users/runner/work/zfec/zfec
    Installing build dependencies: started
    Installing build dependencies: finished with status 'done'
    Getting requirements to build wheel: started
    Getting requirements to build wheel: finished with status 'error'
    error: subprocess-exited-with-error
    
    × Getting requirements to build wheel did not run successfully.
    │ exit code: 1
    ╰─> [27 lines of output]
        Traceback (most recent call last):
          File "/private/var/folders/0j/bwqcs4y508s2n4ck4dhf3rpc0000gn/T/cibw-run-9_yj0dwr/cp39-macosx_x86_64/build/venv/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
            main()
          File "/private/var/folders/0j/bwqcs4y508s2n4ck4dhf3rpc0000gn/T/cibw-run-9_yj0dwr/cp39-macosx_x86_64/build/venv/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
            json_out['return_val'] = hook(**hook_input['kwargs'])
          File "/private/var/folders/0j/bwqcs4y508s2n4ck4dhf3rpc0000gn/T/cibw-run-9_yj0dwr/cp39-macosx_x86_64/build/venv/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
            return hook(config_settings)
          File "/private/var/folders/0j/bwqcs4y508s2n4ck4dhf3rpc0000gn/T/pip-build-env-gun4bnpq/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 334, in get_requires_for_build_wheel
            return self._get_build_requires(config_settings, requirements=[])
          File "/private/var/folders/0j/bwqcs4y508s2n4ck4dhf3rpc0000gn/T/pip-build-env-gun4bnpq/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 304, in _get_build_requires
            self.run_setup()
          File "/private/var/folders/0j/bwqcs4y508s2n4ck4dhf3rpc0000gn/T/pip-build-env-gun4bnpq/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 522, in run_setup
            super().run_setup(setup_script=setup_script)
          File "/private/var/folders/0j/bwqcs4y508s2n4ck4dhf3rpc0000gn/T/pip-build-env-gun4bnpq/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 320, in run_setup
            exec(code, locals())
          File "<string>", line 58, in <module>
          File "/private/var/folders/0j/bwqcs4y508s2n4ck4dhf3rpc0000gn/T/pip-build-env-gun4bnpq/overlay/lib/python3.9/site-packages/setuptools/__init__.py", line 117, in setup
            return distutils.core.setup(**attrs)
          File "/private/var/folders/0j/bwqcs4y508s2n4ck4dhf3rpc0000gn/T/pip-build-env-gun4bnpq/overlay/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 148, in setup
            _setup_distribution = dist = klass(attrs)
          File "/private/var/folders/0j/bwqcs4y508s2n4ck4dhf3rpc0000gn/T/pip-build-env-gun4bnpq/overlay/lib/python3.9/site-packages/setuptools/dist.py", line 330, in __init__
            self.metadata.version = self._normalize_version(self.metadata.version)
          File "/private/var/folders/0j/bwqcs4y508s2n4ck4dhf3rpc0000gn/T/pip-build-env-gun4bnpq/overlay/lib/python3.9/site-packages/setuptools/dist.py", line 366, in _normalize_version
            normalized = str(Version(version))
          File "/private/var/folders/0j/bwqcs4y508s2n4ck4dhf3rpc0000gn/T/pip-build-env-gun4bnpq/overlay/lib/python3.9/site-packages/setuptools/_vendor/packaging/version.py", line 202, in __init__
            raise InvalidVersion(f"Invalid version: {version!r}")
        packaging.version.InvalidVersion: Invalid version: '1.6.0.1r0.post0.dev3'
        [end of output]
    
    note: This error originates from a subprocess, and is likely not a problem with pip.
  error: subprocess-exited-with-error
  
  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> See above for output.
  
  note: This error originates from a subprocess, and is likely not a problem with pip.

This probably should not be so fickle. Perhaps giving packaging setup the same treatment as tahoe-lafs/tahoe-lafs#1395 might help?

Also the rationale stated in https://tahoe-lafs.org/trac/tahoe-lafs/ticket/4133 applies here as well.

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

1 participant