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