summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPJ Eby <distutils-sig@python.org>2005-09-24 19:44:27 +0000
committerPJ Eby <distutils-sig@python.org>2005-09-24 19:44:27 +0000
commit0ae86e5c56ef3fb2b6ddc1e5ac95b36452ba5104 (patch)
tree869886160566270f4bb014ec780bdbc6c2b501fa
parentb6b29d019d1c33c75ee45fe8846525c75f1ed404 (diff)
downloadpython-setuptools-git-0ae86e5c56ef3fb2b6ddc1e5ac95b36452ba5104.tar.gz
Fix a bug parsing #egg links reported by Ben Bangert on the distutils-sig.
--HG-- branch : setuptools extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041251
-rwxr-xr-xsetuptools.txt7
-rwxr-xr-xsetuptools/package_index.py2
2 files changed, 6 insertions, 3 deletions
diff --git a/setuptools.txt b/setuptools.txt
index ec6f443e..956d84ea 100755
--- a/setuptools.txt
+++ b/setuptools.txt
@@ -1066,8 +1066,11 @@ So, if your ``url`` or ``download_url`` point either directly to a downloadable
source distribution, or to HTML page(s) that have direct links to such, then
EasyInstall will be able to locate downloads automatically. If you want to
make Subversion checkouts available, then you should create links with either
-``#egg=project`` or ``#egg=project-version`` added to the URL (replacing
-``project`` and ``version`` with appropriate values).
+``#egg=project`` or ``#egg=project-version`` added to the URL. You should
+replace ``project`` and ``version`` with the values they would have in an egg
+filename. (Be sure to actually generate an egg and then use the initial part
+of the filename, rather than trying to guess what the escaped form of the
+project name and version number will be.)
Note that Subversion checkout links are of lower precedence than other kinds
of distributions, so EasyInstall will not select a Subversion checkout for
diff --git a/setuptools/package_index.py b/setuptools/package_index.py
index da6cf8cd..f5b322b0 100755
--- a/setuptools/package_index.py
+++ b/setuptools/package_index.py
@@ -6,7 +6,7 @@ from distutils import log
from distutils.errors import DistutilsError
from md5 import md5
-EGG_FRAGMENT = re.compile('^egg=(\\w+(-\\w+)?)$')
+EGG_FRAGMENT = re.compile(r'^egg=([-A-Za-z0-9_.]+)$')
HREF = re.compile("""href\\s*=\\s*['"]?([^'"> ]+)""", re.I)
# this is here to fix emacs' cruddy broken syntax highlighting