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


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

Re: Compiled bytecode installed, because test suite was run

From Piotr Ożarowski <piotr@debian.org>
Newsgroups linux.debian.maint.python
Subject Re: Compiled bytecode installed, because test suite was run
Date 2016-04-13 11:10 +0200
Message-ID <rnoYa-7qk-7@gated-at.bofh.it> (permalink)
References <rmXEB-pr-3@gated-at.bofh.it> <rn0sP-2QN-21@gated-at.bofh.it> <rnhjX-8w8-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Ben Finney, 2016-04-13]
> Piotr Ożarowski <piotr@debian.org> writes:
> 
> > [Ben Finney, 2016-04-12]
> > > * Pybuild runs the upstream test suite
> > > * which imports the Python packages
> > > * which creates the compiled bytecode files
> > > * which remain in the package directories
> > > * which are scooped up by Pybuild for installation
> >
> > * which should be removed by dh_python3
> 
> How does ‘dh_python3’ know to do that? Are there settings I should look
> at to tell ‘dh_python3’ what to do when it misses some files?

dh_python3 is checking dist-packages and few private dirs by default,
see "private dirs" section in dh_python3.1

> > > * which leads to Lintian correctly complaining
> > >   “package-installs-python-pycache-dir”.
> > > 
> > > How do I convince Pybuild to run the tests as part of the package build
> > > (as normal), but clean up the compiled files *after* the tests and
> > > *before* gathering the installed files?
> >
> > does your package name start with python3- or do you have
> > ${python3:Depends} in Depends?
> 
> The problem is no longer occurring, because I have tweaked some of the
> directories and package names around.
> 
> One complication may have been that the directory name to which the
> library was installed (with the “--install-lib” option) does not contain
> the Debian package name.
> 
> When I change that, it works; I don't know why.
> 
> The documentation for ‘PYBUILD_NAME’ and ‘PYBUILD_DESTDIR’ don't help me
> to understand what is happening when things go wrong. The latter,
> especially, makes no sense to me and the man page doesn't help me know
> what effect setting that variable will have.

PYBUILD_NAME and PYBUILD_DESTDIR are pybuild related, dh_python3 doesn't
use them. By changing --install-lib you modified destination directory
anyway (and you should point dh_python3 to the same dir - it doesn't
know about pybuild's existence)

That said, removing __pycache__ everywhere is harmless and dh_python3
should remove it even if you don't tell it to check given dir. I will
change that.
-- 
Piotr Ożarowski                         Debian GNU/Linux Developer
www.ozarowski.pl          www.griffith.cc           www.debian.org
GPG Fingerprint: 1D2F A898 58DA AF62 1786 2DF7 AEF6 F1A2 A745 7645

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


Thread

Compiled bytecode installed, because test suite was run Ben Finney <ben+debian@benfinney.id.au> - 2016-04-12 06:00 +0200
  Re: Compiled bytecode installed, because test suite was run Piotr Ożarowski <piotr@debian.org> - 2016-04-12 09:00 +0200
    Re: Compiled bytecode installed, because test suite was run Ben Finney <ben+debian@benfinney.id.au> - 2016-04-12 09:40 +0200
      Re: Compiled bytecode installed, because test suite was run Piotr Ożarowski <piotr@debian.org> - 2016-04-12 10:00 +0200
    Re: Compiled bytecode installed, because test suite was run Ben Finney <ben+debian@benfinney.id.au> - 2016-04-13 03:00 +0200
      Re: Compiled bytecode installed, because test suite was run Piotr Ożarowski <piotr@debian.org> - 2016-04-13 11:10 +0200
        Re: Compiled bytecode installed, because test suite was run Piotr Ożarowski <piotr@debian.org> - 2016-04-13 11:50 +0200
        Re: Compiled bytecode installed, because test suite was run Ben Finney <ben+debian@benfinney.id.au> - 2016-04-13 12:50 +0200
          Re: Compiled bytecode installed, because test suite was run Piotr Ożarowski <piotr@debian.org> - 2016-04-13 14:00 +0200

csiph-web