mirror of
https://git.centos.org/centos/centpkg.git
synced 2025-02-23 16:22:55 +00:00
Make spec file python2 compatible
This commit is contained in:
parent
ed14055b6d
commit
1e8da7bd1e
1 changed files with 18 additions and 6 deletions
24
centpkg.spec
24
centpkg.spec
|
@ -1,3 +1,13 @@
|
||||||
|
# In order to use unversioned python macros in the spec file, we need to
|
||||||
|
# explicitly define %%__python. It is already defined on el7.
|
||||||
|
%if %{undefined el7}
|
||||||
|
%if %{defined el8}
|
||||||
|
%global __python %{_libexecdir}/platform-python
|
||||||
|
%else
|
||||||
|
%global __python %{python3}
|
||||||
|
%endif
|
||||||
|
%endif
|
||||||
|
|
||||||
Name: centpkg
|
Name: centpkg
|
||||||
Version: %{!?devrel:0.4.6}%{?devrel:0.4.7}
|
Version: %{!?devrel:0.4.6}%{?devrel:0.4.7}
|
||||||
Release: %{?devrel:0.%{devrel}%{?devsnap:.%{devsnap}}.}1%{?dist}
|
Release: %{?devrel:0.%{devrel}%{?devsnap:.%{devsnap}}.}1%{?dist}
|
||||||
|
@ -7,11 +17,12 @@ URL: https://git.centos.org/centos/centpkg
|
||||||
Source0: https://git.centos.org/centos/centpkg/archive/%{version}/centpkg-%{version}.tar.gz
|
Source0: https://git.centos.org/centos/centpkg/archive/%{version}/centpkg-%{version}.tar.gz
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
BuildRequires: python3-devel
|
%if %{defined el7}
|
||||||
%if 0%{?rhel} > 0 && 0%{?rhel} < 8
|
BuildRequires: python-devel
|
||||||
BuildRequires: python-setuptools
|
BuildRequires: python-setuptools
|
||||||
%else
|
%else
|
||||||
BuildRequires: %{py3_dist setuptools}
|
BuildRequires: python3-devel
|
||||||
|
BuildRequires: python3-setuptools
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%description
|
%description
|
||||||
|
@ -31,11 +42,11 @@ Provides the centpkg-sig command for working with dist-git.
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%py3_build
|
%py_build
|
||||||
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%py3_install
|
%py_install
|
||||||
|
|
||||||
|
|
||||||
%files
|
%files
|
||||||
|
@ -43,7 +54,8 @@ Provides the centpkg-sig command for working with dist-git.
|
||||||
%doc README.md
|
%doc README.md
|
||||||
%config(noreplace) %{_sysconfdir}/rpkg/centpkg.conf
|
%config(noreplace) %{_sysconfdir}/rpkg/centpkg.conf
|
||||||
%{_bindir}/%{name}
|
%{_bindir}/%{name}
|
||||||
%{python3_sitelib}/%{name}*
|
%{python_sitelib}/%{name}
|
||||||
|
%{python_sitelib}/%{name}-%{version}-py%{python_version}.egg-info
|
||||||
|
|
||||||
|
|
||||||
%files sig
|
%files sig
|
||||||
|
|
Loading…
Add table
Reference in a new issue