disable python2
This commit is contained in:
parent
1a68dcde37
commit
c6d1e48023
25
enable_python3.patch
Normal file
25
enable_python3.patch
Normal file
@ -0,0 +1,25 @@
|
||||
From 5a73b1ed0ececea5ba0a9b6d1003c68ff5c844d3 Mon Sep 17 00:00:00 2001
|
||||
From: fwx913451 <fuanan3@huawei.com>
|
||||
Date: Wed, 28 Oct 2020 11:30:07 +0800
|
||||
Subject: [PATCH] 1
|
||||
|
||||
---
|
||||
Makefile.rhnlib | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Makefile.rhnlib b/Makefile.rhnlib
|
||||
index 03e27d0..e666769 100644
|
||||
--- a/Makefile.rhnlib
|
||||
+++ b/Makefile.rhnlib
|
||||
@@ -1,7 +1,7 @@
|
||||
# Makefile for the rhn modules
|
||||
#
|
||||
|
||||
-PYTHON = /usr/bin/python
|
||||
+PYTHON = /usr/bin/python3
|
||||
|
||||
NAME = rhnlib
|
||||
VERSION = $(call _get_tag,VERSION)
|
||||
--
|
||||
2.27.0
|
||||
|
||||
65
rhnlib.spec
65
rhnlib.spec
@ -1,45 +1,28 @@
|
||||
%global debug_package %{nil}
|
||||
%global build_py3 1
|
||||
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
|
||||
%{!?python3_sitelib: %define python3_sitelib %(%{__python3} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
|
||||
|
||||
Name: rhnlib
|
||||
Version: 2.8.11
|
||||
Release: 3
|
||||
Summary: Python libraries for the Spacewalk project
|
||||
URL: https://github.com/spacewalkproject/spacewalk
|
||||
Source0: https://github.com/spacewalkproject/spacewalk/archive/%{name}-%{version}.tar.gz
|
||||
License: GPLv2
|
||||
|
||||
%{!?python3_sitelib: %define python3_sitelib %(%{__python3} -c "from distutils.sysconfig import get_python3_lib; print get_python3_lib()")}
|
||||
Name: rhnlib
|
||||
Version: 2.8.11
|
||||
Release: 4
|
||||
Summary: Python libraries for the Spacewalk project
|
||||
URL: https://github.com/spacewalkproject/spacewalk
|
||||
Source0: https://github.com/spacewalkproject/spacewalk/archive/%{name}-%{version}.tar.gz
|
||||
Patch0: enable_python3.patch
|
||||
License: GPLv2
|
||||
%description
|
||||
rhnlib is a collection of python modules used by the Spacewalk (http://spacewalk.redhat.com) software.
|
||||
|
||||
%package -n python2-rhnlib
|
||||
Summary: Python libraries for the Spacewalk project
|
||||
BuildRequires: python2-devel
|
||||
Requires: python2-pyOpenSSL
|
||||
Provides: python2-rhnlib = %{version}-%{release}
|
||||
Provides: rhnlib = %{version}-%{release}
|
||||
Obsoletes: rhnlib < %{version}-%{release}
|
||||
%{?python_provide:%python_provide python2-rhnlib}
|
||||
|
||||
Conflicts: rhncfg < 5.10.45 spacewalk-proxy-installer < 1.3.2 rhn-client-tools < 1.3.3
|
||||
Conflicts: rhn-custom-info < 5.4.7 rhnpush < 5.5.10 rhnclient < 0.10 spacewalk-proxy < 1.3.6
|
||||
|
||||
%description -n python2-rhnlib
|
||||
rhnlib is a collection of python modules used by the Spacewalk (http://spacewalk.redhat.com) software.
|
||||
rhnlib is a collection of python3 modules used by the Spacewalk (http://spacewalk.redhat.com) software.
|
||||
|
||||
%if 0%{?build_py3}
|
||||
%package -n python3-rhnlib
|
||||
Summary: Python libraries for the Spacewalk project
|
||||
BuildRequires: python3-devel
|
||||
Requires: python3-pyOpenSSL
|
||||
%{?python_provide:%python_provide python3-rhnlib}
|
||||
Conflicts: rhncfg < 5.10.45 spacewalk-proxy-installer < 1.3.2 rhn-client-tools < 1.3.3
|
||||
Conflicts: rhn-custom-info < 5.4.7 rhnpush < 5.5.10 rhnclient < 0.10 spacewalk-proxy < 1.3.6
|
||||
|
||||
%package -n python3-rhnlib
|
||||
Summary: Python libraries for the Spacewalk project
|
||||
BuildRequires: python3-devel
|
||||
Requires: python3-pyOpenSSL
|
||||
%{?python3_provide:%python3_provide python3-rhnlib}
|
||||
Conflicts: rhncfg < 5.10.45 spacewalk-proxy-installer < 1.3.2 rhn-client-tools < 1.3.3
|
||||
Conflicts: rhn-custom-info < 5.4.7 rhnpush < 5.5.10 rhnclient < 0.10 spacewalk-proxy < 1.3.6
|
||||
%description -n python3-rhnlib
|
||||
rhnlib is a collection of python modules used by the Spacewalk (http://spacewalk.redhat.com) software.
|
||||
rhnlib is a collection of python3 modules used by the Spacewalk (http://spacewalk.redhat.com) software.
|
||||
%endif
|
||||
|
||||
%prep
|
||||
@ -55,21 +38,15 @@ fi
|
||||
make -f Makefile.rhnlib
|
||||
|
||||
%install
|
||||
%{__python} setup.py install -O1 --skip-build --root %{buildroot} --prefix=%{_prefix}
|
||||
%if 0%{?build_py3}
|
||||
%{__python3} setup.py install -O1 --skip-build --root %{buildroot} --prefix=%{_prefix}
|
||||
%endif
|
||||
|
||||
%files -n python2-rhnlib
|
||||
%doc ChangeLog COPYING README TODO
|
||||
%{python_sitelib}/*
|
||||
|
||||
%if 0%{?build_py3}
|
||||
%files -n python3-rhnlib
|
||||
%doc ChangeLog COPYING README TODO
|
||||
%{python3_sitelib}/*
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Wed Oct 28 2020 Anan Fu <fuanan3@huawei.com> - 2.8.11-4
|
||||
- disable python2
|
||||
|
||||
* Fri Nov 22 2019 openEuler Buildteam <buildteam@openeuler.org> - 2.8.11-3
|
||||
- Package init
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user