Bug#1033365: 0ad: Build fails if python3-setuptools is installed

David W. Kennedy dave_k at reasoned.us
Thu Mar 23 16:29:24 GMT 2023


Package: 0ad
Version: 0.0.26-3
Severity: normal

If the user has python3-setuptools, version 58.3.0 or higher, installed 
in a Debian sid build environment when building 0ad then build fails.

To confirm that python3-setuptools is a minimal case for reproduction of 
symptoms, I also tested build of 0ad without python3-setuptools, but 
with each of the dependency packages of python3-setuptools. In that case 
build was successful. I have also tested with python3-setuptools 
versions 58.2.0-1 and 52.0.0-4, and build of 0ad was successful with 
those versions. I used matching versions of python3-pkg-resources for 
the tests.

I think that the cause of the failure to build 0ad with 
python3-setuptools version >= 58.3.0 is that easyinstall was deprecated 
in python3-setuptools on 2021-10-22. Version 58.3.0 is the next upstream 
release after that.

Steps to reproduce:

# sbuild-createchroot sid /path/to/chroot/sid [debian mirror]
# cd /
# schroot -c source:sid-amd64-sbuild
   # mkdir /home/myusername  (replace "myusername" with your primary 
username outside the chroot)
   # cp -r /etc/skel/. /home/myusername
   # chown -R myusername:myusername /home/myusername
   # chmod g+ws /home/myusername
   # chmod o-rx /home/myusername
   # apt-get update
   # apt-get install --no-install-recommends python3-setuptools
     (installs several packages, but the only packages that would not 
otherwise be installed by `apt-get build-dep 0ad` are: 
python3-pkg-resources python3-setuptools)
   # dpkg --status python3-setuptools | grep '^Version'
     (output is Version: 66.1.1-1)
   # dpkg --status python3-pkg-resources | grep '^Version'
     (output is Version: 66.1.1-1)
   # exit

$ sbuild -d sid-amd64-sbuild 0ad_0.0.26-3

Excerpt of output from steps to reproduce:

patching file python/mozbuild/mozbuild/preprocessor.py
patching file python/mozbuild/mozbuild/util.py
Creating Python 3 environment
/usr/lib/python3/dist-packages/setuptools/command/install.py:34: 
SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build 
and pip and other standards-based tools.
   warnings.warn(
created virtual environment CPython3.11.2.final.0-64 in 239ms
   creator 
CPython3Posix(dest=/<<PKGBUILDDIR>>/libraries/source/spidermonkey/mozjs-78.6.0/build-debug/_virtualenvs/init_py3, 
clear=False, global=False)
   seeder FromAppData(download=False, pip=bundle, setuptools=bundle, 
wheel=bundle, via=copy, app_data_dir=/tmp/tmppfskju67)
     added seed packages: pip==20.2.2, setuptools==49.6.0, wheel==0.35.1
   activators 
BashActivator,CShellActivator,FishActivator,PowerShellActivator,PythonActivator,XonshActivator

[...]

Job: 0ad_0.0.26-3
Machine Architecture: amd64
Package: 0ad
Source-Version: 0.0.26-3
Status: attempted
Version: 0.0.26-3
E: Build failure (dpkg-buildpackage died)

Solutions:

Option 1. We look for a root cause and fix the bug that causes build 
failure if the user happens to have python3-setuptools installed. An 
idea would be to configure the virtualenv to use the builtin version of 
python3-setuptools.

Option 2. Alternatively, we add "Build-Conflicts: python3-setuptools (>= 
58.3.0)" to the control file of the Debian package of 0ad.

I'll send the latter fix, probably via Salsa.



More information about the Pkg-games-devel mailing list