[packages/python-distribute] - rel 8; fix build with python3.6
arekm
arekm at pld-linux.org
Thu Dec 29 01:03:01 CET 2016
commit 3f9a894005b16b0afef4b0a9e3ad633c269a00f5
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Thu Dec 29 01:02:55 2016 +0100
- rel 8; fix build with python3.6
python-distribute-build.patch | 55 +++++++++++++++++++++++++++++++++++++++++++
python-distribute.spec | 4 +++-
2 files changed, 58 insertions(+), 1 deletion(-)
---
diff --git a/python-distribute.spec b/python-distribute.spec
index 67f3fc0..cba1b92 100644
--- a/python-distribute.spec
+++ b/python-distribute.spec
@@ -8,11 +8,12 @@ Summary: distribute compatibility wrapper for setuptools
Summary(pl.UTF-8): Nakładka na python-setuptools zastępujące distribute
Name: python-distribute
Version: 0.7.3
-Release: 7
+Release: 8
License: PSF or ZPL
Group: Development/Languages/Python
Source0: https://pypi.python.org/packages/source/d/distribute/distribute-%{version}.zip
# Source0-md5: c6c59594a7b180af57af8a0cc0cf5b4a
+Patch0: python-distribute-build.patch
URL: https://pypi.python.org/pypi/distribute
%if %{with python2}
BuildRequires: python-setuptools > 1:7.0
@@ -52,6 +53,7 @@ jest tylko nakładką na współczesne Setuptools.
%prep
%setup -q -n %{pname}-%{version}
+%patch0 -p1
%build
%if %{with python2}
diff --git a/python-distribute-build.patch b/python-distribute-build.patch
new file mode 100644
index 0000000..1bb8a8a
--- /dev/null
+++ b/python-distribute-build.patch
@@ -0,0 +1,55 @@
+commit 75d108c95186aef502333c471ab103baa0602871
+Author: Arfrever Frehtes Taifersar Arahesis <Arfrever.FTA at GMail.Com>
+Date: Thu May 28 15:28:22 2015 +0200
+
+ Issue #378: Do not use internal importlib._bootstrap module.
+
+diff --git a/pkg_resources.py b/pkg_resources.py
+index 779bd367..7bb0bdb3 100644
+--- a/pkg_resources.py
++++ b/pkg_resources.py
+@@ -69,9 +69,9 @@ from os.path import isdir, split
+
+ # Avoid try/except due to potential problems with delayed import mechanisms.
+ if sys.version_info >= (3, 3) and sys.implementation.name == "cpython":
+- import importlib._bootstrap as importlib_bootstrap
++ import importlib.machinery as importlib_machinery
+ else:
+- importlib_bootstrap = None
++ importlib_machinery = None
+
+ try:
+ import parser
+@@ -1720,8 +1720,8 @@ class DefaultProvider(EggProvider):
+
+ register_loader_type(type(None), DefaultProvider)
+
+-if importlib_bootstrap is not None:
+- register_loader_type(importlib_bootstrap.SourceFileLoader, DefaultProvider)
++if importlib_machinery is not None:
++ register_loader_type(importlib_machinery.SourceFileLoader, DefaultProvider)
+
+
+ class EmptyProvider(NullProvider):
+@@ -2128,8 +2128,8 @@ def find_on_path(importer, path_item, only=False):
+ break
+ register_finder(pkgutil.ImpImporter, find_on_path)
+
+-if importlib_bootstrap is not None:
+- register_finder(importlib_bootstrap.FileFinder, find_on_path)
++if importlib_machinery is not None:
++ register_finder(importlib_machinery.FileFinder, find_on_path)
+
+ _declare_state('dict', _namespace_handlers={})
+ _declare_state('dict', _namespace_packages={})
+@@ -2237,8 +2237,8 @@ def file_ns_handler(importer, path_item, packageName, module):
+ register_namespace_handler(pkgutil.ImpImporter, file_ns_handler)
+ register_namespace_handler(zipimport.zipimporter, file_ns_handler)
+
+-if importlib_bootstrap is not None:
+- register_namespace_handler(importlib_bootstrap.FileFinder, file_ns_handler)
++if importlib_machinery is not None:
++ register_namespace_handler(importlib_machinery.FileFinder, file_ns_handler)
+
+
+ def null_ns_handler(importer, path_item, packageName, module):
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python-distribute.git/commitdiff/3f9a894005b16b0afef4b0a9e3ad633c269a00f5
More information about the pld-cvs-commit
mailing list