]> git.pld-linux.org Git - packages/python-chai.git/blame - python-chai.spec
rebuild with tests and docs
[packages/python-chai.git] / python-chai.spec
CommitLineData
550f5c2e
ER
1#
2# Conditional build:
3%bcond_without tests # do not perform "make test"
4%bcond_without python2 # CPython 2.x module
5%bcond_without python3 # CPython 3.x module
6
7%define module chai
8Summary: Easy to use mocking/stub/spy framework
9Name: python-%{module}
10Version: 1.0.0
8f0ebfd3 11Release: 12
550f5c2e
ER
12License: BSD
13Group: Development/Libraries
14Source0: http://pypi.python.org/packages/source/c/%{module}/%{module}-%{version}.tar.gz
15# Source0-md5: fce8d1deb08ef6c1fb2b56eea7ae7b67
16URL: http://pypi.python.org/pypi/chai
d2a01302 17BuildRequires: rpmbuild(macros) >= 1.710
550f5c2e
ER
18BuildRequires: python-devel
19BuildRequires: python-nose
405a6452
ER
20BuildRequires: python-setuptools
21BuildRequires: rpm-pythonprov
550f5c2e
ER
22%if %{with python3}
23BuildRequires: python3-devel
24BuildRequires: python3-nose
405a6452 25BuildRequires: python3-setuptools
550f5c2e 26%endif
405a6452 27BuildArch: noarch
550f5c2e
ER
28BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29
30%description
31Chai provides a very easy to use API for mocking/stubbing your Python
32objects, patterned after the Mocha <http://mocha.rubyforge.org/>
33library for Ruby.
34
35%package -n python3-%{module}
36Summary: Easy to use mocking/stub framework
37Group: Development/Libraries
38
39%description -n python3-%{module}
40Chai provides a very easy to use API for mocking/stubbing your python
41objects, patterned after the Mocha <http://mocha.rubyforge.org/>
42library for Ruby.
43
44%prep
45%setup -q -n %{module}-%{version}
46
47# Remove bundled egg-info in case it exists
48rm -r %{module}.egg-info
49
50%build
51%if %{with python2}
8c05cfe8 52%py_build %{?with_tests:test}
550f5c2e
ER
53%endif
54
55%if %{with python3}
56# Remove python2 compatibility files
57# Makes tests fail and are not needed on python3
58rm chai/python2.py
59rm tests/comparator_py2.py
60# signature mismatch
61rm tests/stub_test.py
62
8c05cfe8 63%py3_build %{?with_tests:test}
550f5c2e
ER
64%endif
65
66%install
67rm -rf $RPM_BUILD_ROOT
68%if %{with python2}
8c05cfe8 69%py_install
550f5c2e
ER
70
71%py_postclean
72%endif
73
74%if %{with python3}
8c05cfe8 75%py3_install
550f5c2e
ER
76%endif
77
78%clean
79rm -rf $RPM_BUILD_ROOT
80
81%files
82%defattr(644,root,root,755)
83%doc README.rst LICENSE.txt
84%{py_sitescriptdir}/chai
85%{py_sitescriptdir}/chai-%{version}-py*.egg-info
86
87%if %{with python3}
88%files -n python3-%{module}
89%defattr(644,root,root,755)
90%doc README.rst LICENSE.txt
91%{py3_sitescriptdir}/chai
92%{py3_sitescriptdir}/chai-%{version}-py*.egg-info
93%endif
This page took 0.082081 seconds and 4 git commands to generate.