- Include data that's needed for running tests
- Update to upstream 0.6.13
This commit is contained in:
parent
1980f05f2a
commit
e09bcce04a
@ -1 +1 @@
|
|||||||
distribute-0.6.10.tar.gz
|
distribute-0.6.13.tar.gz
|
||||||
|
25
distribute-0.6.13-tests.patch
Normal file
25
distribute-0.6.13-tests.patch
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
diff -uNr distribute-0.6.13.pristine/MANIFEST.in distribute-0.6.13/MANIFEST.in
|
||||||
|
--- distribute-0.6.13.pristine/MANIFEST.in 2009-12-28 13:44:40.000000000 -0500
|
||||||
|
+++ distribute-0.6.13/MANIFEST.in 2010-06-10 19:43:39.508527227 -0400
|
||||||
|
@@ -1,5 +1,6 @@
|
||||||
|
recursive-include setuptools *.py *.txt *.exe
|
||||||
|
recursive-include tests *.py *.c *.pyx *.txt
|
||||||
|
+recursive-include setuptools/tests *.html
|
||||||
|
recursive-include docs *.py *.txt *.conf *.css *.css_t Makefile indexsidebar.html
|
||||||
|
include *.py
|
||||||
|
include *.txt
|
||||||
|
diff -uNr distribute-0.6.13.pristine/setuptools/tests/indexes/test_links_priority/external.html distribute-0.6.13/setuptools/tests/indexes/test_links_priority/external.html
|
||||||
|
--- distribute-0.6.13.pristine/setuptools/tests/indexes/test_links_priority/external.html 1969-12-31 19:00:00.000000000 -0500
|
||||||
|
+++ distribute-0.6.13/setuptools/tests/indexes/test_links_priority/external.html 2010-06-10 19:40:53.190527048 -0400
|
||||||
|
@@ -0,0 +1,3 @@
|
||||||
|
+<html><body>
|
||||||
|
+<a href="/foobar-0.1.tar.gz#md5=1__bad_md5___">bad old link</a>
|
||||||
|
+</body></html>
|
||||||
|
diff -uNr distribute-0.6.13.pristine/setuptools/tests/indexes/test_links_priority/simple/foobar/index.html distribute-0.6.13/setuptools/tests/indexes/test_links_priority/simple/foobar/index.html
|
||||||
|
--- distribute-0.6.13.pristine/setuptools/tests/indexes/test_links_priority/simple/foobar/index.html 1969-12-31 19:00:00.000000000 -0500
|
||||||
|
+++ distribute-0.6.13/setuptools/tests/indexes/test_links_priority/simple/foobar/index.html 2010-06-10 19:40:53.187526243 -0400
|
||||||
|
@@ -0,0 +1,4 @@
|
||||||
|
+<html><body>
|
||||||
|
+<a href="/foobar-0.1.tar.gz#md5=0_correct_md5">foobar-0.1.tar.gz</a><br/>
|
||||||
|
+<a href="../../external.html" rel="homepage">external homepage</a><br/>
|
||||||
|
+</body></html>
|
@ -7,8 +7,8 @@
|
|||||||
%global srcname distribute
|
%global srcname distribute
|
||||||
|
|
||||||
Name: python-setuptools
|
Name: python-setuptools
|
||||||
Version: 0.6.10
|
Version: 0.6.13
|
||||||
Release: 3%{?dist}
|
Release: 2%{?dist}
|
||||||
Summary: Easily build and distribute Python packages
|
Summary: Easily build and distribute Python packages
|
||||||
|
|
||||||
Group: Applications/System
|
Group: Applications/System
|
||||||
@ -17,10 +17,11 @@ URL: http://pypi.python.org/pypi/%{srcname}
|
|||||||
Source0: http://pypi.python.org/packages/source/d/%{srcname}/%{srcname}-%{version}.tar.gz
|
Source0: http://pypi.python.org/packages/source/d/%{srcname}/%{srcname}-%{version}.tar.gz
|
||||||
Source1: psfl.txt
|
Source1: psfl.txt
|
||||||
Source2: zpl.txt
|
Source2: zpl.txt
|
||||||
|
Patch0: distribute-0.6.13-tests.patch
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
BuildRequires: python-devel
|
BuildRequires: python2-devel
|
||||||
%if 0%{?with_python3}
|
%if 0%{?with_python3}
|
||||||
BuildRequires: python3-devel
|
BuildRequires: python3-devel
|
||||||
%endif # if with_python3
|
%endif # if with_python3
|
||||||
@ -54,6 +55,8 @@ execute the software that requires pkg_resources.py.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{srcname}-%{version}
|
%setup -q -n %{srcname}-%{version}
|
||||||
|
%patch0 -p1
|
||||||
|
|
||||||
find -name '*.txt' | xargs chmod -x
|
find -name '*.txt' | xargs chmod -x
|
||||||
|
|
||||||
%if 0%{?with_python3}
|
%if 0%{?with_python3}
|
||||||
@ -81,7 +84,7 @@ rm -rf %{buildroot}
|
|||||||
# to be the default for now).
|
# to be the default for now).
|
||||||
%if 0%{?with_python3}
|
%if 0%{?with_python3}
|
||||||
pushd %{py3dir}
|
pushd %{py3dir}
|
||||||
%{__python3} setup.py install --skip-build --root $RPM_BUILD_ROOT
|
%{__python3} setup.py install --skip-build --root %{buildroot}
|
||||||
|
|
||||||
rm -rf %{buildroot}%{python3_sitelib}/setuptools/tests
|
rm -rf %{buildroot}%{python3_sitelib}/setuptools/tests
|
||||||
|
|
||||||
@ -91,7 +94,7 @@ chmod +x %{buildroot}%{python3_sitelib}/setuptools/command/easy_install.py
|
|||||||
popd
|
popd
|
||||||
%endif # with_python3
|
%endif # with_python3
|
||||||
|
|
||||||
%{__python} setup.py install --skip-build --root $RPM_BUILD_ROOT
|
%{__python} setup.py install --skip-build --root %{buildroot}
|
||||||
|
|
||||||
rm -rf ${buildroot}%{python_sitelib}/setuptools/tests
|
rm -rf ${buildroot}%{python_sitelib}/setuptools/tests
|
||||||
|
|
||||||
@ -128,6 +131,13 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%endif # with_python3
|
%endif # with_python3
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Jun 10 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 0.6.13-2
|
||||||
|
- Include data that's needed for running tests
|
||||||
|
|
||||||
|
* Thu Jun 10 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 0.6.13-1
|
||||||
|
- Update to upstream 0.6.13
|
||||||
|
- Minor specfile formatting fixes
|
||||||
|
|
||||||
* Thu Feb 04 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 0.6.10-3
|
* Thu Feb 04 2010 Toshio Kuratomi <toshio@fedoraproject.org> - 0.6.10-3
|
||||||
- First build with python3 support enabled.
|
- First build with python3 support enabled.
|
||||||
|
|
||||||
|
2
sources
2
sources
@ -1 +1 @@
|
|||||||
99fb4b3e4ef0861bba11aa1905e89fed distribute-0.6.10.tar.gz
|
43460b429e86bf0da2bb18574d63ec0c distribute-0.6.13.tar.gz
|
||||||
|
@ -1,217 +0,0 @@
|
|||||||
Index: setuptools/svn_util.py
|
|
||||||
===================================================================
|
|
||||||
--- setuptools/svn_util.py (revision 0)
|
|
||||||
+++ setuptools/svn_util.py (revision 0)
|
|
||||||
@@ -0,0 +1,109 @@
|
|
||||||
+import os
|
|
||||||
+import re
|
|
||||||
+
|
|
||||||
+def get_entries_files(base, recurse=True):
|
|
||||||
+ for base,dirs,files in os.walk(os.curdir):
|
|
||||||
+ if '.svn' not in dirs:
|
|
||||||
+ dirs[:] = []
|
|
||||||
+ continue # no sense walking uncontrolled subdirs
|
|
||||||
+ dirs.remove('.svn')
|
|
||||||
+ f = open(os.path.join(base,'.svn','entries'))
|
|
||||||
+ yield f.read()
|
|
||||||
+ f.close()
|
|
||||||
+
|
|
||||||
+class SVNEntries(object):
|
|
||||||
+ def __init__(self, data):
|
|
||||||
+ self.data = data
|
|
||||||
+
|
|
||||||
+ @classmethod
|
|
||||||
+ def load(class_, base):
|
|
||||||
+ filename = os.path.join(base, '.svn', 'entries')
|
|
||||||
+ f = open(filename)
|
|
||||||
+ result = SVNEntries.read(f)
|
|
||||||
+ f.close()
|
|
||||||
+ return result
|
|
||||||
+
|
|
||||||
+ @classmethod
|
|
||||||
+ def read(class_, file):
|
|
||||||
+ data = file.read()
|
|
||||||
+ is_xml = data.startswith('<?xml')
|
|
||||||
+ class_ = [SVNEntriesText, SVNEntriesXML][is_xml]
|
|
||||||
+ return class_(data)
|
|
||||||
+
|
|
||||||
+ def parse_revision(self):
|
|
||||||
+ all_revs = self.parse_revision_numbers() + [0]
|
|
||||||
+ return max(all_revs)
|
|
||||||
+
|
|
||||||
+class SVNEntriesText(SVNEntries):
|
|
||||||
+ known_svn_versions = {
|
|
||||||
+ '1.4.x': 8,
|
|
||||||
+ '1.5.x': 9,
|
|
||||||
+ '1.6.x': 10,
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ def __get_cached_sections(self):
|
|
||||||
+ return self.sections
|
|
||||||
+
|
|
||||||
+ def get_sections(self):
|
|
||||||
+ SECTION_DIVIDER = '\f\n'
|
|
||||||
+ sections = self.data.split(SECTION_DIVIDER)
|
|
||||||
+ sections = map(str.splitlines, sections)
|
|
||||||
+ try:
|
|
||||||
+ # remove the SVN version number from the first line
|
|
||||||
+ svn_version = int(sections[0].pop(0))
|
|
||||||
+ if not svn_version in self.known_svn_versions.values():
|
|
||||||
+ log.warn("Unknown subversion verson %d", svn_version)
|
|
||||||
+ except ValueError:
|
|
||||||
+ return
|
|
||||||
+ self.sections = sections
|
|
||||||
+ self.get_sections = self.__get_cached_sections
|
|
||||||
+ return self.sections
|
|
||||||
+
|
|
||||||
+ def is_valid(self):
|
|
||||||
+ return bool(self.get_sections())
|
|
||||||
+
|
|
||||||
+ def get_url(self):
|
|
||||||
+ return self.get_sections()[0][4]
|
|
||||||
+
|
|
||||||
+ def parse_revision_numbers(self):
|
|
||||||
+ revision_line_number = 9
|
|
||||||
+ rev_numbers = [
|
|
||||||
+ int(section[revision_line_number])
|
|
||||||
+ for section in self.get_sections()
|
|
||||||
+ if len(section)>revision_line_number
|
|
||||||
+ and section[revision_line_number]
|
|
||||||
+ ]
|
|
||||||
+ return rev_numbers
|
|
||||||
+
|
|
||||||
+ def get_undeleted_records(self):
|
|
||||||
+ undeleted = lambda s: s and s[0] and (len(s) < 6 or s[5] != 'delete')
|
|
||||||
+ result = [
|
|
||||||
+ section[0]
|
|
||||||
+ for section in self.get_sections()
|
|
||||||
+ if undeleted(section)
|
|
||||||
+ ]
|
|
||||||
+ return result
|
|
||||||
+
|
|
||||||
+class SVNEntriesXML(SVNEntries):
|
|
||||||
+ def is_valid(self):
|
|
||||||
+ return True
|
|
||||||
+
|
|
||||||
+ def get_url(self):
|
|
||||||
+ "Get repository URL"
|
|
||||||
+ urlre = re.compile('url="([^"]+)"')
|
|
||||||
+ return urlre.search(self.data).group(1)
|
|
||||||
+
|
|
||||||
+ def parse_revision_numbers(self):
|
|
||||||
+ revre = re.compile('committed-rev="(\d+)"')
|
|
||||||
+ return [
|
|
||||||
+ int(m.group(1))
|
|
||||||
+ for m in revre.finditer(self.data)
|
|
||||||
+ ]
|
|
||||||
+
|
|
||||||
+ def get_undeleted_records(self):
|
|
||||||
+ entries_pattern = re.compile(r'name="([^"]+)"(?![^>]+deleted="true")', re.I)
|
|
||||||
+ results = [
|
|
||||||
+ unescape(match.group(1))
|
|
||||||
+ for match in entries_pattern.finditer(self.data)
|
|
||||||
+ ]
|
|
||||||
+ return results
|
|
||||||
|
|
||||||
Property changes on: setuptools/svn_util.py
|
|
||||||
___________________________________________________________________
|
|
||||||
Name: svn:keywords
|
|
||||||
+ Id Rev Author Date
|
|
||||||
Name: svn:eol-style
|
|
||||||
+ native
|
|
||||||
|
|
||||||
Index: setuptools/command/egg_info.py
|
|
||||||
===================================================================
|
|
||||||
--- setuptools/command/egg_info.py (revision 72970)
|
|
||||||
+++ setuptools/command/egg_info.py (working copy)
|
|
||||||
@@ -8,6 +8,7 @@
|
|
||||||
from distutils.errors import *
|
|
||||||
from distutils import log
|
|
||||||
from setuptools.command.sdist import sdist
|
|
||||||
+from setuptools import svn_util
|
|
||||||
from distutils.util import convert_path
|
|
||||||
from distutils.filelist import FileList
|
|
||||||
from pkg_resources import parse_requirements, safe_name, parse_version, \
|
|
||||||
@@ -205,30 +206,20 @@
|
|
||||||
|
|
||||||
def get_svn_revision(self):
|
|
||||||
revision = 0
|
|
||||||
- urlre = re.compile('url="([^"]+)"')
|
|
||||||
- revre = re.compile('committed-rev="(\d+)"')
|
|
||||||
|
|
||||||
for base,dirs,files in os.walk(os.curdir):
|
|
||||||
if '.svn' not in dirs:
|
|
||||||
dirs[:] = []
|
|
||||||
continue # no sense walking uncontrolled subdirs
|
|
||||||
dirs.remove('.svn')
|
|
||||||
- f = open(os.path.join(base,'.svn','entries'))
|
|
||||||
- data = f.read()
|
|
||||||
- f.close()
|
|
||||||
-
|
|
||||||
- if data.startswith('9') or data.startswith('8'):
|
|
||||||
- data = map(str.splitlines,data.split('\n\x0c\n'))
|
|
||||||
- del data[0][0] # get rid of the '8' or '9'
|
|
||||||
- dirurl = data[0][3]
|
|
||||||
- localrev = max([int(d[9]) for d in data if len(d)>9 and d[9]]+[0])
|
|
||||||
- elif data.startswith('<?xml'):
|
|
||||||
- dirurl = urlre.search(data).group(1) # get repository URL
|
|
||||||
- localrev = max([int(m.group(1)) for m in revre.finditer(data)]+[0])
|
|
||||||
- else:
|
|
||||||
+
|
|
||||||
+ entries = svn_util.SVNEntries.load(base)
|
|
||||||
+ if not entries.is_valid():
|
|
||||||
log.warn("unrecognized .svn/entries format; skipping %s", base)
|
|
||||||
dirs[:] = []
|
|
||||||
continue
|
|
||||||
+ localrev = entries.parse_revision()
|
|
||||||
+ dirurl = entries.get_url()
|
|
||||||
if base==os.curdir:
|
|
||||||
base_url = dirurl+'/' # save the root url
|
|
||||||
elif not dirurl.startswith(base_url):
|
|
||||||
@@ -243,7 +234,6 @@
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
-
|
|
||||||
def find_sources(self):
|
|
||||||
"""Generate SOURCES.txt manifest file"""
|
|
||||||
manifest_filename = os.path.join(self.egg_info,"SOURCES.txt")
|
|
||||||
Index: setuptools/command/sdist.py
|
|
||||||
===================================================================
|
|
||||||
--- setuptools/command/sdist.py (revision 72970)
|
|
||||||
+++ setuptools/command/sdist.py (working copy)
|
|
||||||
@@ -2,6 +2,7 @@
|
|
||||||
from distutils.util import convert_path
|
|
||||||
from distutils import log
|
|
||||||
import os, re, sys, pkg_resources
|
|
||||||
+from setuptools.svn_util import SVNEntries
|
|
||||||
|
|
||||||
entities = [
|
|
||||||
("<","<"), (">", ">"), (""", '"'), ("'", "'"),
|
|
||||||
@@ -80,24 +81,11 @@
|
|
||||||
yield joinpath(dirname, parts[0])
|
|
||||||
|
|
||||||
|
|
||||||
-entries_pattern = re.compile(r'name="([^"]+)"(?![^>]+deleted="true")', re.I)
|
|
||||||
|
|
||||||
def entries_finder(dirname, filename):
|
|
||||||
- f = open(filename,'rU')
|
|
||||||
- data = f.read()
|
|
||||||
- f.close()
|
|
||||||
- if data.startswith('9') or data.startswith('8'): # subversion 1.5/1.4
|
|
||||||
- for record in map(str.splitlines, data.split('\n\x0c\n')[1:]):
|
|
||||||
- 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", dirname)
|
|
||||||
+ for record in SVNEntries.load(dirname).get_undeleted_records():
|
|
||||||
+ yield joinpath(dirname, record)
|
|
||||||
|
|
||||||
-
|
|
||||||
finders = [
|
|
||||||
(convert_path('CVS/Entries'),
|
|
||||||
re_finder(re.compile(r"^\w?/([^/]+)/", re.M))),
|
|
Loading…
Reference in New Issue
Block a user