python3 only build from cloned repo
tyctor opened this issue · comments
hi
i tryied to build app in python3 only environment (fresh ubuntu 18.04)
i changed relevant parts in debian/control
file
and run build dpkg-buildpackage -us -uc -b
i get this error:
Can't exec "pyversions": No such file or directory at /usr/share/perl5/Debian/Debhelper/Buildsystem/python_distutils.pm line 121.
so after googling, i found solution
file debian/rules
file was needed to edit to void error above
line dh $@ --with python3
change to
line dh $@ --with python3 --buildsystem=pybuild
after those updates i was able to build with no errors
so i am posting git diff
of this changes if someone will be interested about it
ok, so above solution works for building dh_virtualenv
but when i try to build my own package i am getting this error:
File "/usr/bin/dh_virtualenv", line 29, in <module>
from debpython.debhelper import DebHelper
ModuleNotFoundError: No module named 'debpython.debhelper'
dh_virtualenv
is inserting /usr/share/python
in path
and really there is debpython
but no debhelper
ls -1 /usr/share/python/debpython/
files.py
__init__.py
interpreter.py
option.py
__pycache__
version.py
it is something what is no more part of python3
debpython
install?
thanks for any advice
Use the pre-built package from Debian sid. You're mixing things from 2 and 3.
ok, thanks for answer...
so dh-virtualenv
is writen in python2, right?
will it be one day available for python3?
since debpython does not exist in python3, patching the path to /usr/share/dh-python/ and DebHelper import from dhpython.debhelper in dh_virtualenv in the source does indeed allow the package to be built. i however have no experience on how to test wether dh_virtualenv actually works with this.
With python 2.7 deprecation closing in, this should be addressed one way or another or verified by someone wether the simple change in the library path actually does the trick.
Fixed by #300