Re: [RFH] Running Python tests that require the source to be installed

2024-10-30 Thread Marcus Schäfer
Hi, > On Sat, 2024-10-26 at 11:08 +0200, John Paul Adrian Glaubitz wrote: > > I just realized that this doesn't work because kiwi doesn't have a setup.py > > anymore but just uses pyproject.toml. Do you know how it works in this case? > > OK, I just remove every custom override and let debhelper

Re: [RFH] Running Python tests that require the source to be installed

2024-10-26 Thread Stefano Rivera
Hi John (2024.10.26_08:45:15_+) > > tox tests in Debian package builds are a little different because we use > > --system-site-packages virtualenvs, but they can be a good way to deal > > with this. > > Can you name any package using this mechanism so I can have a look? wheel uses tox tests,

Re: [RFH] Running Python tests that require the source to be installed

2024-10-26 Thread John Paul Adrian Glaubitz
On Sat, 2024-10-26 at 11:08 +0200, John Paul Adrian Glaubitz wrote: > I just realized that this doesn't work because kiwi doesn't have a setup.py > anymore but just uses pyproject.toml. Do you know how it works in this case? OK, I just remove every custom override and let debhelper and pybuild jus

Re: [RFH] Running Python tests that require the source to be installed

2024-10-26 Thread John Paul Adrian Glaubitz
Hi Timo, On Sat, 2024-10-26 at 10:15 +0200, John Paul Adrian Glaubitz wrote: > On Fri, 2024-10-25 at 22:19 +0200, Timo Röhling wrote: > > I ran into this issue with old-style setuptools packages (i.e., > > packages with a setup.py); AFAIK the entry_points mechanism needs > > valid egg-info or di

Re: [RFH] Running Python tests that require the source to be installed

2024-10-26 Thread John Paul Adrian Glaubitz
Hello Stefano, On Sat, 2024-10-26 at 02:45 +, Stefano Rivera wrote: > If it actually needs the .dist-info to be on path (fully installed), you > can try runnig the tests under tox. That's probably what the upstream > does. > > tox tests in Debian package builds are a little different because

Re: [RFH] Running Python tests that require the source to be installed

2024-10-26 Thread John Paul Adrian Glaubitz
Hi Timo, On Fri, 2024-10-25 at 22:19 +0200, Timo Röhling wrote: > I ran into this issue with old-style setuptools packages (i.e., > packages with a setup.py); AFAIK the entry_points mechanism needs > valid egg-info or dist-info metadata in the PYTHONPATH. My > workaround was > > > export PYBU

Re: [RFH] Running Python tests that require the source to be installed

2024-10-25 Thread Stefano Rivera
Hi John (2024.10.24_10:44:45_+) > I am maintaining the package src:kiwi [1] which hasn't been updated in > Debian for some time since upstream has added tests that only work when > the package source is installed into the test environment, i.e. available > through PYTHONPATH. If it actually ne

Re: [RFH] Running Python tests that require the source to be installed

2024-10-25 Thread Timo Röhling
Hi Adrian, * John Paul Adrian Glaubitz * [2024-10-24 13:11]: I had to look it up and the mechanism used is called "entry_points". The kiwi package adds such entry_points and wants to test them in its testsuite. Thus, I need to figure out how to make those entry_points visible from the buil

Re: [RFH] Running Python tests that require the source to be installed

2024-10-25 Thread Andrey Rakhmatullin
On Thu, Oct 24, 2024 at 12:44:45PM +0200, John Paul Adrian Glaubitz wrote: > (Please CC as I'm not subscribed to debian-devel) (this is how I realized this is not debian-python@, consider using that for more relevant coverage) > I am maintaining the package src:kiwi [1] which hasn't been updated

Re: [RFH] Running Python tests that require the source to be installed

2024-10-24 Thread John Paul Adrian Glaubitz
Hi Andrey, thanks a lot for the fast and already helpful reply! On Thu, 2024-10-24 at 16:03 +0500, Andrey Rakhmatullin wrote: > On Thu, Oct 24, 2024 at 12:44:45PM +0200, John Paul Adrian Glaubitz wrote: > > (Please CC as I'm not subscribed to debian-devel) > > (this is how I realized this is not

Re: [RFH] Running Python tests that require the source to be installed

2024-10-24 Thread Sebastiaan Couwenberg
On 10/24/24 1:04 PM, Andrey Rakhmatullin wrote: On Thu, Oct 24, 2024 at 12:57:42PM +0200, Sebastiaan Couwenberg wrote: You may need to copy some additional files there, e.g.: export PYBUILD_BEFORE_TEST=cp -r {dir}/foo {dir}/bar {build_dir} export PYBUILD_AFTER_TEST=rm -rf {build_dir}/foo {b

Re: [RFH] Running Python tests that require the source to be installed

2024-10-24 Thread Andrey Rakhmatullin
On Thu, Oct 24, 2024 at 12:57:42PM +0200, Sebastiaan Couwenberg wrote: > You may need to copy some additional files there, e.g.: > > export PYBUILD_BEFORE_TEST=cp -r {dir}/foo {dir}/bar {build_dir} > export PYBUILD_AFTER_TEST=rm -rf {build_dir}/foo {build_dir}/bar Consider using pybuild.testfie

Re: [RFH] Running Python tests that require the source to be installed

2024-10-24 Thread Sebastiaan Couwenberg
On 10/24/24 12:44 PM, John Paul Adrian Glaubitz wrote: export PYTHONPATH = $(CURDIR) Setting PYTHONPATH to the pybuild build_dir likely works better: export PYTHONPATH=$(shell pybuild --print build_dir -i python3) You may need to copy some additional files there, e.g.: export PYBUILD_BEFOR