subway setup.py failure
I'm getting this strangness from the subway setup script. Installed C:\Python\Lib\site-packages\FormEncode-0.3-py2.4.egg Processing dependencies for FormEncode>=0.2.2 Searching for CherryPy>=2.1.0 Reading http://www.python.org/pypi/CherryPy/ Reading http://www.cherrypy.org Reading http://sourceforge.net/project/showfiles.php?group_id=56099 Best match: CherryPy 2.1.0-rc2 Downloading http://prdownloads.sourceforge.net/cherrypy/CherryPy-2.1.0-rc2.tar.gz?downlo... error: Unexpected HTML page found at http://prdownloads.sourceforge.net/cherrypy/CherryPy-2.1.0-rc2.tar.gz?downlo... It seems that easy_install isn't picking up from SF right now and in addition it hasn't noticed that the latest version is now 2.1.0. I tried a manual installation of the cherrypy as follows C:\Tmp\subway_svn\trunk>\python\Scripts\easy_install "CherryPy==2.1.0" Searching for CherryPy==2.1.0 Reading http://www.python.org/pypi/CherryPy/ Reading http://www.cherrypy.org Reading http://sourceforge.net/project/showfiles.php?group_id=56099 Best match: CherryPy 2.1.0 Downloading http://prdownloads.sourceforge.net/cherrypy/CherryPy-2.1.0.win32.exe?downloa... error: Unexpected HTML page found at http://prdownloads.sourceforge.net/cherrypy/CherryPy-2.1.0.win32.exe?downloa... an it seems I have to try an exact download path to get things right eg C:\Tmp\subway_svn\trunk>\python\Scripts\easy_install http://heanet.dl.sourceforge.net/sourceforge/cherrypy/CherryPy-2.1. 0.tar.gz Downloading http://heanet.dl.sourceforge.net/sourceforge/cherrypy/CherryPy-2.1.0.tar.gz Processing CherryPy-2.1.0.tar.gz Running CherryPy-2.1.0\setup.py -q bdist_egg --dist-dir c:\temp\easy_install-uu1h8w\CherryPy-2.1.0\egg-dist-tmp-jkracy zip_safe flag not set; analyzing archive contents... cherrypy._cphttptools: module references __file__ cherrypy.lib.autoreload: module references __file__ cherrypy.lib.covercp: module references __file__ cherrypy.lib.cptools: module references __file__ cherrypy.lib.profiler: module references __file__ cherrypy.test.test: module references __file__ cherrypy.test.test_core: module references __file__ cherrypy.test.test_static_filter: module references __file__ cherrypy.tutorial.tut09_files: module references __file__ cherrypy.tutorial.tut10_http_errors: module references __file__ Adding CherryPy 2.1.0 to easy-install.pth file Installed C:\Python\Lib\site-packages\CherryPy-2.1.0-py2.4.egg Processing dependencies for CherryPy==2.1.0 -- Robin Becker
Robin Becker wrote:
I'm getting this strangness from the subway setup script.
SourceForge just changed there download pages, I think. After years of non-action, now they change. Blast you SourceForge! -- Ian Bicking / ianb@colorstudy.com / http://blog.ianbicking.org
setuptools thinks that "-something" after a version number means that this is a "patchlevel" version. "2.1.0rc2" would look like a prelease, "2.1.0-rc2" looks like a post-release patch level, and thus appears higher than "2.1.0". We had to explicitly exclude the "-beta" and "-rc" versions. Kevin On 11/16/05, Robin Becker <robin@jessikat.fsnet.co.uk> wrote:
I'm getting this strangness from the subway setup script.
Installed C:\Python\Lib\site-packages\FormEncode-0.3-py2.4.egg Processing dependencies for FormEncode>=0.2.2 Searching for CherryPy>=2.1.0 Reading http://www.python.org/pypi/CherryPy/ Reading http://www.cherrypy.org Reading http://sourceforge.net/project/showfiles.php?group_id=56099 Best match: CherryPy 2.1.0-rc2 Downloading http://prdownloads.sourceforge.net/cherrypy/CherryPy-2.1.0-rc2.tar.gz?downlo... error: Unexpected HTML page found at http://prdownloads.sourceforge.net/cherrypy/CherryPy-2.1.0-rc2.tar.gz?downlo...
It seems that easy_install isn't picking up from SF right now and in addition it hasn't noticed that the latest version is now 2.1.0.
I tried a manual installation of the cherrypy as follows
C:\Tmp\subway_svn\trunk>\python\Scripts\easy_install "CherryPy==2.1.0" Searching for CherryPy==2.1.0 Reading http://www.python.org/pypi/CherryPy/ Reading http://www.cherrypy.org Reading http://sourceforge.net/project/showfiles.php?group_id=56099 Best match: CherryPy 2.1.0 Downloading http://prdownloads.sourceforge.net/cherrypy/CherryPy-2.1.0.win32.exe?downloa... error: Unexpected HTML page found at http://prdownloads.sourceforge.net/cherrypy/CherryPy-2.1.0.win32.exe?downloa...
an it seems I have to try an exact download path to get things right eg
C:\Tmp\subway_svn\trunk>\python\Scripts\easy_install http://heanet.dl.sourceforge.net/sourceforge/cherrypy/CherryPy-2.1. 0.tar.gz Downloading http://heanet.dl.sourceforge.net/sourceforge/cherrypy/CherryPy-2.1.0.tar.gz Processing CherryPy-2.1.0.tar.gz Running CherryPy-2.1.0\setup.py -q bdist_egg --dist-dir c:\temp\easy_install-uu1h8w\CherryPy-2.1.0\egg-dist-tmp-jkracy zip_safe flag not set; analyzing archive contents... cherrypy._cphttptools: module references __file__ cherrypy.lib.autoreload: module references __file__ cherrypy.lib.covercp: module references __file__ cherrypy.lib.cptools: module references __file__ cherrypy.lib.profiler: module references __file__ cherrypy.test.test: module references __file__ cherrypy.test.test_core: module references __file__ cherrypy.test.test_static_filter: module references __file__ cherrypy.tutorial.tut09_files: module references __file__ cherrypy.tutorial.tut10_http_errors: module references __file__ Adding CherryPy 2.1.0 to easy-install.pth file
Installed C:\Python\Lib\site-packages\CherryPy-2.1.0-py2.4.egg Processing dependencies for CherryPy==2.1.0 -- Robin Becker _______________________________________________ Distutils-SIG maillist - Distutils-SIG@python.org http://mail.python.org/mailman/listinfo/distutils-sig
-- Kevin Dangoor Author of the Zesty News RSS newsreader email: kid@blazingthings.com company: http://www.BlazingThings.com blog: http://www.BlueSkyOnMars.com
At 05:55 PM 11/16/2005 +0000, Robin Becker wrote:
I'm getting this strangness from the subway setup script.
Installed C:\Python\Lib\site-packages\FormEncode-0.3-py2.4.egg Processing dependencies for FormEncode>=0.2.2 Searching for CherryPy>=2.1.0 Reading http://www.python.org/pypi/CherryPy/ Reading http://www.cherrypy.org Reading http://sourceforge.net/project/showfiles.php?group_id=56099 Best match: CherryPy 2.1.0-rc2 Downloading http://prdownloads.sourceforge.net/cherrypy/CherryPy-2.1.0-rc2.tar.gz?downlo... error: Unexpected HTML page found at http://prdownloads.sourceforge.net/cherrypy/CherryPy-2.1.0-rc2.tar.gz?downlo...
It seems that easy_install isn't picking up from SF right now and in addition it hasn't noticed that the latest version is now 2.1.0.
Setuptools reads '2.1.0-rc2' as "2.1.0 with patch/branch rc2", not "2.1.0 release candidate 2" (which is spelled '2.1.0rc2' or '2.1.0.rc2'). In other words 2.1.0rc2 < 2.1.0 < 2.1.0-rc2. (The most popular use of '-' in version numbers is to separate a patch level or distro-specific branch/port, and such versions are *after* the version that they amend.) As for the SF issue, the code in setuptools/package_index.py is: # Check for a SourceForge header elif sf_url: if re.search(r'^<HTML><HEAD>', line, re.I): continue # skip first line elif re.search(r'<TITLE>Select a Mirror for File:',line): You can change this as a temporary workaround: # Check for a SourceForge header elif sf_url: if True: I'll try to get a more robust fix out promptly, and I'll try to make it resilient against future skin changes by SourceForge.
At 11:57 AM 11/16/2005 -0600, Ian Bicking wrote:
Robin Becker wrote:
I'm getting this strangness from the subway setup script.
SourceForge just changed there download pages, I think. After years of non-action, now they change. Blast you SourceForge!
Here's a patch that fixes it, and should also be compatible with the old way if they change it back. As you can see, they significantly changed the original page format, and also the HTML syntax of their "use_mirror" URLs. Index: setuptools/package_index.py =================================================================== --- setuptools/package_index.py (revision 41401) +++ setuptools/package_index.py (working copy) @@ -463,16 +463,14 @@ return self._download_svn(url, filename) # Check for a SourceForge header elif sf_url: - if re.search(r'^<HTML><HEAD>', line, re.I): - continue # skip first line - elif re.search(r'<TITLE>Select a Mirror for File:',line): - # Sourceforge mirror page - page = file.read() - file.close() + page = ''.join(list(file)) + if '?use_mirror=' in page: + file.close(); os.unlink(filename) return self._download_sourceforge(url, page, tmpdir) break # not an index page file.close() + os.unlink(filename) raise DistutilsError("Unexpected HTML page found at "+url) def _download_svn(self, url, filename): @@ -490,12 +488,14 @@ def warn(self, msg, *args): log.warn(msg, *args) + + def _download_sourceforge(self, source_url, sf_page, tmpdir): """Download package from randomly-selected SourceForge mirror""" self.debug("Processing SourceForge mirror page") - mirror_regex = re.compile(r'HREF=(/.*?\?use_mirror=[^>]*)') + mirror_regex = re.compile(r'HREF="?(/.*?\?use_mirror=[^">]*)', re.I) urls = [m.group(1) for m in mirror_regex.finditer(sf_page)] if not urls: raise DistutilsError(
participants (4)
-
Ian Bicking -
Kevin Dangoor -
Phillip J. Eby -
Robin Becker