]> git.pld-linux.org Git - packages/python-freezegun.git/blob - python-freezegun.spec
rebuild with python 3.10
[packages/python-freezegun.git] / python-freezegun.spec
1 #
2 # Conditional build:
3 %bcond_without  tests   # unit tests
4 %bcond_without  python2 # CPython 2.x module
5 %bcond_without  python3 # CPython 3.x module
6
7 Summary:        FreezeGun: Let your Python 2 tests travel through time
8 Summary(pl.UTF-8):      FreezeGun - umożliwienie testom Pythona 2 podróżowania w czasie
9 Name:           python-freezegun
10 # keep 0.3.x here for python3 support
11 Version:        0.3.15
12 Release:        3
13 License:        Apache v2.0
14 Group:          Libraries/Python
15 #Source0Download: https://pypi.org/simple/freezegun/
16 Source0:        https://files.pythonhosted.org/packages/source/f/freezegun/freezegun-%{version}.tar.gz
17 # Source0-md5:  20d32ddc33d79bf53b6029a265ed2fcc
18 URL:            https://pypi.org/project/freezegun/
19 BuildRequires:  rpm-pythonprov
20 BuildRequires:  rpmbuild(macros) >= 1.714
21 %if %{with python2}
22 BuildRequires:  python-modules >= 1:2.7
23 BuildRequires:  python-setuptools
24 %if %{with tests}
25 BuildRequires:  python-dateutil >= 2.1
26 BuildRequires:  python-mock
27 BuildRequires:  python-modules-sqlite
28 BuildRequires:  python-pytest
29 BuildRequires:  python-six
30 %endif
31 %endif
32 %if %{with python3}
33 BuildRequires:  python3-modules >= 1:3.5
34 BuildRequires:  python3-setuptools
35 %if %{with tests}
36 BuildRequires:  python3-dateutil >= 2.1
37 BuildRequires:  python3-pytest
38 BuildRequires:  python3-six
39 %endif
40 %endif
41 Requires:       python-modules >= 1:2.7
42 BuildArch:      noarch
43 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
44
45 %description
46 FreezeGun is a library that allows your Python tests to travel through
47 time by mocking the datetime module.
48
49 %description -l pl.UTF-8
50 FreezeGun to biblioteka pozwalająca testom w Pythonie podróżowanie w
51 czasie dzięki atrapie modułu datetime.
52
53 %package -n python3-freezegun
54 Summary:        FreezeGun: Let your Python 3 tests travel through time
55 Summary(pl.UTF-8):      FreezeGun - umożliwienie testom Pythona 3 podróżowania w czasie
56 Group:          Libraries/Python
57 Requires:       python3-modules >= 1:3.5
58
59 %description -n python3-freezegun
60 FreezeGun is a library that allows your Python tests to travel through
61 time by mocking the datetime module.
62
63 %description -n python3-freezegun -l pl.UTF-8
64 FreezeGun to biblioteka pozwalająca testom w Pythonie podróżowanie w
65 czasie dzięki atrapie modułu datetime.
66
67 %prep
68 %setup -q -n freezegun-%{version}
69
70 %build
71 %if %{with python2}
72 %py_build
73
74 %if %{with tests}
75 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
76 %{__python} -m pytest tests
77 %endif
78 %endif
79
80 %if %{with python3}
81 %py3_build
82
83 %if %{with tests}
84 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
85 %{__python3} -m pytest tests
86 %endif
87 %endif
88
89 %install
90 rm -rf $RPM_BUILD_ROOT
91
92 %if %{with python2}
93 %py_install
94
95 %py_postclean
96 %endif
97
98 %if %{with python3}
99 %py3_install
100 %endif
101
102 %clean
103 rm -rf $RPM_BUILD_ROOT
104
105 %if %{with python2}
106 %files
107 %defattr(644,root,root,755)
108 %doc AUTHORS.rst CHANGELOG README.rst
109 %{py_sitescriptdir}/freezegun
110 %{py_sitescriptdir}/freezegun-%{version}-py*.egg-info
111 %endif
112
113 %if %{with python3}
114 %files -n python3-freezegun
115 %defattr(644,root,root,755)
116 %doc AUTHORS.rst CHANGELOG README.rst
117 %{py3_sitescriptdir}/freezegun
118 %{py3_sitescriptdir}/freezegun-%{version}-py*.egg-info
119 %endif
This page took 0.046989 seconds and 3 git commands to generate.