commit
5a7925245c
25
bugfix-eliminate-random-order-in-metadata.patch
Normal file
25
bugfix-eliminate-random-order-in-metadata.patch
Normal file
@ -0,0 +1,25 @@
|
||||
From 99ba862948c27f8851ae2131ff36daee0195ae4a Mon Sep 17 00:00:00 2001
|
||||
From: chengzihan2 <chengzihan1111@163.com>
|
||||
Date: Thu, 4 Jun 2020 17:29:07 +0800
|
||||
Subject: [PATCH] bugfix eliminate random order in metadata
|
||||
|
||||
---
|
||||
setuptools/dist.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/setuptools/dist.py b/setuptools/dist.py
|
||||
index f0f030b..d22e533 100644
|
||||
--- a/setuptools/dist.py
|
||||
+++ b/setuptools/dist.py
|
||||
@@ -194,7 +194,7 @@ def write_pkg_file(self, file):
|
||||
self.long_description_content_type
|
||||
)
|
||||
if self.provides_extras:
|
||||
- for extra in self.provides_extras:
|
||||
+ for extra in sorted(self.provides_extras):
|
||||
write_field('Provides-Extra', extra)
|
||||
|
||||
|
||||
--
|
||||
2.23.0
|
||||
|
||||
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,20 +1,35 @@
|
||||
%bcond_with tests
|
||||
%bcond_without python2
|
||||
|
||||
%if %{with python2}
|
||||
%global python2_record %{python2_sitelib}/setuptools-%{version}.dist-info/RECORD
|
||||
%endif
|
||||
%global python3_record %{python3_sitelib}/setuptools-%{version}.dist-info/RECORD
|
||||
|
||||
%global python_whldir %{_datadir}/python-wheels
|
||||
%global python_whlname setuptools-%{version}-py3-none-any.whl
|
||||
%global python_whlname setuptools-%{version}-py2.py3-none-any.whl
|
||||
|
||||
Name: python-setuptools
|
||||
Version: 49.2.0
|
||||
Version: 41.5.0
|
||||
Release: 1
|
||||
Summary: Easily build and distribute Python packages
|
||||
|
||||
License: MIT and (BSD or ASL 2.0)
|
||||
URL: https://pypi.python.org/pypi/setuptools
|
||||
Source0: %{pypi_source setuptools %{version} zip}
|
||||
Patch0: create-site-packages.patch
|
||||
Patch9000: bugfix-eliminate-random-order-in-metadata.patch
|
||||
|
||||
BuildArch: noarch
|
||||
%if %{with python2}
|
||||
BuildRequires: python2-devel python2
|
||||
BuildRequires: python2-pip, python2-wheel
|
||||
%if %{with tests}
|
||||
BuildRequires: python2-pip
|
||||
BuildRequires: python2-pytest, python2-pytest-fixture-config
|
||||
BuildRequires: python2-pytest-virtualenv
|
||||
%endif
|
||||
%endif
|
||||
|
||||
BuildRequires: python3-devel
|
||||
%if %{with tests}
|
||||
@ -34,6 +49,20 @@ have dependencies on other packages.
|
||||
|
||||
This package contains a python wheel of setuptools to use with venv.
|
||||
|
||||
%if %{with python2}
|
||||
%package -n python2-setuptools
|
||||
Summary: Easily build and distribute Python packages
|
||||
%{?python_provide:%python_provide python2-setuptools}
|
||||
|
||||
%description -n python2-setuptools
|
||||
Setuptools is a collection of enhancements to the Python 2 distutils that allow
|
||||
you to more easily build and distribute Python 2 packages, especially ones that
|
||||
have dependencies on other packages.
|
||||
|
||||
This package also contains the runtime components of setuptools, necessary to
|
||||
execute the software that requires pkg_resources.py.
|
||||
|
||||
%endif
|
||||
|
||||
%package -n python3-setuptools
|
||||
Summary: Easily build and distribute Python 3 packages
|
||||
@ -68,6 +97,12 @@ rm -rf %{buildroot}%{python3_sitelib}/setuptools/tests
|
||||
sed -i '/^setuptools\/tests\//d' %{buildroot}%{python3_record}
|
||||
find %{buildroot}%{python3_sitelib} -name '*.exe' | xargs rm -f
|
||||
|
||||
%if %{with python2}
|
||||
%py2_install_wheel %{python_whlname}
|
||||
rm -rf %{buildroot}%{python2_sitelib}/setuptools/tests
|
||||
sed -i '/^setuptools\/tests\//d' %{buildroot}%{python2_record}
|
||||
find %{buildroot}%{python2_sitelib} -name '*.exe' | xargs rm -f
|
||||
%endif
|
||||
|
||||
rm -r docs/{Makefile,conf.py,_*}
|
||||
mkdir -p %{buildroot}%{python_whldir}
|
||||
@ -75,6 +110,9 @@ install -p dist/%{python_whlname} -t %{buildroot}%{python_whldir}
|
||||
|
||||
%if %{with tests}
|
||||
%check
|
||||
%if %{with python2}
|
||||
PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=$(pwd) py.test-%{python2_version}
|
||||
%endif
|
||||
PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=$(pwd) py.test-%{python3_version} --ignore=setuptools/tests/test_virtualenv.py --ignore=pavement.py
|
||||
%endif
|
||||
|
||||
@ -84,6 +122,13 @@ PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=$(pwd) py.test-%{python3_version} --ignore=
|
||||
%dir %{python_whldir}/
|
||||
%{python_whldir}/%{python_whlname}
|
||||
|
||||
%if %{with python2}
|
||||
%files -n python2-setuptools
|
||||
%defattr(-,root,root)
|
||||
%{_bindir}/easy_install
|
||||
%{_bindir}/easy_install-2.*
|
||||
%{python2_sitelib}/*
|
||||
%endif
|
||||
|
||||
%files -n python3-setuptools
|
||||
%defattr(-,root,root)
|
||||
@ -99,6 +144,9 @@ PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=$(pwd) py.test-%{python3_version} --ignore=
|
||||
|
||||
|
||||
%changelog
|
||||
* Tue Aug 25 2020 wenzhanli<wenzhanli2@huawei.com> - 41.5.0-1
|
||||
- update version and add python2 require
|
||||
|
||||
* Thu Jun 4 2020 chengzihan <chengzihan2@huawei.com> - 41.2.0-3
|
||||
- bugfix eliminate random order in metadata
|
||||
|
||||
|
||||
BIN
setuptools-41.5.0.zip
Normal file
BIN
setuptools-41.5.0.zip
Normal file
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user