]> git.pld-linux.org Git - packages/python-flexmock.git/blob - python-flexmock.spec
rebuild with tests and docs
[packages/python-flexmock.git] / python-flexmock.spec
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
7 Summary:        Testing library that makes it easy to create mocks, stubs and fakes
8 Name:           python-%{module}
9 Version:        0.9.6
10 Release:        13
11 License:        BSD
12 Group:          Libraries/Python
13 Source0:        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/
17 Source1:        %{name}-%{version}-tests.tgz
18 # Source1-md5:  6cecfda41b4b86a66dc9b6fc3aa9b002
19 URL:            https://github.com/has207/flexmock
20 BuildRequires:  python-devel
21 BuildRequires:  python-setuptools
22 BuildRequires:  rpm-pythonprov
23 BuildRequires:  rpmbuild(macros) >= 1.710
24 BuildRequires:  sed >= 4.0
25 %if %{with python3}
26 BuildRequires:  python3-devel
27 BuildRequires:  python3-modules
28 BuildRequires:  python3-setuptools
29 %endif
30 BuildArch:      noarch
31 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33 %description
34 Flexmock is a testing library for Python that makes it easy to create
35 mocks, stubs and fakes. The API is inspired by a Ruby library of the
36 same name, but Python flexmock is not a clone of the Ruby version. It
37 omits a number of redundancies in the Ruby flexmock API, alters some
38 defaults, and introduces a number of Python-only features.
39
40 %package -n python3-flexmock
41 Summary:        Testing library that makes it easy to create mocks, stubs and fakes
42 Group:          Libraries/Python
43
44 %description -n python3-flexmock
45 Flexmock is a testing library for Python that makes it easy to create
46 mocks, stubs and fakes. The API is inspired by a Ruby library of the
47 same name, but Python flexmock is not a clone of the Ruby version. It
48 omits a number of redundancies in the Ruby flexmock API, alters some
49 defaults, and introduces a number of Python-only features.
50
51 %prep
52 %setup -q -n %{module}-%{version}
53 install -d build/lib
54 %{__tar} xf %{SOURCE1} -C build/lib
55
56 %build
57 %py_build
58
59 %if %{with python3}
60 %py3_build
61 %endif
62
63 %if %{with tests}
64 PYTHONPATH=build-2/lib %{__python} tests/flexmock_unittest_test.py
65
66 %if %{with python3}
67 PYTHONPATH=build-3/lib %{__python3} tests/flexmock_unittest_test.py
68 %endif
69 %endif
70
71 %install
72 rm -rf $RPM_BUILD_ROOT
73 %if %{with python3}
74 %py3_install
75 %endif
76
77 %py_install
78
79 %py_postclean
80
81 %clean
82 rm -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.071884 seconds and 3 git commands to generate.