]> git.pld-linux.org Git - packages/python-arrow.git/blob - python-arrow.spec
rebuild with python 3.10
[packages/python-arrow.git] / python-arrow.spec
1 #
2 # Conditional build:
3 %bcond_without  python2 # CPython 2.x module
4 %bcond_without  python3 # CPython 3.x module
5 ## Disable the tests as apparently the version 0.4.2 does not ship them
6 %bcond_with     tests   # do not perform "make test"
7
8 %define module  arrow
9 Summary:        Better dates and times for Python
10 Name:           python-%{module}
11 Version:        0.4.2
12 Release:        9
13 License:        Apache v2.0
14 Group:          Development/Libraries
15 Source0:        http://pypi.python.org/packages/source/a/%{module}/%{module}-%{version}.tar.gz
16 # Source0-md5:  5caa8442fd3a84a5ad0155a1f626ef1d
17 URL:            http://pypi.python.org/pypi/arrow
18 BuildRequires:  rpmbuild(macros) >= 1.710
19 BuildRequires:  rpm-pythonprov
20 %if %{with python2}
21 BuildRequires:  python-chai
22 BuildRequires:  python-dateutil
23 BuildRequires:  python-distribute
24 BuildRequires:  python-modules
25 BuildRequires:  python-six
26 %endif
27 %if %{with python3}
28 BuildRequires:  python3-distribute
29 BuildRequires:  python3-modules
30 %endif
31 Requires:       python-dateutil
32 Requires:       python-six
33 BuildArch:      noarch
34 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35
36 %description
37 Arrow is a Python library that offers a sensible, human-friendly
38 approach to creating, manipulating, formatting and converting dates,
39 times, and timestamps. It implements and updates the datetime type,
40 plugging gaps in functionality, and provides an intelligent module API
41 that supports many common creation scenarios.
42
43 Simply put, it helps you work with dates and times with fewer imports
44 and a lot less code.
45
46 %package -n python3-arrow
47 Summary:        Better dates and times for Python
48 Group:          Development/Libraries
49 Requires:       python3-dateutil
50 Requires:       python3-six
51
52 %description -n python3-arrow
53 Arrow is a Python library that offers a sensible, human-friendly
54 approach to creating, manipulating, formatting and converting dates,
55 times, and timestamps. It implements and updates the datetime type,
56 plugging gaps in functionality, and provides an intelligent module API
57 that supports many common creation scenarios.
58
59 Simply put, it helps you work with dates and times with fewer imports
60 and a lot less code.
61
62 %prep
63 %setup -q -n %{module}-%{version}
64
65 # Remove bundled egg-info in case it exists
66 rm -r %{module}.egg-info
67
68 %build
69 %if %{with python2}
70 %py_build %{?with_tests:test}
71 %endif
72
73 %if %{with python3}
74 %py3_build %{?with_tests:test}
75 %endif
76
77 %install
78 rm -rf $RPM_BUILD_ROOT
79
80 %if %{with python2}
81 %py_install
82
83 %py_postclean
84 %endif
85
86 %if %{with python3}
87 %py3_install
88 %endif
89
90 %clean
91 rm -rf $RPM_BUILD_ROOT
92
93 %files
94 %defattr(644,root,root,755)
95 # pr pending https://github.com/crsmithdev/arrow/pull/70
96 #%doc LICENSE README.md HISTORY.md
97 %{py_sitescriptdir}/arrow
98 %{py_sitescriptdir}/arrow-%{version}-py*.egg-info
99
100 %if %{with python3}
101 %files -n python3-%{module}
102 %defattr(644,root,root,755)
103 #%doc LICENSE README.md HISTORY.md
104 %{py3_sitescriptdir}/arrow
105 %{py3_sitescriptdir}/arrow-%{version}-py*.egg-info
106 %endif
This page took 0.067469 seconds and 3 git commands to generate.