[python-extras] initial import (#958344)

Pádraig Brady pbrady at fedoraproject.org
Fri May 31 15:10:14 UTC 2013


commit f53e4a52410a6da3014423bba3dda62b5066c4e2
Author: Pádraig Brady <P at draigBrady.com>
Date:   Fri May 31 15:54:55 2013 +0100

    initial import (#958344)

 .gitignore         |    1 +
 python-extras.spec |  105 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 sources            |    1 +
 3 files changed, 107 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..7847b75 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/extras-0.0.3.tar.gz
diff --git a/python-extras.spec b/python-extras.spec
new file mode 100644
index 0000000..54808ae
--- /dev/null
+++ b/python-extras.spec
@@ -0,0 +1,105 @@
+%if 0%{?fedora}
+%global with_python3 1
+%endif
+
+Name:           python-extras
+Version:        0.0.3
+Release:        2%{?dist}
+Summary:        Useful extra bits for Python
+
+License:        MIT
+URL:            https://github.com/testing-cabal/extras
+Source0:        https://pypi.python.org/packages/source/e/extras/extras-%{version}.tar.gz
+
+BuildArch:      noarch
+BuildRequires:  python-devel
+BuildRequires:  python-setuptools
+BuildRequires:  python-testtools
+%if 0%{?with_python3}
+BuildRequires:  python3-devel
+BuildRequires:  python3-setuptools
+BuildRequires:  python3-testtools
+%endif
+
+%description
+extras is a set of extensions to the Python standard library, originally
+written to make the code within testtools cleaner, but now split out for
+general use outside of a testing context.
+
+
+%if 0%{?with_python3}
+%package -n python3-extras
+Summary:        Useful extra bits for Python
+
+%description -n python3-extras
+extras is a set of extensions to the Python standard library, originally
+written to make the code within testtools cleaner, but now split out for
+general use outside of a testing context.
+%endif # with_python3
+
+
+%prep
+%setup -q -n extras-%{version}
+# Remove bundled egg-info
+%if 0%{?with_python3}
+rm -rf %{py3dir}
+cp -a . %{py3dir}
+
+find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'
+%endif # with_python3
+
+find -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python}|'
+
+
+%build
+%{__python} setup.py build
+
+%if 0%{?with_python3}
+pushd %{py3dir}
+%{__python3} setup.py build
+popd
+%endif # with_python3
+
+
+%install
+
+# Must do the python3 install first because the scripts in /usr/bin are
+# overwritten with every setup.py install (and we want the python2 version
+# to be the default for now).
+%if 0%{?with_python3}
+pushd %{py3dir}
+%{__python3} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
+popd
+%endif # with_python3
+
+%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
+
+%check
+%{__python} setup.py test
+
+%if 0%{?with_python3}
+pushd %{py3dir}
+%{__python3} setup.py test
+popd
+%endif # with_python3
+
+
+
+%files
+%doc LICENSE NEWS README.rst
+# For noarch packages: sitelib
+%{python_sitelib}/*
+
+%if 0%{?with_python3}
+%files -n python3-extras
+%doc LICENSE NEWS README.rst
+%{python3_sitelib}/*
+%endif # with_python3
+
+
+%changelog
+* Wed May 29 2013 Matthias Runge <mrunge at redhat.com> - 0.0.3-2
+- spec cleanup and enable tests
+
+* Wed May  1 2013 Michel Salim <salimma at fedoraproject.org> - 0.0.3-1
+- Initial package
diff --git a/sources b/sources
index e69de29..826c4c9 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+62d8ba049e3386a6df69b413ea81517b  extras-0.0.3.tar.gz


More information about the scm-commits mailing list