🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.debian.maint.python
Article #17

AutoPkgTest fails to copy the Python files to test environment

#17
From: Ben Finney
Date: Mon, 12 Oct 2026 00:50
108 lines
6901 bytes
Howdy all,

I'm attempting to enable AutoPkgTest for a Python package [0], via the
control field “Testsuite: autopkgtest-pkg-pybuild”. The binary package
builds successfully [1], but the AutoPkgTest run does not include any of
the Python package and so runs no tests [2].

I am quite confused how the Debian tools for Python packaging determine
which package names, module names, and filesystem paths are relevant for
each step. It would not surprise me if some error has been made in
values for those in the Debian package.

Relevant values I can think of:

* Source package name: “jaraco.logging’.
* Binary package for the Python 3 library: ‘python3-jaraco.logging’.
* Python package import name: ‘jaraco_logging’.
* Name of the top-level directory: ‘jaraco’.
* Name of the ‘dist-info’ directory: ‘jaraco_logging-3.4.0.dist-info’.

So I've set in ‘debian/rules’:

=====
export PYBUILD_SYSTEM := pyproject
export PYBUILD_NAME := jaraco_logging
=====

and the ‘debian/python3-jaraco.logging.install’ instructs ‘dh_install’
correctly to install the Python package:

=====
debian/python3-jaraco-logging/usr/lib/python3.*/dist-packages/jaraco
debian/python3-jaraco-logging/usr/lib/python3.*/dist-packages/jaraco_logging-*.dist-info
=====

What is failing, evidently, is AutoPkgTest's step of copying the Python
package and test files, into its test environment. From there, zero test
cases are found, and the step fails.

How do I diagnose what is failing to the point where I know what needs
to be corrected?


[0]: Source package ‘jaraco.logging’, packaging repository at Salsa
<URL:https://salsa.debian.org/bignose/pkg-jaraco.logging>.

[1]: Within the SBuild session, the binary package is correct:
=====
$ dpkg-deb --contents python3-jaraco.logging_3.4.0-1~pre1_all.deb | cut --characters=49-
./
./debian/
./debian/python3-jaraco-logging/
./debian/python3-jaraco-logging/usr/
./debian/python3-jaraco-logging/usr/lib/
./debian/python3-jaraco-logging/usr/lib/python3.14/
./debian/python3-jaraco-logging/usr/lib/python3.14/dist-packages/
./debian/python3-jaraco-logging/usr/lib/python3.14/dist-packages/jaraco/
./debian/python3-jaraco-logging/usr/lib/python3.14/dist-packages/jaraco/logging.py
./debian/python3-jaraco-logging/usr/lib/python3.14/dist-packages/jaraco_logging-3.4.0.dist-info/
./debian/python3-jaraco-logging/usr/lib/python3.14/dist-packages/jaraco_logging-3.4.0.dist-info/INSTALLER
./debian/python3-jaraco-logging/usr/lib/python3.14/dist-packages/jaraco_logging-3.4.0.dist-info/METADATA
./debian/python3-jaraco-logging/usr/lib/python3.14/dist-packages/jaraco_logging-3.4.0.dist-info/licenses/
./debian/python3-jaraco-logging/usr/lib/python3.14/dist-packages/jaraco_logging-3.4.0.dist-info/licenses/LICENSE
./debian/python3-jaraco-logging/usr/lib/python3.14/dist-packages/jaraco_logging-3.4.0.dist-info/top_level.txt
./usr/
./usr/share/
./usr/share/doc/
./usr/share/doc/python3-jaraco.logging/
./usr/share/doc/python3-jaraco.logging/changelog.Debian.gz
./usr/share/doc/python3-jaraco.logging/changelog.gz
./usr/share/doc/python3-jaraco.logging/copyright
=====

[2]: Within the SBuild session, AutoPkgTest fails because the test
environment does not have the Python packages nor its test suite:
=====
autopkgtest [16:31:49]: test pybuild-autopkgtest: pybuild-autopkgtest
autopkgtest [16:31:49]: test pybuild-autopkgtest: [-----------------------
pybuild-autopkgtest
I: pybuild base:385: cd /tmp/autopkgtest.spiuJG/autopkgtest_tmp/build; python3.14 -m pytest
============================= test session starts ==============================
platform linux -- Python 3.14.8, pytest-9.1.1, pluggy-1.6.0
rootdir: /tmp/autopkgtest.spiuJG/autopkgtest_tmp/build
configfile: pytest.ini
collected 0 items

============================ no tests ran in 0.00s =============================
E: pybuild pybuild:485: test: plugin pyproject failed with: exit code=5: cd /tmp/autopkgtest.spiuJG/autopkgtest_tmp/build; python3.14 -m pytest
pybuild-autopkgtest: error: pybuild --autopkgtest --test-pytest -i python{version} -p 3.14 --parallel= returned exit code 13
make: *** [/tmp/hssxY92bd5/run:4: pybuild-autopkgtest] Error 25
pybuild-autopkgtest: error: /tmp/hssxY92bd5/run pybuild-autopkgtest returned exit code 2
autopkgtest [16:31:50]: test pybuild-autopkgtest: -----------------------]
autopkgtest [16:31:51]: test pybuild-autopkgtest:  - - - - - - - - - - results - - - - - - - - - -
pybuild-autopkgtest  FAIL non-zero exit status 25
autopkgtest [16:31:51]:  - - - - - - - - - - running shell - - - - - - - - - -

# ls -l /tmp/autopkgtest.spiuJG/autopkgtest_tmp/build/
total 8
-rw-r--r-- 1 unshare users 1155 Oct 11 05:31 pyproject.toml
-rw-r--r-- 1 unshare users  584 Oct 11 05:31 pytest.ini
#
=====

-- 
 \        “Members of the general public commonly find copyright rules |
  `\        implausible, and simply disbelieve them.” —Jessica Litman, |
_o__)                                              _Digital Copyright_ |
Ben Finney
Technical Details
Message-ID: <NNcoN-4YEM-1@gated-at.bofh.it>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!news.corradoroberto.it!bofh.it!news.nic.it!robomod

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!news.corradoroberto.it!bofh.it!news.nic.it!robomod
From: Ben Finney <bignose@debian.org>
Newsgroups: linux.debian.maint.python
Subject: AutoPkgTest fails to copy the Python files to test environment
Date: Mon, 12 Oct 2026 02:50:01 +0200
Message-ID: <NNcoN-4YEM-1@gated-at.bofh.it>
X-Original-To: debian-python@lists.debian.org
X-Mailbox-Line: From debian-python-request@lists.debian.org  Mon Oct 12 00:44:51 2026
Old-Return-Path: <debian-python@m.gmane-mx.org>
X-Amavis-Spam-Status: No, score=-1.651 tagged_above=-10000 required=5.3
 tests=[BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.249]
 autolearn=no autolearn_force=no
X-Policyd-Weight: using cached result; rate: -4.6
X-Injected-Via-Gmane: http://gmane.org/
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
User-Agent: Gnus/5.13 (Gnus v5.13)
Cancel-Lock: sha1:9H/yRdl1AgZSVRjiQ11JBGdOGbo=
X-Public-Key-ID: 0xAC128405
X-Public-Key-Fingerprint: 517C F14B B2F3 98B0 CB35  4855 B8B2 4C06 AC12 8405
X-Public-Key-URL: http://www.benfinney.id.au/contact/bfinney-pubkey.asc
X-Post-From: Ben Finney <bignose+hates-spam@benfinney.id.au>
X-Mailing-List: <debian-python@lists.debian.org> archive/latest/24120
List-ID: <debian-python.lists.debian.org>
List-URL: <https://lists.debian.org/debian-python/>
List-Archive: https://lists.debian.org/msgid-search/875wz7u4rc.fsf@benfinney.id.au
Approved: robomod@news.nic.it
Lines: 108
Organization: linux.* mail to news gateway
Sender: robomod@news.nic.it
X-Original-Date: Mon, 12 Oct 2026 11:44:23 +1100
X-Original-Message-ID: <875wz7u4rc.fsf@benfinney.id.au>