Number of Python 3.x packages at the PyPI
"Martin v. Löwis"
martin at v.loewis.de
Mon Dec 8 19:55:43 EST 2008
>> On second thought: can't you just include the source of both versions
>> in a single source distribution file?
>
> The .tar.gz distributions are built by distutils/setuptools. If I
> manually combine them into a single archive
That's not what I'm proposing, though. Assuming you have two different
versions of your package, they should both live next to each other,
in a single root directory, e.g.
foo/
setup.py
bar_2x/
bar_3x/
Then sdist should package it all, through a MANIFEST.in, and
install/bdist/... should package it version-dependent:
if sys.version >= (3,0):
package_dir = {'bar':'bar_3x'}
else:
package_dir = {'bar':'bar_2x'}
setup(...
package=dir = package_dir,
...
)
> I'm guessing that
> 'easy_install appscript' won't know how to read that custom archive
> when building and installing from source. (Which also raises a further
> question: if I do eventually manage to upload both 2.x and 3.x
> versions under the same PyPI entry, will easy_install know which one
> to download?)
See above. Won't this solve these problems? (although I don't know what
the "appscript" command does)
Regards,
Martin
More information about the Python-list
mailing list