-
Notifications
You must be signed in to change notification settings - Fork 0
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
distutils package is deprecated #1
Comments
It might be that the RPM build macros are the issue |
They are not. The setup.py imports distutils, which is deprecated and will be removed in Python 3.12. This should use Other suggestions:
|
One of the pitfalls is that the RPM tool that want to read the dependencies, will fail if the dependency is not installed:
See https://bugzilla.redhat.com/show_bug.cgi?id=2151315#c6 for details |
Do you know the correct way to extract version?
I can fix it.
Thank you in advance
*AVI* ALKALAY @*avibrazil* +55(11)99659-9059 <+5511996599059> *digital
business card* <https://avi.alkalay.net/card/>
…On Wed, Dec 7, 2022 at 7:39 PM Jonny Heggheim ***@***.***> wrote:
The setup.py imports the package itself to extract *version*. That is not
the correct way to extract *version* from the package and is bad practice
that has multiple potential pitfalls
One of the pitfalls is that the RPM tool that want to read the
dependencies, will fail if the dependency is not installed:
+ /usr/bin/python3 -Bs /usr/lib/rpm/redhat/pyproject_buildrequires.py --generate-extras --python3_pkgversion 3 --wheeldir /builddir/build/BUILD/auto_remote_sync-1.0.5/pyproject-wheeldir
Handling setuptools >= 40.8 from default build backend
Requirement satisfied: setuptools >= 40.8
(installed: setuptools 59.6.0)
Handling wheel from default build backend
Requirement satisfied: wheel
(installed: wheel 0.37.1)
Traceback (most recent call last):
File "/usr/lib/rpm/redhat/pyproject_buildrequires.py", line 501, in main
generate_requires(
File "/usr/lib/rpm/redhat/pyproject_buildrequires.py", line 415, in generate_requires
generate_build_requirements(backend, requirements)
File "/usr/lib/rpm/redhat/pyproject_buildrequires.py", line 265, in generate_build_requirements
new_reqs = get_requires()
File "/usr/lib/python3.10/site-packages/setuptools/build_meta.py", line 162, in get_requires_for_build_wheel
return self._get_build_requires(
File "/usr/lib/python3.10/site-packages/setuptools/build_meta.py", line 143, in _get_build_requires
self.run_setup()
File "/usr/lib/python3.10/site-packages/setuptools/build_meta.py", line 267, in run_setup
super(_BuildMetaLegacyBackend,
File "/usr/lib/python3.10/site-packages/setuptools/build_meta.py", line 158, in run_setup
exec(compile(code, __file__, 'exec'), locals())
File "setup.py", line 5, in <module>
from autorsync import __version__
File "/builddir/build/BUILD/auto_remote_sync-1.0.5/autorsync/__init__.py", line 9, in <module>
import yaml
ModuleNotFoundError: No module named 'yaml'
error: Bad exit status from /var/tmp/rpm-tmp.wHpst0 (%generate_buildrequires)
Bad exit status from /var/tmp/rpm-tmp.wHpst0 (%generate_buildrequires)
See https://bugzilla.redhat.com/show_bug.cgi?id=2151315#c6 for details
—
Reply to this email directly, view it on GitHub
<#1 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA2SUUQEE66AERBULTRDZ33WMEGZ3ANCNFSM6AAAAAASVY54LQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
From build log when building RPM package
The text was updated successfully, but these errors were encountered: