[packages/python-backports] new, version 1.0

glen glen at pld-linux.org
Sat May 23 18:25:42 CEST 2015


commit 079ef093a3636c80c19e47940b9db387c8953f2d
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Sat May 23 19:25:15 2015 +0300

    new, version 1.0
    
    based on fedora package 5016308

 backports.py          |  2 ++
 python-backports.spec | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 50 insertions(+)
---
diff --git a/python-backports.spec b/python-backports.spec
new file mode 100644
index 0000000..b173e86
--- /dev/null
+++ b/python-backports.spec
@@ -0,0 +1,48 @@
+# https://bugzilla.redhat.com/show_bug.cgi?id=998047
+Summary:	Namespace for backported Python features
+Name:		python-backports
+Version:	1.0
+Release:	5
+# Only code is sourced from http://www.python.org/dev/peps/pep-0382/
+License:	Public Domain
+URL:		https://pypi.python.org/pypi/backports
+Source0:	backports.py
+Group:		Libraries/Python
+BuildRequires:	rpm-pythonprov
+BuildRequires:	rpmbuild(macros) >= 1.219
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%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 PLD Linux 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/>.
+
+%prep
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT%{py_sitescriptdir}/backports
+cp -p %{SOURCE0} $RPM_BUILD_ROOT%{py_sitescriptdir}/backports/__init__.py
+
+%if "%{py_sitescriptdir}" != "%{py_sitedir}"
+install -d $RPM_BUILD_ROOT%{py_sitedir}/backports
+cp -p %{SOURCE0} $RPM_BUILD_ROOT%{py_sitedir}/backports/__init__.py
+%endif
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%{py_sitescriptdir}/backports
+%if "%{py_sitescriptdir}" != "%{py_sitedir}"
+%{py_sitedir}/backports
+%endif
diff --git a/backports.py b/backports.py
new file mode 100644
index 0000000..3ad9513
--- /dev/null
+++ b/backports.py
@@ -0,0 +1,2 @@
+from pkgutil import extend_path
+__path__ = extend_path(__path__, __name__)
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-backports.git/commitdiff/079ef093a3636c80c19e47940b9db387c8953f2d



More information about the pld-cvs-commit mailing list