Reputation: 81
When creating a source distribution using setuptools
$ python setup.py sdist
the resulting archive file includes the version number: FooBar-0.0.1.tar.gz
Is there a way to tell setup.py to create a resulting file without the version number: FooBar.tar.gz
?
When the archive then is published to an internal site, it is always possible to do:
$ pip install http://hostname/user/FooBar.tar.gz
The version number is still available inside the archive file. The docs allow a change of file ending/format (zip, tar, etc) but I haven't found a way for setuptools to set the file name without version number.
Outside of setuptools, it can be solved by:
$ mv -v dist/FooBar-* dist/FooBar.tar.gz
assuming there is one file dist/FooBar-*
.
Upvotes: 5
Views: 693
Reputation: 31
My research shows that you can not.
In the source for setuptools you can see the code that makes the source distribution uses self.distribution.get_fullname()
And that code uses the name and version to populate the name.
Upvotes: 3