From 5208cd6fc27e0459e251a967f432c77556d2bf40 Mon Sep 17 00:00:00 2001 From: Philip Thiem Date: Wed, 16 Apr 2014 18:26:58 -0500 Subject: Applied Patch from cazabon to handle svn tag revisions --HG-- branch : develop extra : rebase_source : 571dac8142fc43b54bcd0302598766b0bb9e13ff --- setuptools/command/egg_info.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'setuptools/command/egg_info.py') diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 9019524d..6bb2ead9 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -168,9 +168,10 @@ class egg_info(Command): version = '' if self.tag_build: version+=self.tag_build - 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_svn_revision: + rev = self.get_svn_revision() + if rev: # is 0 if it's not an svn working copy + version += '-r%s' % rev if self.tag_date: import time version += time.strftime("-%Y%m%d") -- cgit v1.2.3 From d118aae6b768cfdf387aca862e150e7736c7cd71 Mon Sep 17 00:00:00 2001 From: Philip Thiem Date: Wed, 23 Apr 2014 21:54:27 -0500 Subject: Prune paths file list starting with (RCS|CVS|.svn) as well as path with such sub directories. --HG-- branch : develop extra : rebase_source : 2b3326fe668e880b351b0d5f388472239d915d58 --- setuptools/command/egg_info.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'setuptools/command/egg_info.py') diff --git a/setuptools/command/egg_info.py b/setuptools/command/egg_info.py index 6bb2ead9..be326ac2 100755 --- a/setuptools/command/egg_info.py +++ b/setuptools/command/egg_info.py @@ -316,7 +316,8 @@ class manifest_maker(sdist): self.filelist.exclude_pattern(None, prefix=build.build_base) self.filelist.exclude_pattern(None, prefix=base_dir) sep = re.escape(os.sep) - self.filelist.exclude_pattern(sep+r'(RCS|CVS|\.svn)'+sep, is_regex=1) + self.filelist.exclude_pattern(r'(^|'+sep+r')(RCS|CVS|\.svn)'+sep, + is_regex=1) def write_file(filename, contents): -- cgit v1.2.3