Skip to content

dpkg-buildpackage errors when building for python3 #5

@jcormier

Description

@jcormier

python2 kept getting called for the clean step

# dpkg-buildpackage -uc -us
dpkg-buildpackage: info: source package django-media-server
dpkg-buildpackage: info: source version 0.1-1
dpkg-buildpackage: info: source distribution unstable
dpkg-buildpackage: info: source changed by Jonathan Cormier <[email protected]>
dpkg-buildpackage: info: host architecture arm64
 dpkg-source --before-build django_media_server
 debian/rules clean
test ! -d dist || rm -rf dist
test ! -d debian/python3-django-media-server-0.1 || rm -rf debian/python3-django-media-server-0.1
dh clean --setuptools --builtin-venv --python=/usr/bin/python3 --upgrade-pip --preinstall "setuptools>=38" --preinstall "wheel" --extra-pip-arg=--progress-bar=pretty
   dh_testdir -O--setuptools -O--builtin-venv -O--python=/usr/bin/python3 -O--upgrade-pip -O--preinstall=setuptools\>=38 -O--preinstall=wheel -O--extra-pip-arg=--progress-bar=pretty
   dh_auto_clean -O--setuptools -O--builtin-venv -O--python=/usr/bin/python3 -O--upgrade-pip -O--preinstall=setuptools\>=38 -O--preinstall=wheel -O--extra-pip-arg=--progress-bar=pretty
pyversions: missing X(S)-Python-Version in control file, fall back to debian/pyversions
pyversions: missing debian/pyversions file, fall back to supported versions
        python setup.py clean -a
Traceback (most recent call last):
  File "setup.py", line 2, in <module>
    from setuptools import setup
ImportError: No module named setuptools
dh_auto_clean: python setup.py clean -a returned exit code 1
debian/rules:33: recipe for target 'clean' failed
make: *** [clean] Error 1
dpkg-buildpackage: error: debian/rules clean subprocess returned exit status 2

I ended up adding "--with python3 --with python-virtualenv" to the clean: and build-arch: targets. Not sure if this would be appropriate to add to DH_VENV_ARGS or make a separate DH_ARGS

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions