Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.maint.python > #12665

Re: Issues with packaging intake

From Shayan Doust <hello@shayandoust.me>
Newsgroups linux.debian.maint.python
Subject Re: Issues with packaging intake
Date 2020-06-19 21:50 +0200
Message-ID <Ajvbs-6Pb-3@gated-at.bofh.it> (permalink)
References <Aj8RA-1I7-7@gated-at.bofh.it> <AjagF-2GN-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

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

Back to linux.debian.maint.python | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

Issues with packaging intake Shayan Doust <hello@shayandoust.me> - 2020-06-18 22:00 +0200
  Re: Issues with packaging intake Scott Talbert <swt@techie.net> - 2020-06-18 23:30 +0200
    Re: Issues with packaging intake Shayan Doust <hello@shayandoust.me> - 2020-06-19 21:50 +0200

csiph-web