]> git.pld-linux.org Git - packages/python-mimeparse.git/commitdiff
- switched to pypi source, updated to 0.1.4 auto/th/python-mimeparse-0.1.4-1 auto/ti/python-mimeparse-0.1.4-1
authorJakub Bogusz <qboosh@pld-linux.org>
Tue, 24 Dec 2013 08:37:49 +0000 (09:37 +0100)
committerJakub Bogusz <qboosh@pld-linux.org>
Tue, 24 Dec 2013 08:37:49 +0000 (09:37 +0100)
python-mimeparse.spec

index dda59b8b283adf4f0f7f3611f9b94de71b65b387..dce77eda046f5299ad2b93cc64076f9a73895e61 100644 (file)
@@ -1,17 +1,20 @@
 #
 # Conditional build:
-%bcond_without python3 # Python3
+%bcond_without python2         # Python 2.x module
+%bcond_without python3         # Python 3.x module
 
 %define                module mimeparse
-Summary:       Python module for parsing mime-type names
+Summary:       Python 2.x module for parsing mime-type names
+Summary(pl.UTF-8):     Moduł Pythona 2.x do analizy nazw typów MIME
 Name:          python-%{module}
-Version:       0.1.3
-Release:       2
+Version:       0.1.4
+Release:       1
 License:       MIT
 Group:         Libraries/Python
+#Source0:      https://mimeparse.googlecode.com/files/%{module}-%{version}.tar.gz
+Source0:       https://pypi.python.org/packages/source/p/python-mimeparse/%{name}-%{version}.tar.gz
+# Source0-md5: 1d2816a16f17dcfe0c613da611fe7e13
 URL:           https://mimeparse.googlecode.com/
-Source0:       https://mimeparse.googlecode.com/files/%{module}-%{version}.tar.gz
-# Source0-md5: 03ce207391454db37279e78ce2112365
 BuildRequires: python-devel
 %{?with_python3:BuildRequires: python3-devel}
 BuildRequires: rpm-pythonprov
@@ -23,35 +26,53 @@ BuildRoot:  %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 This module provides basic functions for parsing mime-type names and
 matching them against a list of media-ranges.
 
+%description -l pl.UTF-8
+Ten moduł udostępnia podstawowe funkcje do analizy nazw typów MIME
+oraz dopasowywania ich do listy zakresów mediów.
+
 %package -n python3-%{module}
-Summary:       Python module for parsing mime-type names
+Summary:       Python 3.x module for parsing mime-type names
+Summary(pl.UTF-8):     Moduł Pythona 3.x do analizy nazw typów MIME
 Group:         Libraries/Python
 
 %description -n python3-%{module}
 This module provides basic functions for parsing mime-type names and
 matching them against a list of media-ranges.
 
+%description -n python3-%{module} -l pl.UTF-8
+Ten moduł udostępnia podstawowe funkcje do analizy nazw typów MIME
+oraz dopasowywania ich do listy zakresów mediów.
+
 %prep
-%setup -q -n %{module}-%{version}
+%setup -q
 
 %build
+%if %{with python2}
 %{__python} setup.py build --build-base py2
+%endif
 
 %if %{with python3}
 %{__python3} setup.py build --build-base py3
 %endif
 
 %if %{with tests}
+%if %{with python2}
+cd py2
 %{__python} mimeparse_test.py
+cd ..
+%endif
 
 %if %{with python3}
 cd py3
 %{__python3} mimeparse_test.py
+cd ..
 %endif
 %endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
+
+%if %{with python2}
 %{__python} setup.py build \
        --build-base py2 \
        install \
@@ -59,6 +80,7 @@ rm -rf $RPM_BUILD_ROOT
        --root=$RPM_BUILD_ROOT
 
 %py_postclean
+%endif
 
 %if %{with python3}
 %{__python3} setup.py build \
@@ -71,17 +93,19 @@ rm -rf $RPM_BUILD_ROOT
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%if %{with python2}
 %files
 %defattr(644,root,root,755)
 %doc README
 %{py_sitescriptdir}/mimeparse.py[co]
-%{py_sitescriptdir}/mimeparse-%{version}-py*.egg-info
+%{py_sitescriptdir}/python_mimeparse-%{version}-py*.egg-info
+%endif
 
 %if %{with python3}
 %files -n python3-%{module}
 %defattr(644,root,root,755)
 %doc README
-%{py3_sitescriptdir}/__pycache__/mimeparse.*.py[co]
-%{py3_sitescriptdir}/mimeparse-%{version}-py*.egg-info
 %{py3_sitescriptdir}/mimeparse.py
+%{py3_sitescriptdir}/__pycache__/mimeparse.*.py[co]
+%{py3_sitescriptdir}/python_mimeparse-%{version}-py*.egg-info
 %endif
This page took 0.125681 seconds and 4 git commands to generate.