[TIP] How do you test your setup.py?

Ben Finney ben+python at benfinney.id.au
Thu Jul 16 17:49:44 PDT 2009


Marius Gedminas <marius at gedmin.as> writes:

> I'm not sure if this topic is better raised here or on the distutils
> mailing list.  I'll try here first.

The discussion seems fine for either forum.

> How do you test your source distributions? How do you make sure the
> tarball created by 'python setup.py sdist' is complete and correct?
> 
> My attempt at this … builds the source distribution, unpacks it in a
> temporary directory and tries to build the source distribution again,
> then compares the two tarballs.

I build the source distribution, then use ‘virtualenv’ to install the
package in a Python-insulated environment directory, then run the
complete test suite and report its results. Afterwards the environment
directory can be discarded.

-- 
 \       “First things first, but not necessarily in that order.” —The |
  `\                                              Doctor, _Doctor Who_ |
_o__)                                                                  |
Ben Finney
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.idyll.org/pipermail/testing-in-python/attachments/20090717/57ca495d/attachment.pgp 


More information about the testing-in-python mailing list