rpms/python-setuptools/devel distribute-b045d0750c13.diff, NONE, 1.1 python-setuptools.spec, 1.38, 1.39

Toshio くらとみ toshio at fedoraproject.org
Sat Jul 3 18:58:02 UTC 2010


Author: toshio

Update of /cvs/pkgs/rpms/python-setuptools/devel
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv24536

Modified Files:
	python-setuptools.spec 
Added Files:
	distribute-b045d0750c13.diff 
Log Message:

* Sat Jul 3 2010 Toshio Kuratomi <toshio at fedoraproject.org> - 0.6.13-5
- Upstream patch for compatibility problem with setuptools
- Minor spec cleanups
- Provide python-distribute for those who see an import distribute and need
  to get the proper package.


distribute-b045d0750c13.diff:
 command/easy_install.py |    3 ++-
 package_index.py        |   15 +++++++++++----
 2 files changed, 13 insertions(+), 5 deletions(-)

--- NEW FILE distribute-b045d0750c13.diff ---
# HG changeset patch -- Bitbucket.org
# Project distribute
# URL http://bitbucket.org/tarek/distribute/overview
# User David Cournapeau <david at silveregg.co.jp>
# Date 1274351504 -32400
# Node ID b045d0750c13d83ef577593b8bb267a10e803aca
# Parent  ab666b0eacbb5523ffb42a412451550f55347fcc
BUG: Fix #142 - easy_install ignore locally installed packages.

Backport from setuptools 0.6c10.

--- a/setuptools/command/easy_install.py
+++ b/setuptools/command/easy_install.py
@@ -565,7 +565,8 @@ Please make the appropriate changes for 
 
             self.check_editable(spec)
             dist = self.package_index.fetch_distribution(
-                spec, tmpdir, self.upgrade, self.editable, not self.always_copy
+                spec, tmpdir, self.upgrade, self.editable, not self.always_copy,
+                self.local_index
             )
 
             if dist is None:

--- a/setuptools/package_index.py
+++ b/setuptools/package_index.py
@@ -418,7 +418,8 @@ class PackageIndex(Environment):
 
 
     def fetch_distribution(self,
-        requirement, tmpdir, force_scan=False, source=False, develop_ok=False
+        requirement, tmpdir, force_scan=False, source=False, develop_ok=False,
+        local_index=None
     ):
         """Obtain a distribution suitable for fulfilling `requirement`
 
@@ -440,11 +441,14 @@ class PackageIndex(Environment):
         # process a Requirement
         self.info("Searching for %s", requirement)
         skipped = {}
+        dist = None
 
-        def find(req):
+        def find(req, env=None):
+            if env is None:
+                env = self
             # Find a matching distribution; may be called more than once
 
-            for dist in self[req.key]:
+            for dist in env[req.key]:
 
                 if dist.precedence==DEVELOP_DIST and not develop_ok:
                     if dist not in skipped:
@@ -461,8 +465,11 @@ class PackageIndex(Environment):
         if force_scan:
             self.prescan()
             self.find_packages(requirement)
+            dist = find(requirement)
 
-        dist = find(requirement)
+        if local_index is not None:
+            dist = dist or find(requirement, local_index)
+
         if dist is None and self.to_scan is not None:
             self.prescan()
             dist = find(requirement)


Index: python-setuptools.spec
===================================================================
RCS file: /cvs/pkgs/rpms/python-setuptools/devel/python-setuptools.spec,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -p -r1.38 -r1.39
--- python-setuptools.spec	11 Jun 2010 03:52:18 -0000	1.38
+++ python-setuptools.spec	3 Jul 2010 18:58:02 -0000	1.39
@@ -8,7 +8,7 @@
 
 Name:           python-setuptools
 Version:        0.6.13
-Release:        4%{?dist}
+Release:        5%{?dist}
 Summary:        Easily build and distribute Python packages
 
 Group:          Applications/System
@@ -19,6 +19,7 @@ Source1:        psfl.txt
 Source2:        zpl.txt
 Patch0:         distribute-0.6.13-tests.patch
 Patch1:         distribute-tests-race.patch
+Patch2:         http://bitbucket.org/tarek/distribute/changeset/b045d0750c13/raw/distribute-b045d0750c13.diff
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildArch:      noarch
@@ -32,6 +33,9 @@ BuildRequires:  python3-devel
 Provides: python-setuptools-devel = %{version}-%{release}
 Obsoletes: python-setuptools-devel < 0.6.7-1
 
+# Provide this since some people will request distribute by name
+Provides: python-distribute = %{version}-%{release}
+
 %description
 Setuptools is a collection of enhancements to the Python distutils that allow
 you to more easily build and distribute Python packages, especially ones that
@@ -58,8 +62,10 @@ execute the software that requires pkg_r
 %setup -q -n %{srcname}-%{version}
 %patch0 -p1
 %patch1 -p1
+%patch2 -p1
 
 find -name '*.txt' | xargs chmod -x
+find . -name '*.orig' -exec rm \{\} \;
 
 %if 0%{?with_python3}
 rm -rf %{pyver}
@@ -119,7 +125,7 @@ rm -rf %{buildroot}
 
 %files
 %defattr(-,root,root,-)
-%doc psfl.txt zpl.txt docs
+%doc *.txt docs
 %{python_sitelib}/*
 %{_bindir}/easy_install
 %{_bindir}/easy_install-2.6
@@ -133,6 +139,12 @@ rm -rf %{buildroot}
 %endif # with_python3
 
 %changelog
+* Sat Jul 3 2010 Toshio Kuratomi <toshio at fedoraproject.org> - 0.6.13-5
+- Upstream patch for compatibility problem with setuptools
+- Minor spec cleanups
+- Provide python-distribute for those who see an import distribute and need
+  to get the proper package.
+
 * Thu Jun 10 2010 Toshio Kuratomi <toshio at fedoraproject.org> - 0.6.13-4
 - Fix race condition in unittests under the python-2.6.x on F-14.
 



More information about the scm-commits mailing list