]> git.pld-linux.org Git - packages/python3-iso8601.git/blob - python3-iso8601.spec
9cfb746f2903fbc8087d4d4fdc9d9b65d419feab
[packages/python3-iso8601.git] / python3-iso8601.spec
1 #
2 # Conditional build:
3 %bcond_with     doc     # Sphinx documentation (not included in sdist)
4 %bcond_without  tests   # unit tests
5
6 %define         module  iso8601
7 Summary:        Simple module to parse ISO 8601 dates
8 Summary(pl.UTF-8):      Prosty moduł do analizy dat ISO 8601
9 Name:           python3-%{module}
10 Version:        1.0.2
11 Release:        1
12 License:        MIT
13 Group:          Development/Languages/Python
14 #Source0Download: https://pypi.org/simple/iso8601/
15 Source0:        https://files.pythonhosted.org/packages/source/i/iso8601/%{module}-%{version}.tar.gz
16 # Source0-md5:  51e301556c344ca8a7a27d83eef771ec
17 URL:            https://bitbucket.org/micktwomey/pyiso8601
18 BuildRequires:  python3-devel >= 1:3.6.2
19 %{?with_tests:BuildRequires:    python3-pytest >= 6.2.2}
20 BuildRequires:  python3-setuptools
21 BuildRequires:  rpm-pythonprov
22 BuildRequires:  rpmbuild(macros) >= 1.714
23 %if %{with doc}
24 BuildRequires:  sphinx-pdg-3 >= 1.2.1
25 %endif
26 Requires:       python3-modules >= 1:3.6.2
27 BuildArch:      noarch
28 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29
30 %description
31 This module parses the most common forms of ISO 8601 date strings
32 (e.g. 2007-01-14T20:34:22+00:00) into datetime objects.
33
34 %description -l pl.UTF-8
35 Ten moduł analizuje najbardziej popularne postaci łańcuchów dat ISO
36 8601 (np. 2007-01-14T20:34:22+00:00) i przekształca na obiekty
37 datetime.
38
39 %package apidocs
40 Summary:        API documentation for Python iso8601 module
41 Summary(pl.UTF-8):      Dokumentacja API modułu Pythona iso8601
42 Group:          Documentation
43
44 %description apidocs
45 API documentation for Python iso8601 module.
46
47 %description apidocs -l pl.UTF-8
48 Dokumentacja API modułu Pythona iso8601.
49
50 %prep
51 %setup -qn %{module}-%{version}
52
53 %build
54 %py3_build
55
56 %if %{with tests}
57 %{__python3} -m pytest iso8601/test_iso8601.py
58 %endif
59
60 %if %{with doc}
61 %{__make} -C docs html \
62         SPHINXBUILD=sphinx-build-3
63 %endif
64
65 %install
66 rm -rf $RPM_BUILD_ROOT
67
68 %py3_install
69
70 %{__rm} $RPM_BUILD_ROOT%{py3_sitescriptdir}/iso8601/test_*
71
72 %clean
73 rm -rf $RPM_BUILD_ROOT
74
75 %files
76 %defattr(644,root,root,755)
77 %doc LICENSE README.rst
78 %{py3_sitescriptdir}/iso8601
79 %{py3_sitescriptdir}/iso8601-%{version}-py*.egg-info
80
81 %if %{with doc}
82 %files apidocs
83 %defattr(644,root,root,755)
84 %doc docs/_build/html/{_modules,_static,*.html,*.js}
85 %endif
This page took 0.079276 seconds and 2 git commands to generate.