Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
cc70d4aac6 | ||
|
467bbae69b | ||
|
236cb79c73 | ||
|
fa28d41185 | ||
|
8f9ad07a41 |
2
.gitignore
vendored
2
.gitignore
vendored
@ -84,3 +84,5 @@
|
||||
/setuptools-35.0.2.zip
|
||||
/setuptools-36.0.1.zip
|
||||
/setuptools-36.2.0.zip
|
||||
/setuptools-36.5.0.zip
|
||||
/setuptools-37.0.0.zip
|
||||
|
17
create-site-packages.patch
Normal file
17
create-site-packages.patch
Normal file
@ -0,0 +1,17 @@
|
||||
diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py
|
||||
index 91c48b3..0c9b0f4 100755
|
||||
--- a/setuptools/command/easy_install.py
|
||||
+++ b/setuptools/command/easy_install.py
|
||||
@@ -446,6 +446,12 @@ class easy_install(Command):
|
||||
instdir = normalize_path(self.install_dir)
|
||||
pth_file = os.path.join(instdir, 'easy-install.pth')
|
||||
|
||||
+ if not os.path.exists(instdir):
|
||||
+ try:
|
||||
+ os.makedirs(instdir)
|
||||
+ except (OSError, IOError):
|
||||
+ self.cant_write_to_target()
|
||||
+
|
||||
# Is it a configured, PYTHONPATH, implicit, or explicit site dir?
|
||||
is_site_dir = instdir in self.all_site_dirs
|
||||
|
@ -1,5 +1,7 @@
|
||||
%global srcname setuptools
|
||||
|
||||
# WARNING When bootstrapping, disable tests as well,
|
||||
# because tests need pip.
|
||||
# Bootstrapping does not affect the platform-python-setuptools subpackage
|
||||
%bcond_with bootstrap
|
||||
%bcond_without tests
|
||||
@ -29,8 +31,8 @@
|
||||
%endif
|
||||
|
||||
Name: python-setuptools
|
||||
Version: 36.2.0
|
||||
Release: 7%{?dist}
|
||||
Version: 37.0.0
|
||||
Release: 2%{?dist}
|
||||
Summary: Easily build and distribute Python packages
|
||||
|
||||
Group: Applications/System
|
||||
@ -38,9 +40,11 @@ License: MIT
|
||||
URL: https://pypi.python.org/pypi/%{srcname}
|
||||
Source0: https://files.pythonhosted.org/packages/source/s/%{srcname}/%{srcname}-%{version}.zip
|
||||
|
||||
# Run test on a version specific pip: pip3 for Python 3, pip2 for Python 2,
|
||||
# because the other might not be installed
|
||||
Patch0: 0001-Run-test-on-a-version-specific-pip.patch
|
||||
# In Fedora, sudo setup.py install installs to /usr/local/lib/pythonX.Y/site-packages
|
||||
# But pythonX doesn't own that dir, that would be against FHS
|
||||
# We need to create it if it doesn't exist
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1576924
|
||||
Patch0: create-site-packages.patch
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
@ -50,18 +54,24 @@ BuildRequires: python2-devel
|
||||
BuildRequires: python2-pip
|
||||
BuildRequires: python2-wheel
|
||||
%endif # without bootstrap
|
||||
%if %{with test}
|
||||
%if %{with tests}
|
||||
BuildRequires: python2-pip
|
||||
BuildRequires: python2-pytest
|
||||
BuildRequires: python2-mock
|
||||
BuildRequires: python2-backports-unittest_mock
|
||||
BuildRequires: python2-pytest-fixture-config
|
||||
BuildRequires: python2-pytest-virtualenv
|
||||
%endif # with tests
|
||||
%endif # with python2
|
||||
|
||||
%if %{with python3}
|
||||
BuildRequires: python3-devel
|
||||
%if %{with tests}
|
||||
BuildRequires: python3-pip
|
||||
BuildRequires: python3-pytest
|
||||
BuildRequires: python3-mock
|
||||
BuildRequires: python3-pytest-fixture-config
|
||||
BuildRequires: python3-pytest-virtualenv
|
||||
%endif # with tests
|
||||
%if %{without bootstrap}
|
||||
BuildRequires: python3-pip
|
||||
@ -142,9 +152,7 @@ execute the software that requires pkg_resources.py.
|
||||
|
||||
|
||||
%prep
|
||||
%setup -q -n %{srcname}-%{version}
|
||||
|
||||
%patch0 -p1
|
||||
%autosetup -p1 -n %{srcname}-%{version}
|
||||
|
||||
# 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,
|
||||
@ -209,15 +217,16 @@ find %{buildroot}%{platform_python_sitelib} -name '*.exe' | xargs rm -f
|
||||
%if %{without bootstrap}
|
||||
%py3_install_wheel %{python3_wheelname}
|
||||
|
||||
# TODO: we have to remove this by hand now, but it'd be nice if we wouldn't have to
|
||||
# (pip install wheel doesn't overwrite)
|
||||
rm %{buildroot}%{_bindir}/easy_install
|
||||
|
||||
# Remove /usr/bin/easy_install from the record as later on we delete the file
|
||||
sed -i '/\/usr\/bin\/easy_install,/d' %{buildroot}%{python3_record}
|
||||
%else
|
||||
%py3_install
|
||||
%endif
|
||||
|
||||
# TODO: we have to remove this by hand now, but it'd be nice if we wouldn't have to
|
||||
# (pip install wheel doesn't overwrite)
|
||||
rm %{buildroot}%{_bindir}/easy_install
|
||||
|
||||
rm -rf %{buildroot}%{python3_sitelib}/setuptools/tests
|
||||
%if %{without bootstrap}
|
||||
sed -i '/^setuptools\/tests\//d' %{buildroot}%{python3_record}
|
||||
@ -249,16 +258,13 @@ rm -r docs/{Makefile,conf.py,_*}
|
||||
%if %{with tests}
|
||||
%check
|
||||
%if %{with python2}
|
||||
#LANG=en_US.utf8 PYTHONPATH=$(pwd) py.test
|
||||
# see https://github.com/pypa/setuptools/issues/1170 for PYTHONDONTWRITEBYTECODE
|
||||
PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=$(pwd) py.test-%{python2_version}
|
||||
%endif # with python2
|
||||
|
||||
%if %{with python3}
|
||||
LANG=en_US.utf8 PYTHONPATH=$(pwd) py.test-%{python3_version}
|
||||
PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=$(pwd) py.test-%{python3_version}
|
||||
%endif # with python3
|
||||
|
||||
%if %{with platform_python}
|
||||
LANG=en_US.utf8 PYTHONPATH=$(pwd) %{__platform_python} -m pytest
|
||||
%endif # with platform_python
|
||||
%endif # with tests
|
||||
|
||||
|
||||
@ -294,6 +300,16 @@ LANG=en_US.utf8 PYTHONPATH=$(pwd) %{__platform_python} -m pytest
|
||||
|
||||
|
||||
%changelog
|
||||
* Thu Jul 19 2018 Miro Hrončok <mhroncok@redhat.com> - 37.0.0-2
|
||||
- Create /usr/local/lib/pythonX.Y when needed (#1576924)
|
||||
|
||||
* Tue Nov 21 2017 Miro Hrončok <mhroncok@redhat.com> - 37.0.0-1
|
||||
- Update to 37.0.0 (fixes #1474126)
|
||||
- Removed not needed pip3 patch (upstream included different version of fix)
|
||||
|
||||
* Tue Nov 21 2017 Miro Hrončok <mhroncok@redhat.com> - 36.5.0-1
|
||||
- Update to 36.5.0 (related to #1474126)
|
||||
|
||||
* Sun Aug 20 2017 Tomas Orsava <torsava@redhat.com> - 36.2.0-7
|
||||
- Re-enable tests to finish bootstrapping the platform-python stack
|
||||
(https://fedoraproject.org/wiki/Changes/Platform_Python_Stack)
|
||||
|
2
sources
2
sources
@ -1 +1 @@
|
||||
SHA512 (setuptools-36.2.0.zip) = ef199e2140eb32ec3dc224462c408a923b3f7756d39e49b12be5446f109b970513ac17ba9727de5a4e217e04f1a7d62b59065f25f777b28a137adba2cc334136
|
||||
SHA512 (setuptools-37.0.0.zip) = b65072644718602eaabe79e37869505dfeef98c401b35845419aad8bcd20278f40b3bf3e221a93cb126ccf06b366160fee2f0a55da0863ac098be576d5d907c8
|
||||
|
Loading…
Reference in New Issue
Block a user