At 06:53 PM 4/26/2010 +0200, Manlio Perillo wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

P.J. Eby ha scritto:
> At 12:19 PM 4/23/2010 +0200, Manlio Perillo wrote:
>> Hi.
>>
>> In a project test suite I need some external resources, that must be
>> downloaded from internet.
>>
>> Is this directly supported by setuptools, or it is better if I write an
>> additional script that does the job?
>
> If the resources can be accessed in the form of an .egg file (or
> directory) added to sys.path, setuptools can handle it.

The resources are archives that must be downloaded from internet,
decompressed and processed.

Right now I'm using a shell script that must be manually executed.
The data is copied to a test/resources directory.

The test directory contains the test suite and it is in the top level
directory of the Python project. It is not installed on the system by
the setup.py script.

Test functions access the the data using __file__.

I was just wondering if there is a better method.


If you put those resources as package data files or metadata files in another PyPI project, so that they can be installed in .egg form, then setuptools can do it for you, as I described above.

_______________________________________________
Distutils-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/distutils-sig

Reply via email to