[packages/python-iso8601] - updated to 0.1.11, added python3 package

qboosh qboosh at pld-linux.org
Sat Mar 26 12:08:30 CET 2016


commit 6c5ec07f73435251d7e2937af353fe776c3c0cde
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sat Mar 26 12:12:52 2016 +0100

    - updated to 0.1.11, added python3 package

 python-iso8601.spec | 76 +++++++++++++++++++++++++++++++++++++++++++++--------
 1 file changed, 65 insertions(+), 11 deletions(-)
---
diff --git a/python-iso8601.spec b/python-iso8601.spec
index af531ad..bef9deb 100644
--- a/python-iso8601.spec
+++ b/python-iso8601.spec
@@ -1,20 +1,30 @@
 #
 # Conditional build:
 %bcond_without	tests	# do not perform "make test"
+%bcond_without	python2 # CPython 2.x module
+%bcond_without	python3 # CPython 3.x module
 
 %define 	module	iso8601
 Summary:	Simple module to parse ISO 8601 dates
+Summary(pl.UTF-8):	Prosty moduł do analizy dat ISO 8601
 Name:		python-%{module}
-Version:	0.1.8
-Release:	2
+Version:	0.1.11
+Release:	1
 License:	MIT
-Group:		Development/Languages
-Source0:	http://pypi.python.org/packages/source/i/iso8601/%{module}-%{version}.tar.gz
-# Source0-md5:	b207ad4f2df92810533ce6145ab9c3e7
+Group:		Development/Languages/Python
+#Source0Download: https://pypi.python.org/simple/iso8601/
+Source0:	https://pypi.python.org/packages/source/i/iso8601/%{module}-%{version}.tar.gz
+# Source0-md5:	b06d11cd14a64096f907086044f0fe38
 URL:		https://bitbucket.org/micktwomey/pyiso8601
-BuildRequires:	python-devel
-BuildRequires:	python-setuptools
-BuildRequires:	rpmbuild(macros) >= 1.710
+BuildRequires:	rpm-pythonprov
+BuildRequires:	rpmbuild(macros) >= 1.714
+%if %{with python2}
+BuildRequires:	python-devel >= 1:2.6
+%endif
+%if %{with python3}
+BuildRequires:	python3-devel >= 1:3.2
+%endif
+Requires:	python-modules >= 1:2.6
 BuildArch:	noarch
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -22,25 +32,69 @@ BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 This module parses the most common forms of ISO 8601 date strings
 (e.g. 2007-01-14T20:34:22+00:00) into datetime objects.
 
+%description -l pl.UTF-8
+Ten moduł analizuje najbardziej popularne postaci łańcuchów dat ISO
+8601 (np. 2007-01-14T20:34:22+00:00) i przekształca na obiekty
+datetime.
+
+%package -n python3-%{module}
+Summary:	Simple module to parse ISO 8601 dates
+Summary(pl.UTF-8):	Prosty moduł do analizy dat ISO 8601
+Group:		Development/Languages/Python
+Requires:	python3-modules >= 1:3.2
+
+%description -n python3-%{module}
+This module parses the most common forms of ISO 8601 date strings
+(e.g. 2007-01-14T20:34:22+00:00) into datetime objects.
+
+%description -n python3-%{module} -l pl.UTF-8
+Ten moduł analizuje najbardziej popularne postaci łańcuchów dat ISO
+8601 (np. 2007-01-14T20:34:22+00:00) i przekształca na obiekty
+datetime.
+
 %prep
 %setup -qn %{module}-%{version}
 
 %build
-%py_build
+%if %{with python2}
+%py_build %{?with_tests:test}
+%endif
+
+%if %{with python3}
+%py3_build %{?with_tests:test}
+%endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
+
+%if %{with python2}
 %py_install
 
 %py_postclean
-
 %{__rm} $RPM_BUILD_ROOT%{py_sitescriptdir}/iso8601/test_*
+%endif
+
+%if %{with python3}
+%py3_install
+
+%{__rm} $RPM_BUILD_ROOT%{py3_sitescriptdir}/iso8601/test_*
+%endif
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%if %{with python2}
 %files
 %defattr(644,root,root,755)
-%doc README.rst LICENSE
+%doc LICENSE README.rst
 %{py_sitescriptdir}/iso8601
 %{py_sitescriptdir}/iso8601-%{version}-py*.egg-info
+%endif
+
+%if %{with python3}
+%files -n python3-%{module}
+%defattr(644,root,root,755)
+%doc LICENSE README.rst
+%{py3_sitescriptdir}/iso8601
+%{py3_sitescriptdir}/iso8601-%{version}-py*.egg-info
+%endif
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-iso8601.git/commitdiff/6c5ec07f73435251d7e2937af353fe776c3c0cde



More information about the pld-cvs-commit mailing list