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


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

Re: Installing data files with pybuild

Path csiph.com!newsfeed.xs4all.nl!newsfeed8.news.xs4all.nl!bofh.it!news.nic.it!robomod
From Julian Gilbey <jdg@debian.org>
Newsgroups linux.debian.maint.python
Subject Re: Installing data files with pybuild
Date Wed, 01 Dec 2021 22:50:01 +0100
Message-ID <DpFEd-7qv-1@gated-at.bofh.it> (permalink)
References <DpBAC-55f-11@gated-at.bofh.it> <DpBAC-55f-9@gated-at.bofh.it> <DpCGn-5Gh-13@gated-at.bofh.it>
X-Original-To debian-python@lists.debian.org
X-Mailbox-Line From debian-python-request@lists.debian.org Wed Dec 1 21:47:57 2021
Old-Return-Path <julian@d-and-j.net>
X-Amavis-Spam-Status No, score=-6.851 tagged_above=-10000 required=5.3 tests=[BAYES_00=-2, DIGITS_LETTERS=1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249, LDO_WHITELIST=-5, MD5_SHA1_SUM=-1] autolearn=ham autolearn_force=no
X-Policyd-Weight using cached result; rate: -4.6
MIME-Version 1.0
Content-Type text/plain; charset=iso-8859-1
Content-Disposition inline
Content-Transfer-Encoding 8bit
X-Mailing-List <debian-python@lists.debian.org> archive/latest/19563
List-ID <debian-python.lists.debian.org>
List-URL <https://lists.debian.org/debian-python/>
List-Archive https://lists.debian.org/msgid-search/YafteuvFyGrLWsxE@d-and-j.net
Approved robomod@news.nic.it
Lines 40
Organization linux.* mail to news gateway
Sender robomod@news.nic.it
X-Original-Date Wed, 1 Dec 2021 21:47:38 +0000
X-Original-Message-ID <YafteuvFyGrLWsxE@d-and-j.net>
X-Original-References <YaepiHhkx254R637@d-and-j.net> <Yaewt26Vn0OJ3Chy@belkar.wrar.name> <3d81d3f5-e425-73be-ec91-797dc1af41f6@debian.org>
Xref csiph.com linux.debian.maint.python:13755

Show key headers only | View raw


On Wed, Dec 01, 2021 at 01:32:38PM -0500, Louis-Philippe Véronneau wrote:
> On 2021-12-01 12 h 28, Andrey Rahmatullin wrote:
> > 
> >> Only the .py files are currently included in the build; what is the
> >> best way to include all of the data files after the build step and
> >> before the test step, and then to ensure they are included in the
> >> final package?
> > Apart from fixing setup.py? execute_after_dh_auto_install I guess.
> 
> Or you can use debian/foobar.install to install the missing files in the
> right location, and keep your d/rules file cleaner :)
> 
> ex. (man dh_install):
> 
> https://sources.debian.org/src/sublime-music/0.11.16-1/debian/sublime-music.install/

Thanks Andrey and Louis-Philippe!

Yes, that might work, though the build-time tests might still fail as
I think they expect these files to be present at test time.  Since
pybuild uses the library pre-installation to perform the build-time
tests, there might be a problem here.

I don't understand why the files are not correctly installed by
setup.py; it has set include_package_data=True, which includes the
files (and file patterns) listed in MANIFEST.in, but it seems that
this is only used for the bdist and sdist targets of setup.py, but not
for the install target.

There is another possibility, which is to use the --after-build
pybuild option or the PYBUILD_AFTER_BUILD environment variable.  There
is a discussion of this in the scikit-image package here:
https://github.com/scikit-image/scikit-image/issues/4366 which links
to the actual code in debian/rules:
https://salsa.debian.org/science-team/scikit-learn/blob/37a7b4eda8b15f514c6d0f6f801c2d67e35e36c7/debian/rules#L77-84
But I was wondering whether there is a "nicer" way to do it.

Thanks!

   Julian

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


Thread

Re: Installing data files with pybuild Andrey Rahmatullin <wrar@debian.org> - 2021-12-01 18:30 +0100
  Re: Installing data files with pybuild Louis-Philippe Véronneau <pollo@debian.org> - 2021-12-01 19:40 +0100
    Re: Installing data files with pybuild Julian Gilbey <jdg@debian.org> - 2021-12-01 22:50 +0100
      Re: Installing data files with pybuild Stefano Rivera <stefanor@debian.org> - 2021-12-02 02:30 +0100

csiph-web