ralph pushed to python-contextlib2 (epel7). "Initial import (#1210978)"

notifications at fedoraproject.org notifications at fedoraproject.org
Tue Apr 28 16:57:47 UTC 2015


>From 28a5ec5e0ebee99a2411295a01391f218bd41340 Mon Sep 17 00:00:00 2001
From: Ralph Bean <rbean at redhat.com>
Date: Tue, 28 Apr 2015 12:51:17 -0400
Subject: Initial import (#1210978)


diff --git a/.gitignore b/.gitignore
index e69de29..18c58a6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/contextlib2-0.4.0.tar.gz
diff --git a/python-contextlib2.spec b/python-contextlib2.spec
new file mode 100644
index 0000000..edb0260
--- /dev/null
+++ b/python-contextlib2.spec
@@ -0,0 +1,104 @@
+%if 0%{?fedora}
+%global with_python3 1
+%endif
+
+%{!?_licensedir: %global license %%doc}
+
+%if 0%{?rhel} && 0%{?rhel} <= 6
+%{!?__python2:        %global __python2 /usr/bin/python2}
+%{!?python2_sitelib:  %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
+%{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
+%endif
+
+%global modname contextlib2
+
+Name:               python-contextlib2
+Version:            0.4.0
+Release:            1%{?dist}
+Summary:            Backports and enhancements for the contextlib module
+
+Group:              Development/Libraries
+License:            Python
+URL:                http://pypi.python.org/pypi/contextlib2
+Source0:            https://pypi.python.org/packages/source/c/%{modname}/%{modname}-%{version}.tar.gz
+
+BuildArch:          noarch
+
+BuildRequires:      python2-devel
+
+%if 0%{?with_python3}
+BuildRequires:      python3-devel
+%endif
+
+%description
+contextlib2 is a backport of the standard library's contextlib module to
+earlier Python versions.
+
+It also serves as a real world proving ground for possible future
+enhancements to the standard library version.
+
+%if 0%{?with_python3}
+%package -n python3-contextlib2
+Summary:            Backports and enhancements for the contextlib module
+Group:              Development/Libraries
+
+%description -n python3-contextlib2
+contextlib2 is a backport of the standard library's contextlib module to
+earlier Python versions.
+
+It also serves as a real world proving ground for possible future
+enhancements to the standard library version.
+%endif
+
+%prep
+%setup -q -n %{modname}-%{version}
+
+# Remove bundled egg-info in case it exists
+rm -rf %{modname}.egg-info
+%if 0%{?with_python3}
+rm -rf %{py3dir}
+cp -a . %{py3dir}
+%endif
+
+%build
+%{__python2} setup.py build
+%if 0%{?with_python3}
+pushd %{py3dir}
+%{__python3} setup.py build
+popd
+%endif
+
+%install
+%if 0%{?with_python3}
+pushd %{py3dir}
+%{__python3} setup.py install -O1 --skip-build --root=%{buildroot}
+popd
+%endif
+%{__python2} setup.py install -O1 --skip-build --root=%{buildroot}
+
+%check
+%{__python2} test_contextlib2.py
+%if 0%{?with_python3}
+pushd %{py3dir}
+%{__python3} test_contextlib2.py
+popd
+%endif
+
+%files
+%doc README.txt VERSION.txt NEWS.rst
+%license LICENSE.txt
+%{python2_sitelib}/%{modname}.py*
+%{python2_sitelib}/%{modname}-%{version}*
+
+%if 0%{?with_python3}
+%files -n python3-contextlib2
+%doc README.txt VERSION.txt NEWS.rst
+%license LICENSE.txt
+%{python3_sitelib}/%{modname}.py*
+%{python3_sitelib}/__pycache__/%{modname}*
+%{python3_sitelib}/%{modname}-%{version}-*
+%endif
+
+%changelog
+* Sat Apr 11 2015 Ralph Bean <rbean at redhat.com> - 0.4.0-1
+- Initial package for Fedora
diff --git a/sources b/sources
index e69de29..76463dc 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+ea687207db25f65552061db4a2c6727d  contextlib2-0.4.0.tar.gz
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/python-contextlib2.git/commit/?h=epel7&id=28a5ec5e0ebee99a2411295a01391f218bd41340


More information about the scm-commits mailing list