Hello Scott, Many thanks for your prompt response. > Yes, this is unfortunately a common packaging problem due to the test > target running before the install target which causes problems for a lot > of Python packages that do additional work during the install step. Ah right. Thanks for the information (for future packaging too). > Anyway, you can fix most of the failures by creating a > debian/pybuild.testfiles file that contains: > intake.egg-info I can confirm that this has indeed fixed most of the tests. > For the console scripts, I don't have any good ideas other than > overriding dh_auto_test and dh_auto_install (so that you run > dh_auto_test *after* dh_auto_install). But you will probably have to > set PATH and PYTHONPATH to include the install directories so that the > console scripts and Python modules can be found. There were only a few non-critical tests that failed, however I managed to fix some of them. With around 300 (if I remember correctly) tests passing, there's enough coverage and I will simply query with upstream later for the couple of minor tests that failed. Thanks again & Kind regards, Shayan Doust On 18/06/2020 22:24, Scott Talbert wrote: > On Thu, 18 Jun 2020, Shayan Doust wrote: > >> I have been having some issues with packaging intake[1] for the Debian >> Med packaging team, specifically during pytest. There are a lot of tests >> failing, so I contacted upstream for a solution. >> >> According to upstream, the "entrypoints in the setup script are not >> being registered when using python3 setup.py build", so I decided to do >> some experimentation. It seems like the entry_points do actually get >> registered and installed, so I experimentally overrode dh_auto_test and >> only triggered dh_auto_test after dh_install (which is also overridden). >> Unfortunately, this has not made any difference and a good hundred unit >> tests fail. >> >> I am new to Python packaging, especially one that features entry points. >> If anyone could please kindly look into the package (and possibly even >> building it), this would be much appreciated. >> >> Kind regards, >> Shayan Doust >> >> [1]: https://salsa.debian.org/med-team/intake > > Yes, this is unfortunately a common packaging problem due to the test > target running before the install target which causes problems for a lot > of Python packages that do additional work during the install step. > > Anyway, you can fix most of the failures by creating a > debian/pybuild.testfiles file that contains: > intake.egg-info > > This causes the egg-info to be copied into the directory used for > testing. This solves the errors related to plugins but not the ones > related to console scripts, since the console script shims don't get > created until 'install' runs. :( > > For the console scripts, I don't have any good ideas other than > overriding dh_auto_test and dh_auto_install (so that you run > dh_auto_test *after* dh_auto_install). But you will probably have to > set PATH and PYTHONPATH to include the install directories so that the > console scripts and Python modules can be found. > > Maybe someone else will have a better idea. > > Scott
Attachment:
0x6D7D441919D02395.asc
Description: application/pgp-keys
Attachment:
signature.asc
Description: OpenPGP digital signature