-- cgit v1.2.1 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(-) 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.1 From 17cf6313ef57d7b4316f827a9b7855eedbccb105 Mon Sep 17 00:00:00 2001 From: Philip Thiem Date: Wed, 16 Apr 2014 19:06:47 -0500 Subject: Fixes Issue #185: Svn not working on new style svn metadata. --HG-- branch : develop extra : rebase_source : 07c28db844959df06d385e21bc62c8d05c729dba --- CHANGES.txt | 7 +++++++ setuptools.egg-info/entry_points.txt | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 3df68933..5a2b17ae 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -40,6 +40,13 @@ CHANGES * Issue #192: Preferred bootstrap location is now https://bootstrap.pypa.io/ez_setup.py (mirrored from former location). +----- +3.4.5 +----- + +* Issue #185: Applied patch and added regression tests for making + svn tagging work on the new style SVN metadata. + ----- 3.4.4 ----- diff --git a/setuptools.egg-info/entry_points.txt b/setuptools.egg-info/entry_points.txt index de842da8..c345395d 100644 --- a/setuptools.egg-info/entry_points.txt +++ b/setuptools.egg-info/entry_points.txt @@ -1,6 +1,6 @@ [console_scripts] easy_install = setuptools.command.easy_install:main -easy_install-3.4 = setuptools.command.easy_install:main +easy_install-3.3 = setuptools.command.easy_install:main [distutils.commands] alias = setuptools.command.alias:alias -- cgit v1.2.1 From c147c6789efe24bf54e20d5644aa338bd532adb7 Mon Sep 17 00:00:00 2001 From: Philip Thiem Date: Wed, 23 Apr 2014 18:29:43 -0500 Subject: Add Regression Tests for svn tagging. --HG-- branch : develop extra : rebase_source : a05d5f844416113562066786c697170ed85c48fd --- setuptools/tests/test_egg_info.py | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index 27854366..4c41a2cc 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -138,6 +138,43 @@ class TestSvnDummy(environment.ZippedEnvironment): return data + @skipIf(not test_svn._svn_check, "No SVN to text, in the first place") + def test_svn_tags(self): + code, data = environment.run_setup_py(["egg_info", + "--tag-svn-revision"], + pypath=self.old_cwd, + data_stream=1) + if code: + raise AssertionError(data) + + pkginfo = os.path.join('dummy.egg-info', 'PKG-INFO') + infile = open(pkginfo, 'r') + try: + read_contents = infile.readlines() + finally: + infile.close() + del infile + + self.assertIn("Version: 0.1.1-r1\n", read_contents) + + @skipIf(not test_svn._svn_check, "No SVN to text, in the first place") + def test_no_tags(self): + code, data = environment.run_setup_py(["egg_info"], + pypath=self.old_cwd, + data_stream=1) + if code: + raise AssertionError(data) + + pkginfo = os.path.join('dummy.egg-info', 'PKG-INFO') + infile = open(pkginfo, 'r') + try: + read_contents = infile.readlines() + finally: + infile.close() + del infile + + self.assertIn("Version: 0.1.1\n", read_contents) + class TestSvnDummyLegacy(environment.ZippedEnvironment): -- cgit v1.2.1 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 --- CHANGES.txt | 2 ++ setuptools/command/egg_info.py | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 5a2b17ae..73569cc9 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -46,6 +46,8 @@ CHANGES * Issue #185: Applied patch and added regression tests for making svn tagging work on the new style SVN metadata. +* Prune revision control directories (e.g .svn) from base path + as well as subfolders. ----- 3.4.4 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.1 From c1d08d7441c9fc059241232eb7323d2a90d12b6e Mon Sep 17 00:00:00 2001 From: Philip Thiem Date: Sat, 17 May 2014 16:12:20 -0500 Subject: PY26 doesn't have assertIn --HG-- branch : develop extra : rebase_source : a891af85b68115431db3fe42acf5a102e02aa8b9 --- setuptools/tests/test_egg_info.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index 4c41a2cc..7531e37c 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -155,7 +155,7 @@ class TestSvnDummy(environment.ZippedEnvironment): infile.close() del infile - self.assertIn("Version: 0.1.1-r1\n", read_contents) + self.assertTrue("Version: 0.1.1-r1\n" in read_contents) @skipIf(not test_svn._svn_check, "No SVN to text, in the first place") def test_no_tags(self): @@ -173,7 +173,7 @@ class TestSvnDummy(environment.ZippedEnvironment): infile.close() del infile - self.assertIn("Version: 0.1.1\n", read_contents) + self.assertTrue("Version: 0.1.1\n" in read_contents) class TestSvnDummyLegacy(environment.ZippedEnvironment): -- cgit v1.2.1 From 0b70ebffe2c8cacc4c229c21286e74d0d2ebbd65 Mon Sep 17 00:00:00 2001 From: Philip Thiem Date: Sat, 31 May 2014 09:42:49 -0500 Subject: Moved the additions to the change file up, after rebasing. --HG-- branch : develop --- CHANGES.txt | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 73569cc9..ebc13373 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,15 @@ CHANGES ======= +----- +3.7.? +----- + +* Issue #185: Make svn tagging work on the new style SVN metadata. + Thanks cazabon! +* Prune revision control directories (e.g .svn) from base path + as well as sub-directories. + --- 3.7 --- @@ -40,15 +49,6 @@ CHANGES * Issue #192: Preferred bootstrap location is now https://bootstrap.pypa.io/ez_setup.py (mirrored from former location). ------ -3.4.5 ------ - -* Issue #185: Applied patch and added regression tests for making - svn tagging work on the new style SVN metadata. -* Prune revision control directories (e.g .svn) from base path - as well as subfolders. - ----- 3.4.4 ----- -- cgit v1.2.1