[Distutils] test resources with setup tools
Manlio Perillo
manlio.perillo at gmail.com
Mon Apr 26 23:59:35 CEST 2010
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
P.J. Eby ha scritto:
> At 08:52 PM 4/26/2010 +0200, Manlio Perillo wrote:
>> However, I would like to put the data in a *sub* project, that is know
>> only to my project setup. Unfortunately this seems to not be possible.
>>
>> Creating a "public" project for this does not feel right, to me.
>
> In that case, why not just ship the data with the source distribution?
>
Because the shell script will download about 24 MB, of images and fonts!
And the data is used only by the test suite.
>
>> Supposing that in the other PyPI project I still want to use a shell
>> script to download and process the data, is it correct to execute the
>> script in the setup.py script, before the setup function is called?
>
> No. Otherwise, this code will run even if somebody tries to do setup.py
> --help or build, say, a source distribution. The only safe way to
> extend a setup script's behavior is by subclassing distutils commnads to
> perform the actions.
>
Ok.
>
>> Since the shell script depends on some executables to be available on
>> the system (wget, tar, bzip2, imagemagick), is there a standard method
>> to check for existence of system executables in the setup?
>
> Distutils has some functions for this sort of thing; I think they're in
> distutils.util.
>
>
Thanks Manlio
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkvWDMcACgkQscQJ24LbaURDDACeNh/Li/kigx+JM7/vONqgyzqk
wRMAn2N2bZprlnUtJ8I8bM7Z3ZqcyO9v
=Ffwu
-----END PGP SIGNATURE-----
More information about the Distutils-SIG
mailing list