[Python-checkins] commit of r41474 - in sandbox/trunk/setuptools: . setuptools/command

phillip.eby@python.org phillip.eby at python.org
Fri Nov 18 12:29:50 CET 2005


Author: phillip.eby
Date: Fri Nov 18 12:29:50 2005
New Revision: 41474

Modified:
   sandbox/trunk/setuptools/setuptools.txt
   sandbox/trunk/setuptools/setuptools/command/egg_info.py
Log:
Fixed ``--tag-svn-revision`` not working when run from a source
distribution.


Modified: sandbox/trunk/setuptools/setuptools.txt
==============================================================================
--- sandbox/trunk/setuptools/setuptools.txt	(original)
+++ sandbox/trunk/setuptools/setuptools.txt	Fri Nov 18 12:29:50 2005
@@ -2010,6 +2010,9 @@
    automatically include any package data listed in revision control or
    ``MANIFEST.in``.
 
+ * Fixed ``--tag-svn-revision`` not working when run from a source
+   distribution.
+
 0.6a8
  * Fixed some problems building extensions when Pyrex was installed, especially
    with Python 2.4 and/or packages using SWIG.

Modified: sandbox/trunk/setuptools/setuptools/command/egg_info.py
==============================================================================
--- sandbox/trunk/setuptools/setuptools/command/egg_info.py	(original)
+++ sandbox/trunk/setuptools/setuptools/command/egg_info.py	Fri Nov 18 12:29:50 2005
@@ -133,11 +133,11 @@
         version = self.distribution.get_version()
         if self.tag_build:
             version+=self.tag_build
-        if self.tag_svn_revision and os.path.exists('.svn'):
-            version += '-r%s' % self.get_svn_revision()
+        if self.tag_svn_revision and (
+            os.path.exists('.svn') or os.path.exists('PKG-INFO')
+        ):  version += '-r%s' % self.get_svn_revision()
         if self.tag_date:
-            import time
-            version += time.strftime("-%Y%m%d")
+            import time; version += time.strftime("-%Y%m%d")
         return safe_version(version)
 
     def get_svn_revision(self):


More information about the Python-checkins mailing list