Move the __python2/3 macros to the python-srpm-macros subpackage
This facilitates using the %%{__python2/3} in Build/Requires
This commit is contained in:
parent
8f067ff385
commit
beaa2eec4f
@ -1,3 +1,10 @@
|
|||||||
|
# Define the Python interpreter paths in the SRPM macros so that
|
||||||
|
# - they can be used in Build/Requires
|
||||||
|
# - they can be used in non-Python packages where requiring pythonX-devel would
|
||||||
|
# be an overkill
|
||||||
|
%__python2 /usr/bin/python2
|
||||||
|
%__python3 /usr/bin/python3
|
||||||
|
|
||||||
# python3_pkgversion specifies the version of Python 3 in the distro. It can be
|
# python3_pkgversion specifies the version of Python 3 in the distro. It can be
|
||||||
# a specific version (e.g. 34 in Fedora EPEL7)
|
# a specific version (e.g. 34 in Fedora EPEL7)
|
||||||
%python3_pkgversion 3
|
%python3_pkgversion 3
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
%__python2 /usr/bin/python2
|
|
||||||
%python2_sitelib %(%{__python2} -Esc "from distutils.sysconfig import get_python_lib; print(get_python_lib())")
|
%python2_sitelib %(%{__python2} -Esc "from distutils.sysconfig import get_python_lib; print(get_python_lib())")
|
||||||
%python2_sitearch %(%{__python2} -Esc "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")
|
%python2_sitearch %(%{__python2} -Esc "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")
|
||||||
%python2_version %(%{__python2} -Esc "import sys; sys.stdout.write('{0.major}.{0.minor}'.format(sys.version_info))")
|
%python2_version %(%{__python2} -Esc "import sys; sys.stdout.write('{0.major}.{0.minor}'.format(sys.version_info))")
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
%__python3 /usr/bin/python3
|
|
||||||
%python3_sitelib %(%{__python3} -Ic "from distutils.sysconfig import get_python_lib; print(get_python_lib())")
|
%python3_sitelib %(%{__python3} -Ic "from distutils.sysconfig import get_python_lib; print(get_python_lib())")
|
||||||
%python3_sitearch %(%{__python3} -Ic "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")
|
%python3_sitearch %(%{__python3} -Ic "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")
|
||||||
%python3_version %(%{__python3} -Ic "import sys; sys.stdout.write(sys.version[:3])")
|
%python3_version %(%{__python3} -Ic "import sys; sys.stdout.write(sys.version[:3])")
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
Name: python-rpm-macros
|
Name: python-rpm-macros
|
||||||
Version: 3
|
Version: 3
|
||||||
Release: 37%{?dist}
|
Release: 38%{?dist}
|
||||||
Summary: The unversioned Python RPM macros
|
Summary: The unversioned Python RPM macros
|
||||||
|
|
||||||
License: MIT
|
License: MIT
|
||||||
@ -31,6 +31,7 @@ RPM macros for building Python source packages.
|
|||||||
|
|
||||||
%package -n python2-rpm-macros
|
%package -n python2-rpm-macros
|
||||||
Summary: RPM macros for building Python 2 packages
|
Summary: RPM macros for building Python 2 packages
|
||||||
|
Requires: python-srpm-macros >= 3-38
|
||||||
# Would need to be different for each release - worth it?
|
# Would need to be different for each release - worth it?
|
||||||
#Conflicts: python2-devel < 2.7.11-3
|
#Conflicts: python2-devel < 2.7.11-3
|
||||||
|
|
||||||
@ -39,6 +40,7 @@ RPM macros for building Python 2 packages.
|
|||||||
|
|
||||||
%package -n python3-rpm-macros
|
%package -n python3-rpm-macros
|
||||||
Summary: RPM macros for building Python 3 packages
|
Summary: RPM macros for building Python 3 packages
|
||||||
|
Requires: python-srpm-macros >= 3-38
|
||||||
# Would need to be different for each release - worth it?
|
# Would need to be different for each release - worth it?
|
||||||
#Conflicts: python3-devel < 3.5.1-3
|
#Conflicts: python3-devel < 3.5.1-3
|
||||||
|
|
||||||
@ -71,6 +73,10 @@ install -m 644 %{SOURCE0} %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} \
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Sep 20 2018 Tomas Orsava <torsava@redhat.com> - 3-38
|
||||||
|
- Move the __python2/3 macros to the python-srpm-macros subpackage
|
||||||
|
- This facilitates using the %%{__python2/3} in Build/Requires
|
||||||
|
|
||||||
* Wed Aug 15 2018 Miro Hrončok <mhroncok@redhat.com> - 3-37
|
* Wed Aug 15 2018 Miro Hrončok <mhroncok@redhat.com> - 3-37
|
||||||
- Make %%py_byte_compile terminate build on SyntaxErrors (#1616219)
|
- Make %%py_byte_compile terminate build on SyntaxErrors (#1616219)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user