[python-mimeparse] Initial import

Jan Kaluža jkaluza at fedoraproject.org
Mon Nov 28 14:42:04 UTC 2011


commit 8cc031fa385c8e37e55702ab2c4b9b67c6d117bc
Author: Jan Kaluza <hanzz.k at gmail.com>
Date:   Mon Nov 28 15:38:01 2011 +0100

    Initial import

 .gitignore            |    1 +
 python-mimeparse.spec |   87 +++++++++++++++++++++++++++++++++++++++++++++++++
 sources               |    1 +
 3 files changed, 89 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..74ada59 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/mimeparse-0.1.3.tar.gz
diff --git a/python-mimeparse.spec b/python-mimeparse.spec
new file mode 100644
index 0000000..563b12f
--- /dev/null
+++ b/python-mimeparse.spec
@@ -0,0 +1,87 @@
+%global with_python3 0
+%global srcname mimeparse
+
+Name:           python-%{srcname}
+Version:        0.1.3
+Release:        2%{?dist}
+Summary:        Python module for parsing mime-type names
+Group:          Development/Languages
+License:        MIT
+URL:            https://mimeparse.googlecode.com/
+Source0:        https://mimeparse.googlecode.com/files/%{srcname}-%{version}.tar.gz
+BuildArch:      noarch
+BuildRequires:  python2-devel
+%if 0%{?with_python3}
+BuildRequires:  python3-devel
+%endif # if with_python3
+
+%description
+This module provides basic functions for parsing mime-type names
+and matching them against a list of media-ranges.
+
+%if 0%{?with_python3}
+%package -n python3-%{srcname}
+Summary:        Python module for parsing mime-type names
+Group:          Development/Languages
+
+%description -n python3-%{srcname}
+This module provides basic functions for parsing mime-type names
+and matching them against a list of media-ranges.
+%endif # with_python3
+
+%prep
+%setup -q -n %{srcname}-%{version}
+
+%if 0%{?with_python3}
+rm -rf %{py3dir}
+cp -a . %{py3dir}
+%endif # with_python3
+
+%build
+CFLAGS="%{optflags}" %{__python} setup.py build
+
+%if 0%{?with_python3}
+pushd %{py3dir}
+CFLAGS="%{optflags}" %{__python3} setup.py build
+popd
+%endif # with_python3
+
+%check
+%{__python} mimeparse_test.py
+
+%if 0%{?with_python3}
+pushd %{py3dir}
+%{__python3} mimeparse_test.py
+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 --skip-build --root %{buildroot}
+popd
+%endif # with_python3
+
+%{__python} setup.py install --skip-build --root %{buildroot}
+
+%files
+%doc README
+%{python_sitelib}/*
+
+%if 0%{?with_python3}
+%files -n python3-%{srcname}
+%doc README
+%{python3_sitelib}/*
+%endif # with_python3
+
+%changelog
+* Tue Nov 22 2011 Jan Kaluza <jkaluza at redhat.com> - 0.1.3-2
+- python3 support disabled
+- removed useless spec file directives
+- run upstream test
+
+* Wed Nov 02 2011 Jan Kaluza <jkaluza at redhat.com> - 0.1.3-1
+- Initial version
diff --git a/sources b/sources
index e69de29..c3f5cad 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+03ce207391454db37279e78ce2112365  mimeparse-0.1.3.tar.gz


More information about the scm-commits mailing list