]> git.pld-linux.org Git - packages/python-freezegun.git/blame - python-freezegun.spec
rebuild with python 3.10
[packages/python-freezegun.git] / python-freezegun.spec
CommitLineData
7f39570e
JB
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
7Summary: FreezeGun: Let your Python 2 tests travel through time
8Summary(pl.UTF-8): FreezeGun - umożliwienie testom Pythona 2 podróżowania w czasie
9Name: python-freezegun
837c07bf 10# keep 0.3.x here for python3 support
750984f7 11Version: 0.3.15
7ad78819 12Release: 3
7f39570e
JB
13License: Apache v2.0
14Group: Libraries/Python
15#Source0Download: https://pypi.org/simple/freezegun/
16Source0: https://files.pythonhosted.org/packages/source/f/freezegun/freezegun-%{version}.tar.gz
750984f7 17# Source0-md5: 20d32ddc33d79bf53b6029a265ed2fcc
7f39570e
JB
18URL: https://pypi.org/project/freezegun/
19BuildRequires: rpm-pythonprov
20BuildRequires: rpmbuild(macros) >= 1.714
21%if %{with python2}
43f7d4e7 22BuildRequires: python-modules >= 1:2.7
7f39570e
JB
23BuildRequires: python-setuptools
24%if %{with tests}
25BuildRequires: python-dateutil >= 2.1
26BuildRequires: python-mock
c7631783 27BuildRequires: python-modules-sqlite
43f7d4e7 28BuildRequires: python-pytest
7f39570e
JB
29BuildRequires: python-six
30%endif
31%endif
32%if %{with python3}
750984f7 33BuildRequires: python3-modules >= 1:3.5
7f39570e
JB
34BuildRequires: python3-setuptools
35%if %{with tests}
36BuildRequires: python3-dateutil >= 2.1
43f7d4e7 37BuildRequires: python3-pytest
7f39570e
JB
38BuildRequires: python3-six
39%endif
40%endif
43f7d4e7 41Requires: python-modules >= 1:2.7
7f39570e
JB
42BuildArch: noarch
43BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
44
45%description
46FreezeGun is a library that allows your Python tests to travel through
47time by mocking the datetime module.
48
49%description -l pl.UTF-8
50FreezeGun to biblioteka pozwalająca testom w Pythonie podróżowanie w
51czasie dzięki atrapie modułu datetime.
52
53%package -n python3-freezegun
54Summary: FreezeGun: Let your Python 3 tests travel through time
55Summary(pl.UTF-8): FreezeGun - umożliwienie testom Pythona 3 podróżowania w czasie
56Group: Libraries/Python
750984f7 57Requires: python3-modules >= 1:3.5
7f39570e
JB
58
59%description -n python3-freezegun
60FreezeGun is a library that allows your Python tests to travel through
61time by mocking the datetime module.
62
63%description -n python3-freezegun -l pl.UTF-8
64FreezeGun to biblioteka pozwalająca testom w Pythonie podróżowanie w
65czasie dzięki atrapie modułu datetime.
66
67%prep
68%setup -q -n freezegun-%{version}
7f39570e
JB
69
70%build
71%if %{with python2}
72%py_build
73
74%if %{with tests}
837c07bf 75PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
43f7d4e7 76%{__python} -m pytest tests
7f39570e
JB
77%endif
78%endif
79
80%if %{with python3}
81%py3_build
82
83%if %{with tests}
837c07bf 84PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
750984f7 85%{__python3} -m pytest tests
7f39570e
JB
86%endif
87%endif
88
89%install
90rm -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
103rm -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.116766 seconds and 4 git commands to generate.