Try to disable zip_safe bug #1271776

This commit is contained in:
Thomas Spura 2015-11-15 16:29:22 +01:00
parent 6c599ae5ca
commit 9c8c1dc3cb
2 changed files with 18 additions and 1 deletions

View File

@ -27,7 +27,7 @@
Name: python-setuptools
Version: 18.5
Release: 2%{?dist}
Release: 3%{?dist}
Summary: Easily build and distribute Python packages
Group: Applications/System
@ -38,6 +38,7 @@ Source1: psfl.txt
Source2: zpl.txt
# add-setter-for-test_args.patch
Patch1: add-setter-for-test_args.patch
Patch2: setuptools-18.5-disable-zip-safe.patch
BuildArch: noarch
BuildRequires: python2-devel
@ -101,6 +102,7 @@ execute the software that requires pkg_resources.py.
%prep
%setup -q -n %{srcname}-%{version}
%patch1 -p1
%patch2
# We can't remove .egg-info (but it doesn't matter, since it'll be rebuilt):
# The problem is that to properly execute setuptools' setup.py,
@ -210,6 +212,9 @@ popd
%endif # with_python3
%changelog
* Sun Nov 15 2015 Thomas Spura <tomspur@fedoraproject.org> - 18.5-3
- Try to disable zip_safe bug #1271776
* Fri Nov 06 2015 Robert Kuska <rkuska@redhat.com> - 18.5-2
- Add patch so it is possible to set test_args variable

View File

@ -0,0 +1,12 @@
--- ./setuptools/command/bdist_egg.py.orig 2015-11-15 16:25:11.514387679 +0100
+++ ./setuptools/command/bdist_egg.py 2015-11-15 16:25:16.096408293 +0100
@@ -237,6 +237,9 @@
os.unlink(path)
def zip_safe(self):
+ log.warn("Setting zip_safe to False by default on Fedora!"
+ "See: https://bugzilla.redhat.com/show_bug.cgi?id=1271776")
+ return False
safe = getattr(self.distribution, 'zip_safe', None)
if safe is not None:
return safe