[Distutils] a package with is a module

Ethan Furman ethan at stoneleaf.us
Mon Oct 27 14:47:45 CET 2014

If there is an answer, tutorial, readme, or docs that would help, a link would be greatly appreciated.

I have finally converted my dbf library to Python3, but I want to also continue supporting at least 2.7, and I see no 
reason to remove the existing library which also supports back to 2.4.

I've never been very happy with the egg format (cool name, but having the source zipped up is irritating when one wants 
to look at it) and so I have left this library as a couple modules: dbf.py, and dbf_test.py.

So I have multiple problems:

   - how do I tell PyPI that this file is for Python2.4 - 2.6, this other file is for 2.7, and this other other file is 
for 3.3+ ?

   - if I have to stick it all in one archive, how do I tell setup.py which to install?

   - is it possible to have all three source files as, say, .txt files, and then have some Python code before the 
setup() call which renames the correct one to dbf.py?  How do I know where the .txt files are at to rename them?

I have skimmed http://python-packaging-user-guide.readthedocs.org/en/latest/, but didn't find what I was looking for there.

Thanks for any help.


More information about the Distutils-SIG mailing list