From a7e5648bda737683c4ad220e61c44c1d17b73d87 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 24 Dec 2014 18:25:45 -0500 Subject: Removed svn support from setuptools. Ref #313. --- setuptools/command/sdist.py | 57 --------------------------------------------- 1 file changed, 57 deletions(-) (limited to 'setuptools/command/sdist.py') diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py index a77c39f2..371bf547 100755 --- a/setuptools/command/sdist.py +++ b/setuptools/command/sdist.py @@ -1,12 +1,9 @@ from glob import glob -from distutils.util import convert_path from distutils import log import distutils.command.sdist as orig import os -import re import sys -from setuptools import svn_utils from setuptools.compat import PY3 from setuptools.utils import cs_path_exists @@ -22,60 +19,6 @@ def walk_revctrl(dirname=''): yield item -# TODO will need test case -class re_finder(object): - """ - Finder that locates files based on entries in a file matched by a - regular expression. - """ - - def __init__(self, path, pattern, postproc=lambda x: x): - self.pattern = pattern - self.postproc = postproc - self.entries_path = convert_path(path) - - def _finder(self, dirname, filename): - f = open(filename, 'rU') - try: - data = f.read() - finally: - f.close() - for match in self.pattern.finditer(data): - path = match.group(1) - # postproc was formerly used when the svn finder - # was an re_finder for calling unescape - path = self.postproc(path) - yield svn_utils.joinpath(dirname, path) - - def find(self, dirname=''): - path = svn_utils.joinpath(dirname, self.entries_path) - - if not os.path.isfile(path): - # entries file doesn't exist - return - for path in self._finder(dirname, path): - if os.path.isfile(path): - yield path - elif os.path.isdir(path): - for item in self.find(path): - yield item - - __call__ = find - - -def _default_revctrl(dirname=''): - 'Primary svn_cvs entry point' - for finder in finders: - for item in finder(dirname): - yield item - - -finders = [ - re_finder('CVS/Entries', re.compile(r"^\w?/([^/]+)/", re.M)), - svn_utils.svn_finder, -] - - class sdist(orig.sdist): """Smart sdist that finds anything supported by revision control""" -- cgit v1.2.3 From 314d143ffcc838e1dbf7177b601c139f8d0b609f Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 31 Dec 2014 10:15:10 -0500 Subject: Restore _default_revctrl implementation (stubbed). Fixes #320. --- setuptools/command/sdist.py | 1 + 1 file changed, 1 insertion(+) (limited to 'setuptools/command/sdist.py') diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py index 371bf547..a4e8288a 100755 --- a/setuptools/command/sdist.py +++ b/setuptools/command/sdist.py @@ -11,6 +11,7 @@ import pkg_resources READMES = ('README', 'README.rst', 'README.txt') +_default_revctrl = list def walk_revctrl(dirname=''): """Find all files under revision control""" -- cgit v1.2.3 From 7e6639875e34bd8150a2c430f4d214da9c197e94 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 31 Dec 2014 10:19:25 -0500 Subject: Remove superfluous parentheses --- setuptools/command/sdist.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'setuptools/command/sdist.py') diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py index a4e8288a..3d33df80 100755 --- a/setuptools/command/sdist.py +++ b/setuptools/command/sdist.py @@ -9,7 +9,7 @@ from setuptools.utils import cs_path_exists import pkg_resources -READMES = ('README', 'README.rst', 'README.txt') +READMES = 'README', 'README.rst', 'README.txt' _default_revctrl = list -- cgit v1.2.3