-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
Linux distributions usually want to run the testsuite when building Python packages. For this reason, we're using source tarballs from Github for shipping accessible-pygments in openSUSE.
Unfortunately, this no longer works with version 0.0.5 as the vcs module tries to extract the version number either from git or the PyPi source:
[ 34s] + /usr/bin/python3.11 -mpip wheel --verbose --progress-bar off --disable-pip-version-check --use-pep517 --no-build-isolation --no-deps --wheel-dir ./build .
[ 35s] WARNING: Disabling truststore because of missing certificates
[ 35s] Processing /home/abuild/rpmbuild/BUILD/python-accessible-pygments-0.0.5-build/accessible-pygments-0.0.5
[ 35s] Preparing metadata (pyproject.toml): started
[ 35s] Running command Preparing metadata (pyproject.toml)
[ 35s] Traceback (most recent call last):
[ 35s] File "/usr/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 389, in <module>
[ 35s] main()
[ 35s] File "/usr/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 373, in main
[ 35s] json_out["return_val"] = hook(**hook_input["kwargs"])
[ 35s] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ 35s] File "/usr/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 178, in prepare_metadata_for_build_wheel
[ 35s] whl_basename = backend.build_wheel(metadata_directory, config_settings)
[ 35s] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ 35s] File "/usr/lib/python3.11/site-packages/hatchling/build.py", line 58, in build_wheel
[ 35s] return os.path.basename(next(builder.build(directory=wheel_directory, versions=['standard'])))
[ 35s] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ 35s] File "/usr/lib/python3.11/site-packages/hatchling/builders/plugin/interface.py", line 90, in build
[ 35s] self.metadata.validate_fields()
[ 35s] File "/usr/lib/python3.11/site-packages/hatchling/metadata/core.py", line 265, in validate_fields
[ 35s] _ = self.version
[ 35s] ^^^^^^^^^^^^
[ 35s] File "/usr/lib/python3.11/site-packages/hatchling/metadata/core.py", line 149, in version
[ 35s] self._version = self._get_version()
[ 35s] ^^^^^^^^^^^^^^^^^^^
[ 35s] File "/usr/lib/python3.11/site-packages/hatchling/metadata/core.py", line 244, in _get_version
[ 35s] core_metadata = self.core
[ 35s] ^^^^^^^^^
[ 35s] File "/usr/lib/python3.11/site-packages/hatchling/metadata/core.py", line 191, in core
[ 35s] self._version = self._get_version(metadata)
[ 35s] ^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ 35s] File "/usr/lib/python3.11/site-packages/hatchling/metadata/core.py", line 248, in _get_version
[ 35s] version = self.hatch.version.cached
[ 35s] ^^^^^^^^^^^^^^^^^^^^^^^^^
[ 35s] File "/usr/lib/python3.11/site-packages/hatchling/metadata/core.py", line 1456, in cached
[ 35s] raise type(e)(message) from None
[ 35s] LookupError: Error getting the version from source `vcs`: setuptools-scm was unable to detect version for /home/abuild/rpmbuild/BUILD/python-accessible-pygments-0.0.5-build/accessible-pygments-0.0.5.
[ 35s]
[ 35s] Make sure you're either building from a fully intact git repository or PyPI tarballs. Most other sources (such as GitHub's tarballs, a git checkout without the .git folder) don't contain the necessary metadata and will not work.
[ 35s]
[ 35s] For example, if you're using pip, instead of https://github.com/user/proj/archive/master.zip use git+https://github.com/user/proj.git#egg=proj
[ 35s]
[ 35s] Alternatively, set the version with the environment variable SETUPTOOLS_SCM_PRETEND_VERSION_FOR_${NORMALIZED_DIST_NAME} as described in https://setuptools-scm.readthedocs.io/en/latest/config.
[ 35s] error: subprocess-exited-with-error
[ 35s]
[ 35s] × Preparing metadata (pyproject.toml) did not run successfully.
[ 35s] │ exit code: 1
[ 35s] ╰─> See above for output.
[ 35s]
[ 35s] note: This error originates from a subprocess, and is likely not a problem with pip.
[ 35s] full command: /usr/bin/python3.11 /usr/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py prepare_metadata_for_build_wheel /tmp/tmpj0vp6x2d
[ 35s] cwd: /home/abuild/rpmbuild/BUILD/python-accessible-pygments-0.0.5-build/accessible-pygments-0.0.5
[ 35s] Preparing metadata (pyproject.toml): finished with status 'error'
[ 35s] error: metadata-generation-failed
[ 35s]
[ 35s] × Encountered error while generating package metadata.
[ 35s] ╰─> See above for output.
[ 35s]
[ 35s] note: This is an issue with the package mentioned above, not pip.
[ 35s] hint: See above for details.
[ 35s] error: Bad exit status from /var/tmp/rpm-tmp.dshK5s (%build)
[ 35s]
[ 35s] RPM build errors:
[ 35s] Bad exit status from /var/tmp/rpm-tmp.dshK5s (%build)
[ 35s]
[ 35s] suse-laptop failed "build python-accessible-pygments.spec" at Wed Apr 23 12:21:15 UTC 2025.
[ 35s]
However, the PyPi source is missing the tests directory which we need in openSUSE. Could you add it to the PyPi source?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels