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

packaging help request: paths for build_py and build_scripts phases



Hello,

I am attempting to package the latest upstream version of "trash-cli"¹,
which differs quite a lot from the current package on the build side of
things.
https://github.com/andreafrancia/trash-cli

The problem occurs during the post-build test phase. The tests cannot
find the scripts they are trying to test. The build appears to be a
standard python setuptools/distutils thing and the packaging is a
standard dh --with python3 --buildsystem=pybuild. The Build runs

/usr/bin/python3 setup.py build
Which outputs the following (elided)

running build_py
creating /<<PKGBUILDDIR>>/.pybuild/cpython3_3.9/build/trashcli
copying trashcli/fstab.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.9/build/trashcli
...

So for the build_py phase, the destination for copied files is rooted
under <<PKGBUILDDIR>>. The next build phase handles scripts:

running build_scripts
creating build
creating build/scripts-3.9
copying and adjusting trash -> build/scripts-3.9
...

Here, the scripts are copied to a path *not* rooted in <<PKGBUILDDIR>>.
So far as I can tell, both phases are normal parts of the
setuptools/distutils build lifecycle, and I haven't spotted anything
obviously non-standard about the way that is specified.

Where is it that the build_py phase's path are specified or overridden
such that they are correctly rooted under <<PKGBUILDDIR>>, and why isn't
the same true of the build_scripts phase?

I've pushed my WIP packaging to a temporary branch.
https://salsa.debian.org/debian/trash-cli/-/tree/jmtd-update-0.21.7.24
A BTS bug requesting the new version with some back-and-forth trying to
figure this out is
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=988597

Thank you in advance for any tips you can offer!


Best wishes,

--

👱🏻	Jonathan Dowland
✎	 jmtd@debian.org
🔗	https://jmtd.net


Reply to: