[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

‘dh’ invoking Python 2 ‘pyversions’ in a Python 3-only package



Howdy all,

I'm attempting to build a Python 3-only package, but ‘dh’ insists on
trying to find some Python 2 versions.

The ‘debian/control’ contains a “X-Python3-Versions” field, and does not
contain any “X-Python-Versions” field. This is as I want it, because
there are no valid Python 2 versions for this package.

However, ‘dh_auto_clean(1)’ ignores the “X-Python3-Versions” field and
blithely assumes I have omitted the “X-Python-Versions” field by mistake::

    $ dh clean --with python3
       dh_testdir
       debian/rules override_dh_auto_clean
    dh_auto_clean
    pyversions: missing X(S)-Python-Version in control file, fall back to debian/pyversions
    pyversions: missing debian/pyversions file, fall back to supported versions

This has the result ‘python setup.py clean -a’ is called, even though
I've deliberately set this up as a Python 3-only package.

Since the package's ‘setup.py’ knows it's not compatible with Python 2,
it exits with an error, breaking the build.

How can I inform Debhelper that it should not attempt to find any Python
2 versions for building or cleaning this package?

-- 
 \        “We cannot solve our problems with the same thinking we used |
  `\                           when we created them.” —Albert Einstein |
_o__)                                                                  |
Ben Finney


Reply to: