Package name != filename, and: Python version information
Hi, With the following in my setup script: ------------- from distutils.core import setup setup(name = 'Spiff WikiMarkup', [...] requires = ['Plex'], provides = ['WikiMarkup'], [...] ------------- 1. Distutils generates a tarball named "Spiff WikiMarkup-0.1.tar.gz". How can I replace the space in the filename by an underscore? 2. In Python cheese shop, there is a field that shows the Python version that is required by a listed package. I have not found this covered in the documentation: How do you add the Python version information into the setup script of a package? Also, is there a complete keyword list somewhere? This list: http://docs.python.org/dist/meta-data.html seems to contain only few of the keywords available (for example, the "provides" and "requires" keywords are not listed, even though covered in the previous chapters of the documentation). Thanks, -Samuel
At 01:30 PM 2/23/2007 +0100, newsgroups@debain.org wrote:
Hi,
With the following in my setup script:
------------- from distutils.core import setup setup(name = 'Spiff WikiMarkup', [...] requires = ['Plex'], provides = ['WikiMarkup'], [...] -------------
1. Distutils generates a tarball named "Spiff WikiMarkup-0.1.tar.gz". How can I replace the space in the filename by an underscore?
Setuptools fixes this, and various other problems with distribution filenames. Unfortunately, changing this behavior in the distutils would result in backward incompatibilities for people who are relying on its current behavior.
2. In Python cheese shop, there is a field that shows the Python version that is required by a listed package.
I have not found this covered in the documentation: How do you add the Python version information into the setup script of a package?
Also, is there a complete keyword list somewhere? This list:
http://docs.python.org/dist/meta-data.html
seems to contain only few of the keywords available (for example, the "provides" and "requires" keywords are not listed, even though covered in the previous chapters of the documentation).
I don't know the answer to these questions, but perhaps someone else here might.
On Fri, 2007-02-23 at 11:27 -0500, Phillip J. Eby wrote:
Setuptools fixes this, and various other problems with distribution filenames. Unfortunately, changing this behavior in the distutils would result in backward incompatibilities for people who are relying on its current behavior.
Thanks, I was not aware of setuptools. Unfortunately, my script has to run on a hosted server where I can not install this package. Is there any workaround that I could use? -Samuel
At 08:52 AM 2/20/2007 +0100, Samuel Abels wrote:
On Fri, 2007-02-23 at 11:27 -0500, Phillip J. Eby wrote:
Setuptools fixes this, and various other problems with distribution filenames. Unfortunately, changing this behavior in the distutils would result in backward incompatibilities for people who are relying on its current behavior.
Thanks, I was not aware of setuptools.
Unfortunately, my script has to run on a hosted server where I can not install this package.
setuptools can be installed to any PYTHONPATH directory; see: http://peak.telecommunity.com/DevCenter/EasyInstall#custom-installation-loca... Especially the sections on "Creating a Virtual Python" and "Traditional PYTHONPATH-based installation". The "Creating a Virtual Python" may be especially useful to you, as it creates a virtual Python installation that gives you complete access to site-packages and the ability to install whatever packages you want, whether they're setuptools-based or not.
Is there any workaround that I could use?
For the file-naming problem, I don't know of any, no. For the "can't install packages on a hosted server" problem, see the above for a workaround. :)
On Fri, 2007-02-23 at 15:47 -0500, Phillip J. Eby wrote:
setuptools can be installed to any PYTHONPATH directory
Alright, I installed setuptools and it works so far. Except, when I build a package using python2.5 setup.py sdist the filename still contains the space character. Perhaps I missed it in the documentation, but I have not found a way to specify the filename separately from the name. Any hints? -Samuel
At 09:39 AM 2/20/2007 +0100, Samuel Abels wrote:
On Fri, 2007-02-23 at 15:47 -0500, Phillip J. Eby wrote:
setuptools can be installed to any PYTHONPATH directory
Alright, I installed setuptools and it works so far. Except, when I build a package using
python2.5 setup.py sdist
the filename still contains the space character. Perhaps I missed it in the documentation, but I have not found a way to specify the filename separately from the name. Any hints?
Oops. It appears I mis-spoke. For backward-compatibility reasons, setuptools only fixes this filename issue when building eggs, not source distributions. I got confused. Sorry for leading you on a wild-goose chase. :(
On Fri, 2007-02-23 at 16:38 -0500, Phillip J. Eby wrote:
Oops. It appears I mis-spoke. For backward-compatibility reasons, setuptools only fixes this filename issue when building eggs, not source distributions.
I am still unsure; does this mean that there is no way for uploading packages whose name have a space in them to PyPi? -Samuel
At 10:03 AM 2/20/2007 +0100, Samuel Abels wrote:
On Fri, 2007-02-23 at 16:38 -0500, Phillip J. Eby wrote:
Oops. It appears I mis-spoke. For backward-compatibility reasons, setuptools only fixes this filename issue when building eggs, not source distributions.
I am still unsure; does this mean that there is no way for uploading packages whose name have a space in them to PyPi?
Did you try "setup.py sdist upload"? I don't know if PyPI restricts filenames or not. By the way, your mail client seems to think that today is the 20th - you might want to check your clock settings.
On Fri, 2007-02-23 at 16:54 -0500, Phillip J. Eby wrote:
At 10:03 AM 2/20/2007 +0100, Samuel Abels wrote:
On Fri, 2007-02-23 at 16:38 -0500, Phillip J. Eby wrote:
Oops. It appears I mis-spoke. For backward-compatibility reasons, setuptools only fixes this filename issue when building eggs, not source distributions.
I am still unsure; does this mean that there is no way for uploading packages whose name have a space in them to PyPi?
Did you try "setup.py sdist upload"? I don't know if PyPI restricts filenames or not.
Well, the file is made available (with the whitespace character included), but things like the Cheesecake service (and, according to the Cheesecake service, easy_install) won't work. Will there be a way to change the filename in future releases?
By the way, your mail client seems to think that today is the 20th - you might want to check your clock settings.
Sorry, I fixed it. -Samuel
At 11:04 PM 2/23/2007 +0100, Samuel Abels wrote:
At 10:03 AM 2/20/2007 +0100, Samuel Abels wrote:
On Fri, 2007-02-23 at 16:38 -0500, Phillip J. Eby wrote:
Oops. It appears I mis-spoke. For backward-compatibility reasons, setuptools only fixes this filename issue when building eggs, not
On Fri, 2007-02-23 at 16:54 -0500, Phillip J. Eby wrote: source
distributions.
I am still unsure; does this mean that there is no way for uploading packages whose name have a space in them to PyPi?
Did you try "setup.py sdist upload"? I don't know if PyPI restricts filenames or not.
Well, the file is made available (with the whitespace character included), but things like the Cheesecake service (and, according to the Cheesecake service, easy_install) won't work.
Have you actually tried easy_install on it? You will need to include quote marks on your command line, but it should work nonetheless. If that doesn't work, it's an easy_install bug; please send what you typed and the full easy_install output. But if it *does* work, then it's a Cheesecake bug that it says it doesn't work. :)
Will there be a way to change the filename in future releases?
I don't have any plans to do so, no.
On 2/23/07, Phillip J. Eby <pje@telecommunity.com> wrote:
At 11:04 PM 2/23/2007 +0100, Samuel Abels wrote:
Well, the file is made available (with the whitespace character included), but things like the Cheesecake service (and, according to the Cheesecake service, easy_install) won't work.
Have you actually tried easy_install on it? You will need to include quote marks on your command line, but it should work nonetheless. If that doesn't work, it's an easy_install bug; please send what you typed and the full easy_install output. But if it *does* work, then it's a Cheesecake bug that it says it doesn't work. :)
Let me jump in here. $ sudo easy_install -v "Spiff WikiMarkup" error: Not a URL, existing file, or requirement spec: 'Spiff WikiMarkup' $ sudo easy_install -v Spiff\ WikiMarkup error: Not a URL, existing file, or requirement spec: 'Spiff WikiMarkup' $ sudo easy_install -v 'Spiff WikiMarkup' error: Not a URL, existing file, or requirement spec: 'Spiff WikiMarkup' $ sudo easy_install -v Spiff_WikiMarkup Searching for Spiff-WikiMarkup Reading http://cheeseshop.python.org/pypi/Spiff_WikiMarkup/ Reading http://cheeseshop.python.org/pypi/Spiff-WikiMarkup/ Couldn't find index page for 'Spiff_WikiMarkup' (maybe misspelled?) Scanning index of all packages (this may take a while) Reading http://cheeseshop.python.org/pypi/ Reading http://cheeseshop.python.org/pypi/Spiff%20WikiMarkup/0.1 Reading http://code.google.com/p/spiff/ No local packages or download links found for Spiff-WikiMarkup error: Could not find suitable distribution for Requirement.parse('Spiff-WikiMarkup') So it seems to be easy_install bug. And again: easy_install have no --version option. Please fix this. I'm using setuptools-0.6c5. Cheers, mk
participants (4)
-
Michał Kwiatkowski
-
newsgroups@debain.org
-
Phillip J. Eby
-
Samuel Abels