3 %bcond_with tests # unit tests (not included in sdist)
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
9 Summary(pl.UTF-8): Moduł pomocniczy do testowania skryptów linii poleceń
10 Name: python-%{module}
14 Group: Libraries/Python
15 Source0: https://files.pythonhosted.org/packages/source/s/scripttest/%{module}-%{version}.tar.gz
16 # Source0-md5: 1d1c5117ccfc7b5961cae6c1020c0848
17 URL: https://pypi.org/project/scripttest/
19 BuildRequires: python-modules >= 1:2.5
20 BuildRequires: python-setuptools
22 BuildRequires: python-pytest
26 BuildRequires: python3-modules >= 1:3.2
27 BuildRequires: python3-setuptools
29 BuildRequires: python-pytest
32 BuildRequires: rpm-pythonprov
33 BuildRequires: rpmbuild(macros) >= 1.714
34 Requires: python-modules >= 1:2.5
36 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39 scripttest is a library to help you test your interactive command-line
42 With it you can easily run the command (in a subprocess) and see the
43 output (stdout, stderr) and any file modifications.
45 %description -l pl.UTF-8
46 scripttest to biblioteka pomagająca testować interaktywne aplikacje
49 Przy jej użyciu mozna łatwo uruchamiać polecenia (w podprocesie) i
50 sprawdzać wyjście (stdout, stderr) oraz zmiany dowolnych plików.
52 %package -n python3-%{module}
53 Summary: Helper to test command-line scripts
54 Summary(pl.UTF-8): Moduł pomocniczy do testowania skryptów linii poleceń
55 Group: Libraries/Python
56 Requires: python3-modules >= 1:3.2
58 %description -n python3-%{module}
59 scripttest is a library to help you test your interactive command-line
62 With it you can easily run the command (in a subprocess) and see the
63 output (stdout, stderr) and any file modifications.
65 %description -n python3-%{module} -l pl.UTF-8
66 scripttest to biblioteka pomagająca testować interaktywne aplikacje
69 Przy jej użyciu mozna łatwo uruchamiać polecenia (w podprocesie) i
70 sprawdzać wyjście (stdout, stderr) oraz zmiany dowolnych plików.
73 %setup -q -n %{module}-%{version}
77 %py_build %{?with_tests:test}
81 %py3_build %{?with_tests:test}
85 rm -rf $RPM_BUILD_ROOT
98 rm -rf $RPM_BUILD_ROOT
102 %defattr(644,root,root,755)
104 %{py_sitescriptdir}/scripttest.py[co]
105 %{py_sitescriptdir}/scripttest-%{version}-py*.egg-info
109 %files -n python3-%{module}
110 %defattr(644,root,root,755)
112 %{py3_sitescriptdir}/scripttest.py
113 %{py3_sitescriptdir}/__pycache__/scripttest.cpython-*.py[co]
114 %{py3_sitescriptdir}/scripttest-%{version}-py*.egg-info