[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: When packaging a library, should I prevent its test suite from being packaged



[Konstantin Khomoutov, 2014-09-09]
> This library includes a test suite, in a subdirectory named "tests",
> within its source tree.  This directory gets packaged, installed and
> byte-compiled (by the generated postinst script) during the
> installation.
> 
> Having the test suite packaged along with the code looks like having
> not much sense to me, so should I try to exclude this subdirectory from
> packaging?  Is it considered a bad practice?  I don't have much
> familiarity with Python, let alone packaging its libraries, so I'm not
> sure if removing such files will break the library or not and what
> seasoned Python packagers do in cases like this.

if it is installed  as .../dist-packages/tests, then remove¹ it and
report bug upstream (to move it to pymysql/tests)
(I will remove all .../dist-packages/test{,s} by default in next
dh_python{2,3} version).

If it is installed as .../dist-packages/pymysq/tests and doesn't contain
anything other than .py files, then leave it. It will be useful while
running runtime tests (f.e. in autopkgtest)

[¹] export PYBUILD_AFTER_INSTALL=rm -r {install_dir}/tests

> Please CC me as I'm not subscribed.
-- 
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


Reply to: