]> git.pld-linux.org Git - packages/python3-iso8601.git/commitdiff
- python-iso8601.spec updated to 1.0.2 for python 3.6+ auto/th/python3-iso8601-1.0.2-1
authorJakub Bogusz <qboosh@pld-linux.org>
Mon, 14 Mar 2022 19:04:46 +0000 (20:04 +0100)
committerJakub Bogusz <qboosh@pld-linux.org>
Mon, 14 Mar 2022 19:04:46 +0000 (20:04 +0100)
python3-iso8601.spec [moved from python-iso8601.spec with 52% similarity]

similarity index 52%
rename from python-iso8601.spec
rename to python3-iso8601.spec
index 016205f67630876833c451f09e4a6dff04c14da6..9cfb746f2903fbc8087d4d4fdc9d9b65d419feab 100644 (file)
@@ -1,39 +1,29 @@
 #
 # Conditional build:
-%bcond_without doc     # Sphinx documentation
+%bcond_with    doc     # Sphinx documentation (not included in sdist)
 %bcond_without tests   # unit tests
-%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}
-# keep 0.x here for python2 support
-Version:       0.1.16
+Name:          python3-%{module}
+Version:       1.0.2
 Release:       1
 License:       MIT
 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: ffe057a29bbc9defec7fdcf75ce6e25f
+# Source0-md5: 51e301556c344ca8a7a27d83eef771ec
 URL:           https://bitbucket.org/micktwomey/pyiso8601
+BuildRequires: python3-devel >= 1:3.6.2
+%{?with_tests:BuildRequires:   python3-pytest >= 6.2.2}
+BuildRequires: python3-setuptools
 BuildRequires: rpm-pythonprov
 BuildRequires: rpmbuild(macros) >= 1.714
-%if %{with python2}
-BuildRequires: python-devel >= 1:2.6
-%{?with_tests:BuildRequires:   python-pytest >= 2.4.2}
-BuildRequires: python-setuptools
-%endif
-%if %{with python3}
-BuildRequires: python3-devel >= 1:3.2
-%{?with_tests:BuildRequires:   python3-pytest >= 2.4.2}
-BuildRequires: python3-setuptools
-%endif
 %if %{with doc}
-BuildRequires: sphinx-pdg-2 >= 1.2.1
+BuildRequires: sphinx-pdg-3 >= 1.2.1
 %endif
-Requires:      python-modules >= 1:2.6
+Requires:      python3-modules >= 1:3.6.2
 BuildArch:     noarch
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -46,21 +36,6 @@ 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.
-
 %package apidocs
 Summary:       API documentation for Python iso8601 module
 Summary(pl.UTF-8):     Dokumentacja API modułu Pythona iso8601
@@ -76,61 +51,32 @@ Dokumentacja API modułu Pythona iso8601.
 %setup -qn %{module}-%{version}
 
 %build
-%if %{with python2}
-%py_build
-
-%if %{with tests}
-%{__python} -m pytest iso8601/test_iso8601.py
-%endif
-%endif
-
-%if %{with python3}
 %py3_build
 
 %if %{with tests}
 %{__python3} -m pytest iso8601/test_iso8601.py
 %endif
-%endif
 
 %if %{with doc}
 %{__make} -C docs html \
-       SPHINXBUILD=sphinx-build-2
+       SPHINXBUILD=sphinx-build-3
 %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 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
 
 %if %{with doc}
 %files apidocs
This page took 0.093389 seconds and 4 git commands to generate.