- Provide easy-install with update-alternatives code to not conflict
with python3 variant OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python2-setuptools?expand=0&rev=7
This commit is contained in:
parent
6ec3ec6e09
commit
a84c871fb3
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Apr 7 08:39:25 UTC 2020 - Tomáš Chvátal <tchvatal@suse.com>
|
||||
|
||||
- Provide easy-install with update-alternatives code to not conflict
|
||||
with python3 variant
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Apr 6 17:12:04 UTC 2020 - Matej Cepl <mcepl@suse.com>
|
||||
|
||||
|
@ -26,15 +26,18 @@ Source: https://files.pythonhosted.org/packages/source/s/setuptools/setu
|
||||
Patch0: sort-for-reproducibility.patch
|
||||
Patch1: importlib.patch
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
BuildRequires: python2-base
|
||||
BuildRequires: unzip
|
||||
Requires: python2-base
|
||||
BuildArch: noarch
|
||||
# The dependency download feature may require SSL, which is in python3-base and python(2)
|
||||
Requires: python
|
||||
Requires: python2
|
||||
Requires: python2-base
|
||||
Requires(post): update-alternatives
|
||||
Requires(postun): update-alternatives
|
||||
Recommends: ca-certificates-mozilla
|
||||
Provides: python-distribute = %{version}
|
||||
Obsoletes: python-distribute < %{version}
|
||||
BuildArch: noarch
|
||||
|
||||
%description
|
||||
setuptools is a collection of enhancements to the Python distutils that
|
||||
@ -50,16 +53,23 @@ sed -r -i '1s@^#!/.*$@@' setuptools/command/easy_install.py \
|
||||
pkg_resources/_vendor/appdirs.py
|
||||
|
||||
%build
|
||||
python2 setup.py build '--executable=%{_bindir}/python2 -s'
|
||||
%python2_build
|
||||
|
||||
%install
|
||||
python2 setup.py install -O1 --skip-build --force --root %{buildroot} --prefix %{_prefix}
|
||||
%python2_install
|
||||
%prepare_alternative easy_install
|
||||
%fdupes %{buildroot}%{python2_sitelib}
|
||||
|
||||
%post
|
||||
%python_install_alternative easy_install
|
||||
|
||||
%postun
|
||||
%python_uninstall_alternative easy_install
|
||||
|
||||
%files
|
||||
%license LICENSE
|
||||
%doc CHANGES.rst README.rst
|
||||
%{_bindir}/easy_install*
|
||||
%python_alternative %{_bindir}/easy_install
|
||||
%{python2_sitelib}/setuptools
|
||||
%{python2_sitelib}/setuptools-%{version}-py*.egg-info
|
||||
%{python2_sitelib}/easy_install.py*
|
||||
|
Loading…
Reference in New Issue
Block a user