Hi, I submitted syslog-ng to Base:System and then to Factory. It compiled successfully in my home project, then in Base:System, and also while it was under review for Factory. Today I updated my Tumbleweed installation and was surprised to see that syslog-ng is still at the old version. I checked, and it failed to build in Factory, missing "setuptools": [ 164s] (cd ./modules/python-modules && /usr/bin/python3 setup.py \ [ 164s] build --build-base="/home/abuild/rpmbuild/BUILD/syslog-ng-4.6.0/modules/python-modules/build" \ [ 164s] egg_info --egg-base="/home/abuild/rpmbuild/BUILD/syslog-ng-4.6.0/modules/python-modules" \ [ 164s] install --record=/home/abuild/rpmbuild/BUILD/syslog-ng-4.6.0/modules/python-modules/install-manifest.txt --root="/home/abuild/rpmbuild/BUILDROOT/syslog-ng-4.6.0-218.3.x86_64" --install-lib="/usr/lib64/syslog-ng/python") [ 164s] Traceback (most recent call last): [ 164s] File "/home/abuild/rpmbuild/BUILD/syslog-ng-4.6.0/modules/python-modules/setup.py", line 24, in <module> [ 164s] from setuptools import setup [ 164s] ModuleNotFoundError: No module named 'setuptools' [ 164s] make[4]: *** [Makefile:34010: pymodules-install] Error 1 [ 164s] make[3]: *** [Makefile:32461: install-exec-am] Error 2 [ 164s] make[2]: *** [Makefile:30970: install-am] Error 2 [ 164s] make[1]: *** [Makefile:29058: install-recursive] Error 1 [ 164s] make: *** [Makefile:30963: install] Error 2 [ 164s] error: Bad exit status from /var/tmp/rpm-tmp.bxkktG (%install) (full logs at https://build.opensuse.org/package/live_build_log/Base:System/syslog-ng/stan...) What changed during the weekend? :-) Is there a workaround / fix for this problem? Peter
Am 06.02.24 um 15:49 schrieb Peter Czanik:
Hi,
I submitted syslog-ng to Base:System and then to Factory. It compiled successfully in my home project, then in Base:System, and also while it was under review for Factory. Today I updated my Tumbleweed installation and was surprised to see that syslog-ng is still at the old version. I checked, and it failed to build in Factory, missing "setuptools":
[ 164s] (cd ./modules/python-modules && /usr/bin/python3 setup.py \ [ 164s] build --build-base="/home/abuild/rpmbuild/BUILD/syslog-ng-4.6.0/modules/python-modules/build" \ [ 164s] egg_info --egg-base="/home/abuild/rpmbuild/BUILD/syslog-ng-4.6.0/modules/python-modules" \ [ 164s] install --record=/home/abuild/rpmbuild/BUILD/syslog-ng-4.6.0/modules/python-modules/install-manifest.txt --root="/home/abuild/rpmbuild/BUILDROOT/syslog-ng-4.6.0-218.3.x86_64" --install-lib="/usr/lib64/syslog-ng/python") [ 164s] Traceback (most recent call last): [ 164s] File "/home/abuild/rpmbuild/BUILD/syslog-ng-4.6.0/modules/python-modules/setup.py", line 24, in <module> [ 164s] from setuptools import setup [ 164s] ModuleNotFoundError: No module named 'setuptools' [ 164s] make[4]: *** [Makefile:34010: pymodules-install] Error 1 [ 164s] make[3]: *** [Makefile:32461: install-exec-am] Error 2 [ 164s] make[2]: *** [Makefile:30970: install-am] Error 2 [ 164s] make[1]: *** [Makefile:29058: install-recursive] Error 1 [ 164s] make: *** [Makefile:30963: install] Error 2 [ 164s] error: Bad exit status from /var/tmp/rpm-tmp.bxkktG (%install)
(full logs at https://build.opensuse.org/package/live_build_log/Base:System/syslog-ng/stan...)
What changed during the weekend? :-) Is there a workaround / fix for this problem?
Well, you obviously do not have python3-setuptools in BuildRequires, but are executing setup.py. You must add it to your BuildRequires. Something in your dep chain previously pulled it in and no longer does. But note that you (and upstream) are calling setuptools in a deprecated fashion. `setup.py install` is going to vanish at some time, you will see a deprecation notice once you add it to your build environment. The proper way is to build and install wheels (PEP517).
Peter
- Ben
On 2/6/24 21:17, Ben Greiner wrote:
Well, you obviously do not have python3-setuptools in BuildRequires, but are executing setup.py. You must add it to your BuildRequires. Something in your dep chain previously pulled it in and no longer does.
Thanks! Adding python3-setuptools as BuildRequires solved the build problem. Submitted syslog-ng again.
But note that you (and upstream) are calling setuptools in a deprecated fashion. `setup.py install` is going to vanish at some time, you will see a deprecation notice once you add it to your build environment. The proper way is to build and install wheels (PEP517).
Yeah. I'm a very beginner Python coder and do not know anything about setuptools. However, now I recall that this topic came up long time ago here or at Fedora, and I already reported it to my colleagues at syslog-ng upstream. I guess it's time to remind them again :-) Thanks again, Peter
On Tue Feb 6, 2024 at 9:17 PM CET, Ben Greiner wrote:
But note that you (and upstream) are calling setuptools in a deprecated fashion. `setup.py install` is going to vanish at some time, you will see a deprecation notice once you add it to your build environment. The proper way is to build and install wheels (PEP517).
Completely agree with Ben. I have no idea how syslong-ng packaging works, but if as I suspect it is large C package with a small Python subpackage on side, you probably need to read about `%python_subpackage_only` on https://github.com/openSUSE/python-rpm-macros and for example avahi.spec or gpgme.spec could be illustrations of the technique. Best, Matěj -- http://matej.ceplovi.cz/blog/, @mcepl@floss.social GPG Finger: 3C76 A027 CA45 AD70 98B5 BC1D 7920 5802 880B C9D8 He loves nature in spite of what it did to him. -- Forrest Tucker
participants (3)
-
Ben Greiner
-
Matěj Cepl
-
Peter Czanik