Commit 249f870f authored by Jason R. Coombs's avatar Jason R. Coombs

Drop support for 'tag_svn_version' distribution option. Fixes #619.

parent ca8f8ca7
v33.0.0
-------
* #619: Removed support for the ``tag_svn_revision``
distribution option. If Subversion tagging support is
still desired, consider adding the functionality to
setuptools_svn in setuptools_svn #2.
v32.3.1 v32.3.1
------- -------
......
...@@ -156,6 +156,10 @@ link_files = { ...@@ -156,6 +156,10 @@ link_files = {
pattern=r"PEP[- ](?P<pep_number>\d+)", pattern=r"PEP[- ](?P<pep_number>\d+)",
url='https://www.python.org/dev/peps/pep-{pep_number:0>4}/', url='https://www.python.org/dev/peps/pep-{pep_number:0>4}/',
), ),
dict(
pattern=r"setuptools_svn #(?P<setuptools_svn>\d+)",
url='{GH}/jaraco/setuptools_svn/issues/{setuptools_svn}',
),
dict( dict(
pattern=r"^(?m)((?P<scm_version>v?\d+(\.\d+){1,2}))\n[-=]+\n", pattern=r"^(?m)((?P<scm_version>v?\d+(\.\d+){1,2}))\n[-=]+\n",
with_scm="{text}\n{rev[timestamp]:%d %b %Y}\n", with_scm="{text}\n{rev[timestamp]:%d %b %Y}\n",
......
...@@ -32,11 +32,6 @@ from setuptools.glob import glob ...@@ -32,11 +32,6 @@ from setuptools.glob import glob
from pkg_resources.extern import packaging from pkg_resources.extern import packaging
try:
from setuptools_svn import svn_utils
except ImportError:
pass
def translate_pattern(glob): def translate_pattern(glob):
""" """
...@@ -147,7 +142,6 @@ class egg_info(Command): ...@@ -147,7 +142,6 @@ class egg_info(Command):
self.egg_base = None self.egg_base = None
self.egg_info = None self.egg_info = None
self.tag_build = None self.tag_build = None
self.tag_svn_revision = 0
self.tag_date = 0 self.tag_date = 0
self.broken_egg_info = False self.broken_egg_info = False
self.vtags = None self.vtags = None
...@@ -165,7 +159,6 @@ class egg_info(Command): ...@@ -165,7 +159,6 @@ class egg_info(Command):
# when PYTHONHASHSEED=0 # when PYTHONHASHSEED=0
egg_info['tag_build'] = self.tags() egg_info['tag_build'] = self.tags()
egg_info['tag_date'] = 0 egg_info['tag_date'] = 0
egg_info['tag_svn_revision'] = 0
edit_config(filename, dict(egg_info=egg_info)) edit_config(filename, dict(egg_info=egg_info))
def finalize_options(self): def finalize_options(self):
...@@ -282,22 +275,10 @@ class egg_info(Command): ...@@ -282,22 +275,10 @@ class egg_info(Command):
version = '' version = ''
if self.tag_build: if self.tag_build:
version += self.tag_build version += self.tag_build
if self.tag_svn_revision:
warnings.warn(
"tag_svn_revision is deprecated and will not be honored "
"in a future release"
)
version += '-r%s' % self.get_svn_revision()
if self.tag_date: if self.tag_date:
version += time.strftime("-%Y%m%d") version += time.strftime("-%Y%m%d")
return version return version
@staticmethod
def get_svn_revision():
if 'svn_utils' not in globals():
return "0"
return str(svn_utils.SvnInfo.load(os.curdir).get_revision())
def find_sources(self): def find_sources(self):
"""Generate SOURCES.txt manifest file""" """Generate SOURCES.txt manifest file"""
manifest_filename = os.path.join(self.egg_info, "SOURCES.txt") manifest_filename = os.path.join(self.egg_info, "SOURCES.txt")
......
...@@ -88,9 +88,8 @@ class TestEggInfo(object): ...@@ -88,9 +88,8 @@ class TestEggInfo(object):
assert '[egg_info]' in content assert '[egg_info]' in content
assert 'tag_build =' in content assert 'tag_build =' in content
assert 'tag_date = 0' in content assert 'tag_date = 0' in content
assert 'tag_svn_revision = 0' in content
expected_order = 'tag_build', 'tag_date', 'tag_svn_revision' expected_order = 'tag_build', 'tag_date',
self._validate_content_order(content, expected_order) self._validate_content_order(content, expected_order)
...@@ -117,7 +116,6 @@ class TestEggInfo(object): ...@@ -117,7 +116,6 @@ class TestEggInfo(object):
[egg_info] [egg_info]
tag_build = tag_build =
tag_date = 0 tag_date = 0
tag_svn_revision = 0
"""), """),
}) })
dist = Distribution() dist = Distribution()
...@@ -131,9 +129,8 @@ class TestEggInfo(object): ...@@ -131,9 +129,8 @@ class TestEggInfo(object):
assert '[egg_info]' in content assert '[egg_info]' in content
assert 'tag_build =' in content assert 'tag_build =' in content
assert 'tag_date = 0' in content assert 'tag_date = 0' in content
assert 'tag_svn_revision = 0' in content
expected_order = 'tag_build', 'tag_date', 'tag_svn_revision' expected_order = 'tag_build', 'tag_date',
self._validate_content_order(content, expected_order) self._validate_content_order(content, expected_order)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment