]> git.pld-linux.org Git - packages/python-parsedatetime.git/blame - python-parsedatetime.spec
rebuild with python 3.10
[packages/python-parsedatetime.git] / python-parsedatetime.spec
CommitLineData
d4dec6ed
ER
1#
2# Conditional build:
3%bcond_without doc # don't build doc
4%bcond_without tests # do not perform "make test"
5%bcond_without python2 # CPython 2.x module
6%bcond_without python3 # CPython 3.x module
7
8%define module parsedatetime
9Summary: Parse human-readable date/time strings in Python
10Name: python-%{module}
cd1df77b 11Version: 2.1
777af4f8 12Release: 6
d4dec6ed
ER
13License: Apache v2.0
14Group: Libraries/Python
15Source0: https://github.com/bear/%{module}/archive/v%{version}/%{module}-%{version}.tar.gz
cd1df77b 16# Source0-md5: 9054ba8585a94fb68f29d47c14536cc5
d4dec6ed
ER
17URL: https://github.com/bear/parsedatetime
18BuildRequires: rpm-pythonprov
19BuildRequires: rpmbuild(macros) >= 1.713
20%if %{with python2}
48832474 21BuildRequires: python-modules
d4dec6ed 22BuildRequires: python-setuptools
cd1df77b
AM
23%if %{with tests}
24BuildRequires: python-pyicu
48832474 25BuildRequires: python-test
d4dec6ed 26%endif
cd1df77b 27%endif
d4dec6ed 28%if %{with python3}
48832474 29BuildRequires: python3-modules
d4dec6ed 30BuildRequires: python3-setuptools
cd1df77b
AM
31%if %{with tests}
32BuildRequires: python3-pyicu
48832474 33BuildRequires: python3-test
d4dec6ed 34%endif
cd1df77b 35%endif
d4dec6ed
ER
36%if %{with doc}
37BuildRequires: epydoc
38%endif
39BuildArch: noarch
40BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41
42%description
43parsedatetime is a Python module that can parse human-readable
44date/time strings.
45
46%package doc
47Summary: Documentation for the parsedatetime Python module
48Group: Documentation
49
50%description doc
51This package contains the generated HTML documentation for the
52parsedatetime python module
53
54%package -n python3-%{module}
55Summary: Parse human-readable date/time strings in Python
56Group: Libraries/Python
57
58%description -n python3-%{module}
59parsedatetime is a Python module that can parse human-readable
60date/time strings.
61
62%prep
63%setup -q -n %{module}-%{version}
d4dec6ed
ER
64
65%build
66%if %{with python2}
cd1df77b 67%py_build %{?with_tests:test}
d4dec6ed
ER
68%endif
69
70%if %{with python3}
cd1df77b 71%py3_build %{?with_tests:test}
d4dec6ed
ER
72%endif
73
74%if %{with doc}
75epydoc --html --config epydoc.conf
76%endif
77
78%install
79rm -rf $RPM_BUILD_ROOT
80
81%if %{with python2}
82%py_install
d4dec6ed
ER
83
84%py_postclean
85%endif
86
87%if %{with python3}
88%py3_install
d4dec6ed
ER
89%endif
90
91%clean
92rm -rf $RPM_BUILD_ROOT
93
94%files
95%defattr(644,root,root,755)
96%doc LICENSE.txt
cd1df77b 97%doc AUTHORS.txt CHANGES.txt README.rst
d4dec6ed
ER
98%{py_sitescriptdir}/%{module}
99%{py_sitescriptdir}/%{module}-%{version}-*.egg-info
100
101%if %{with python3}
102%files -n python3-%{module}
103%defattr(644,root,root,755)
104%doc LICENSE.txt
cd1df77b 105%doc AUTHORS.txt CHANGES.txt README.rst
d4dec6ed
ER
106%{py3_sitescriptdir}/%{module}
107%{py3_sitescriptdir}/%{module}*.egg-info
108%endif
109
110%if %{with doc}
111%files doc
112%defattr(644,root,root,755)
cd1df77b 113%doc docs/ examples/
d4dec6ed 114%endif
This page took 0.125191 seconds and 4 git commands to generate.