]> git.pld-linux.org Git - packages/python-scripttest.git/blame - python-scripttest.spec
- release 4 (by relup.sh)
[packages/python-scripttest.git] / python-scripttest.spec
CommitLineData
434a0079
JK
1#
2# Conditional build:
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
6
7%define module scripttest
8Summary: Helper to test command-line scripts
9Name: python-%{module}
10Version: 1.3
728d3d43 11Release: 4
434a0079
JK
12License: MIT
13Group: Libraries/Python
14Source0: https://pypi.python.org/packages/source/s/scripttest/%{module}-%{version}.tar.gz
15# Source0-md5: 1d1c5117ccfc7b5961cae6c1020c0848
16URL: http://pythonpaste.org/scripttest/
17BuildRequires: rpm-pythonprov
18BuildRequires: rpmbuild(macros) >= 1.710
19%if %{with python2}
20BuildRequires: python-setuptools
21%if %{with tests}
22BuildRequires: python-pytest
23%endif
24%endif
25%if %{with python3}
26BuildRequires: python3-setuptools
27%if %{with tests}
28BuildRequires: python-pytest
29%endif
30%endif
31Requires: python-modules
32BuildArch: noarch
33BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34
35%description
36scripttest is a library to help you test your interactive command-line
37applications.
38
39With it you can easily run the command (in a subprocess) and see the
40output (stdout, stderr) and any file modifications.
41
42%package -n python3-%{module}
43Summary: Helper to test command-line scripts
44Group: Libraries/Python
45Requires: python3-modules
46
47%description -n python3-%{module}
48scripttest is a library to help you test your interactive command-line
49applications.
50
51With it you can easily run the command (in a subprocess) and see the
52output (stdout, stderr) and any file modifications.
53
54%prep
55%setup -q -n %{module}-%{version}
56
57%build
58%if %{with python2}
59%py_build %{?with_tests:test}
60%endif
61
62%if %{with python3}
63%py3_build %{?with_tests:test}
64%endif
65
66%install
67rm -rf $RPM_BUILD_ROOT
68
69%if %{with python2}
70%py_install
71%endif
72
73%if %{with python3}
74%py3_install
75%endif
76
77%clean
78rm -rf $RPM_BUILD_ROOT
79
80%if %{with python2}
81%files
82%defattr(644,root,root,755)
83%doc README.rst
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
88%endif
89%endif
90
91%if %{with python3}
92%files -n python3-%{module}
93%defattr(644,root,root,755)
94%doc README.rst
95%{py3_sitescriptdir}/%{module}.py
96%{py3_sitescriptdir}/__pycache__/%{module}.*
97%{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
98%endif
This page took 0.108938 seconds and 4 git commands to generate.