python-backports/python-backports.spec

77 lines
2.4 KiB
RPMSpec
Raw Normal View History

2015-10-03 12:13:50 +10:00
%define debug_package %{nil}
2019-11-06 11:41:38 +03:00
%define module backports
2014-09-16 22:26:28 +04:00
2015-10-03 12:13:50 +10:00
Summary: Namespace for backported Python features
Name: python-backports
Version: 1.0
2019-11-06 11:41:38 +03:00
Release: 5
2014-09-16 22:26:28 +04:00
# Only code is sourced from http://www.python.org/dev/peps/pep-0382/
2015-10-03 12:13:50 +10:00
License: Public Domain
Group: Development/Python
2019-11-06 11:41:38 +03:00
URL: https://pypi.python.org/pypi/backports
2015-10-03 12:13:50 +10:00
Source0: backports.py
BuildRequires: pkgconfig(python)
2019-11-06 11:41:38 +03:00
BuildRequires: pkgconfig(python3)
2014-09-16 22:26:28 +04:00
%description
The backports namespace is a namespace reserved for features backported from
the Python standard library to older versions of Python 2.
Packages that exist in the backports namespace in Fedora should not provide
their own backports/__init__.py, but instead require this package.
Backports to earlier versions of Python 3, if they exist, do not need this
package because of changes made in Python 3.3 in PEP 420
(http://www.python.org/dev/peps/pep-0420/).
2015-10-03 12:13:50 +10:00
%files
%{python_sitelib}/backports
%if "%{python_sitelib}" != "%{python_sitearch}"
%{python_sitearch}/backports
%endif
2019-11-06 11:41:38 +03:00
#------------------------------------------------------------------
%package -n python3-%{module}
Group: Development/Python
%description -n python3-%{module}
The backports namespace is a namespace reserved for features backported from
the Python standard library to older versions of Python 2.
Packages that exist in the backports namespace in Fedora should not provide
their own backports/__init__.py, but instead require this package.
Backports to earlier versions of Python 3, if they exist, do not need this
package because of changes made in Python 3.3 in PEP 420
(http://www.python.org/dev/peps/pep-0420/).
%files -n python3-%{module}
%{python3_sitelib}/backports
%if "%{python3_sitelib}" != "%{python3_sitearch}"
%{python3_sitearch}/backports
%endif
#------------------------------------------------------------------
2014-09-16 22:26:28 +04:00
%prep
%build
%install
2019-11-06 11:41:38 +03:00
mkdir -pm 755 %{buildroot}%{python_sitelib}/backports %{buildroot}%{python3_sitelib}/backports
2014-09-16 22:26:28 +04:00
install -pm 644 %{SOURCE0} %{buildroot}%{python_sitelib}/backports/__init__.py
2019-11-06 11:41:38 +03:00
install -pm 644 %{SOURCE0} %{buildroot}%{python3_sitelib}/backports/__init__.py
2015-10-03 12:13:50 +10:00
2015-09-09 00:06:57 +03:00
%if "%{python_sitelib}" != "%{python_sitearch}"
mkdir -pm 755 %{buildroot}%{python_sitearch}/backports
install -pm 644 %{SOURCE0} %{buildroot}%{python_sitearch}/backports/__init__.py
%endif
2019-11-06 11:41:38 +03:00
%if "%{python3_sitelib}" != "%{python3_sitearch}"
mkdir -pm 755 %{buildroot}%{python3_sitearch}/backports
install -pm 644 %{SOURCE0} %{buildroot}%{python3_sitearch}/backports/__init__.py
%endif