[python-parse] Import of the original SRPM

Matej Cepl mcepl at fedoraproject.org
Tue Aug 27 18:30:04 UTC 2013


commit 9f21b9d76f05a7d86ca3c3c1c04b03877abf5ef5
Author: Matěj Cepl <mcepl at redhat.com>
Date:   Tue Aug 27 20:29:50 2013 +0200

    Import of the original SRPM

 .gitignore        |    1 +
 python-parse.spec |  114 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 sources           |    1 +
 3 files changed, 116 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..eaca731 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/parse-1.6.2.tar.gz
diff --git a/python-parse.spec b/python-parse.spec
new file mode 100644
index 0000000..3ca6c49
--- /dev/null
+++ b/python-parse.spec
@@ -0,0 +1,114 @@
+%global modname parse
+
+%if 0%{?rhel} >= 6 || 0%{?fedora} >= 12
+%bcond_without python3
+%else
+%bcond_with python3
+%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from %distutils.sysconfig import get_python_lib; print (get_python_lib())")}"")}
+%endif
+
+Name:               python-parse
+Version:            1.6.2
+Release:            3%{?dist}
+Summary:            Opposite of format()
+
+Group:              Development/Libraries
+License:            BSD
+URL:                http://pypi.python.org/pypi/parse
+Source0:            http://pypi.python.org/packages/source/p/%{modname}/%{modname}-%{version}.tar.gz
+
+BuildArch:          noarch
+BuildRequires:      python2-devel
+BuildRequires:      python-setuptools
+%if %{with python3}
+BuildRequires:      python3-devel
+BuildRequires:      python3-setuptools
+%endif
+
+
+%description
+Parse strings using a specification based on the Python format() syntax.
+
+``parse()`` is the opposite of ``format()``
+
+%if %{with python3}
+%package -n python3-%{modname}
+Summary:        Opposite of format()
+Group:          Development/Libraries
+
+%description -n python3-%{modname}
+Parse strings using a specification based on the Python format() syntax.
+
+``parse()`` is the opposite of ``format()``
+
+This package works with Python 3.
+%endif
+
+
+%prep
+%setup -q -n %{modname}-%{version}
+
+# Remove bundled egg-info in case it exists
+rm -rf %{modname}.egg-info
+
+%if %{with python3}
+rm -rf %{py3dir}
+cp -a . %{py3dir}
+find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'
+%endif
+
+%build
+%{__python} setup.py build
+
+%if %{with python3}
+pushd %{py3dir}
+%{__python3} setup.py build
+popd
+%endif
+
+
+%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 %{with python3}
+pushd %{py3dir}
+%{__python3} setup.py install --skip-build --root=%{buildroot}
+popd
+%endif
+
+%{__python} setup.py install -O1 --skip-build --root=%{buildroot}
+
+
+%check
+%{__python} test_parse.py
+
+%if %{with python3}
+pushd %{py3dir}
+%{__python3} test_parse.py
+popd
+%endif
+
+%files
+%doc README.rst
+%{python_sitelib}/%{modname}*
+
+%if %{with python3}
+%files -n python3-%{modname}
+%doc README.rst
+%{python3_sitelib}/%{modname}*
+%{python3_sitelib}/__pycache__/%{modname}*
+%endif
+
+
+%changelog
+* Wed Jul 24 2013 Matěj Cepl <mcepl at redhat.com> - 1.6.2-3
+- We actually don't need 2to3.
+
+* Wed Jul 24 2013 Matěj Cepl <mcepl at redhat.com> - 1.6.2-2
+- make python3 package as well
+- BR python-setuptools
+- fix changelog
+
+* Tue Jul 23 2013 Matěj Cepl <mcepl at redhat.com> - 1.6.2-1
+- initial package for Fedora
diff --git a/sources b/sources
index e69de29..2667f76 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+ddc5810a209876296857bf85f541ce80  parse-1.6.2.tar.gz


More information about the scm-commits mailing list