]> git.pld-linux.org Git - packages/python-flexmock.git/blame - python-flexmock.spec
rebuild with python 3.10
[packages/python-flexmock.git] / python-flexmock.spec
CommitLineData
bbd43d3c
ER
1#
2# Conditional build:
3%bcond_without tests # do not perform "make test"
4%bcond_without python3 # CPython 3.x module
5
6%define module flexmock
7Summary: Testing library that makes it easy to create mocks, stubs and fakes
8Name: python-%{module}
9Version: 0.9.6
0b99b88c 10Release: 12
bbd43d3c
ER
11License: BSD
12Group: Libraries/Python
13Source0: http://pypi.python.org/packages/source/f/flexmock/flexmock-%{version}.tar.gz
14# Source0-md5: f91c7b608fb4235419d75fe9274f7f0c
15# git clone https://github.com/has207/flexmock.git && cd flexmock
16# git checkout 0.9.6 && tar -czf python-flexmock-0.9.6-tests.tgz tests/
17Source1: %{name}-%{version}-tests.tgz
18# Source1-md5: 6cecfda41b4b86a66dc9b6fc3aa9b002
19URL: https://github.com/has207/flexmock
20BuildRequires: python-devel
21BuildRequires: python-setuptools
22BuildRequires: rpm-pythonprov
d950bbb8 23BuildRequires: rpmbuild(macros) >= 1.710
bbd43d3c
ER
24BuildRequires: sed >= 4.0
25%if %{with python3}
26BuildRequires: python3-devel
369b77cd 27BuildRequires: python3-modules
bbd43d3c
ER
28BuildRequires: python3-setuptools
29%endif
30BuildArch: noarch
31BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33%description
34Flexmock is a testing library for Python that makes it easy to create
35mocks, stubs and fakes. The API is inspired by a Ruby library of the
36same name, but Python flexmock is not a clone of the Ruby version. It
37omits a number of redundancies in the Ruby flexmock API, alters some
38defaults, and introduces a number of Python-only features.
39
40%package -n python3-flexmock
41Summary: Testing library that makes it easy to create mocks, stubs and fakes
42Group: Libraries/Python
43
44%description -n python3-flexmock
45Flexmock is a testing library for Python that makes it easy to create
46mocks, stubs and fakes. The API is inspired by a Ruby library of the
47same name, but Python flexmock is not a clone of the Ruby version. It
48omits a number of redundancies in the Ruby flexmock API, alters some
49defaults, and introduces a number of Python-only features.
50
51%prep
52%setup -q -n %{module}-%{version}
53install -d build/lib
54%{__tar} xf %{SOURCE1} -C build/lib
55
bbd43d3c 56%build
2fcef275 57%py_build
bbd43d3c
ER
58
59%if %{with python3}
2fcef275 60%py3_build
bbd43d3c
ER
61%endif
62
63%if %{with tests}
2fcef275 64PYTHONPATH=build-2/lib %{__python} tests/flexmock_unittest_test.py
bbd43d3c
ER
65
66%if %{with python3}
2fcef275 67PYTHONPATH=build-3/lib %{__python3} tests/flexmock_unittest_test.py
bbd43d3c
ER
68%endif
69%endif
70
71%install
72rm -rf $RPM_BUILD_ROOT
73%if %{with python3}
2fcef275 74%py3_install
bbd43d3c
ER
75%endif
76
2fcef275 77%py_install
bbd43d3c
ER
78
79%py_postclean
80
81%clean
82rm -rf $RPM_BUILD_ROOT
83
84%files
85%defattr(644,root,root,755)
86%doc LICENSE README.md CHANGELOG
87%{py_sitescriptdir}/flexmock.py[co]
88%{py_sitescriptdir}/flexmock-%{version}-py*.egg-info
89
90%if %{with python3}
91%files -n python3-flexmock
92%defattr(644,root,root,755)
93%doc LICENSE README.md CHANGELOG
94%{py3_sitescriptdir}/__pycache__/%{module}.*.py[co]
95%{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
96%{py3_sitescriptdir}/%{module}.py
97%endif
This page took 0.08644 seconds and 4 git commands to generate.