3 %bcond_with tests # do perform tests (not included)
4 %bcond_without python2 # CPython 2.x module
5 %bcond_without python3 # CPython 3.x module
7 %define module scripttest
8 Summary: Helper to test command-line scripts
13 Group: Libraries/Python
14 Source0: https://pypi.python.org/packages/source/s/scripttest/%{module}-%{version}.tar.gz
15 # Source0-md5: 1d1c5117ccfc7b5961cae6c1020c0848
16 URL: http://pythonpaste.org/scripttest/
17 BuildRequires: rpm-pythonprov
18 BuildRequires: rpmbuild(macros) >= 1.710
20 BuildRequires: python-setuptools
22 BuildRequires: python-pytest
26 BuildRequires: python3-setuptools
28 BuildRequires: python-pytest
31 Requires: python-modules
33 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36 scripttest is a library to help you test your interactive command-line
39 With it you can easily run the command (in a subprocess) and see the
40 output (stdout, stderr) and any file modifications.
42 %package -n python3-%{module}
43 Summary: Helper to test command-line scripts
44 Group: Libraries/Python
45 Requires: python3-modules
47 %description -n python3-%{module}
48 scripttest is a library to help you test your interactive command-line
51 With it you can easily run the command (in a subprocess) and see the
52 output (stdout, stderr) and any file modifications.
55 %setup -q -n %{module}-%{version}
59 %py_build %{?with_tests:test}
63 %py3_build %{?with_tests:test}
67 rm -rf $RPM_BUILD_ROOT
78 rm -rf $RPM_BUILD_ROOT
82 %defattr(644,root,root,755)
84 %{py_sitescriptdir}/%{module}*.py
85 %{py_sitescriptdir}/%{module}*.py[co]
86 %if "%{py_ver}" > "2.4"
87 %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
92 %files -n python3-%{module}
93 %defattr(644,root,root,755)
95 %{py3_sitescriptdir}/%{module}.py
96 %{py3_sitescriptdir}/__pycache__/%{module}.*
97 %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info