]> git.pld-linux.org Git - packages/python-iso8601.git/blobdiff - python-iso8601.spec
- release 4 (by relup.sh)
[packages/python-iso8601.git] / python-iso8601.spec
index 13604d1e9a84427ed3d5c81561342d5d6b220dac..ecda01700ce61afaa67f57a420bf148d068333a3 100644 (file)
@@ -1,20 +1,34 @@
 #
 # 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:       1
+Version:       0.1.12
+Release:       4
 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.org/simple/iso8601/
+Source0:       https://files.pythonhosted.org/packages/source/i/iso8601/%{module}-%{version}.tar.gz
+# Source0-md5: 4de940f691c5ea759fb254384c8ddcf6
 URL:           https://bitbucket.org/micktwomey/pyiso8601
-BuildRequires: python-devel
+BuildRequires: rpm-pythonprov
+BuildRequires: rpmbuild(macros) >= 1.714
+%if %{with python2}
+BuildRequires: python-devel >= 1:2.6
+%{?with_tests:BuildRequires:   python-pytest}
 BuildRequires: python-setuptools
-BuildRequires: rpmbuild(macros) >= 1.219
+%endif
+%if %{with python3}
+BuildRequires: python3-devel >= 1:3.2
+%{?with_tests:BuildRequires:   python3-pytest}
+BuildRequires: python3-setuptools
+%endif
+Requires:      python-modules >= 1:2.6
 BuildArch:     noarch
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -22,25 +36,77 @@ 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
+%if %{with python2}
 %py_build
 
+%if %{with tests}
+%{__python} -mpytest iso8601/test_iso8601.py
+%endif
+%endif
+
+%if %{with python3}
+%py3_build
+
+%if %{with tests}
+%{__python} -mpytest iso8601/test_iso8601.py
+%endif
+%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
This page took 0.045616 seconds and 4 git commands to generate.