diff options
| author | Jason R. Coombs <jaraco@jaraco.com> | 2013-05-04 00:06:18 -0400 |
|---|---|---|
| committer | Jason R. Coombs <jaraco@jaraco.com> | 2013-05-04 00:06:18 -0400 |
| commit | e8dbb411b4c6e282b6848066dcbac3ced6d3a880 (patch) | |
| tree | a907463f6bd7365682a3e7306b864c14f93c780e /setuptools/command/sdist.py | |
| parent | 3b7000ad8a3eba032d4d2654e31ae64c976cb494 (diff) | |
| parent | ff75a6cbdbcde8d9e3b979c30c3d6e64a1bc5374 (diff) | |
| download | python-setuptools-git-e8dbb411b4c6e282b6848066dcbac3ced6d3a880.tar.gz | |
Merge setuptools/command/*
--HG--
branch : Setuptools-Distribute merge
Diffstat (limited to 'setuptools/command/sdist.py')
| -rwxr-xr-x | setuptools/command/sdist.py | 33 |
1 files changed, 12 insertions, 21 deletions
diff --git a/setuptools/command/sdist.py b/setuptools/command/sdist.py index b8c8495e..f8f964b3 100755 --- a/setuptools/command/sdist.py +++ b/setuptools/command/sdist.py @@ -1,6 +1,7 @@ from distutils.command.sdist import sdist as _sdist from distutils.util import convert_path from distutils import log +from glob import glob import os, re, sys, pkg_resources from glob import glob @@ -41,7 +42,6 @@ def joinpath(prefix,suffix): - def walk_revctrl(dirname=''): """Find all files under revision control""" for ep in pkg_resources.iter_entry_points('setuptools.file_finders'): @@ -89,18 +89,22 @@ def entries_finder(dirname, filename): f = open(filename,'rU') data = f.read() f.close() - if data.startswith('10') or data.startswith('9') or data.startswith('8'): + if data.startswith('<?xml'): + for match in entries_pattern.finditer(data): + yield joinpath(dirname,unescape(match.group(1))) + else: + svnver=-1 + try: svnver = int(data.splitlines()[0]) + except: pass + if svnver<8: + log.warn("unrecognized .svn/entries format in %s", os.path.abspath(dirname)) + return for record in map(str.splitlines, data.split('\n\x0c\n')[1:]): # subversion 1.6/1.5/1.4 if not record or len(record)>=6 and record[5]=="delete": continue # skip deleted yield joinpath(dirname, record[0]) - elif data.startswith('<?xml'): - for match in entries_pattern.finditer(data): - yield joinpath(dirname,unescape(match.group(1))) - else: - log.warn("unrecognized .svn/entries format in %s", os.path.abspath(dirname)) - + finders = [ (convert_path('CVS/Entries'), @@ -121,10 +125,6 @@ finders = [ - - - - class sdist(_sdist): """Smart sdist that finds anything supported by revision control""" @@ -301,13 +301,4 @@ class sdist(_sdist): - - - - - - - - - # |
