]> git.pld-linux.org Git - packages/python-scripttest.git/blob - python-scripttest.spec
7db45f3ca51deeb17030b0bc326ff06ea65cd957
[packages/python-scripttest.git] / python-scripttest.spec
1 #
2 # Conditional build:
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
6
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}
11 Version:        1.3
12 Release:        9
13 License:        MIT
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/
18 %if %{with python2}
19 BuildRequires:  python-modules >= 1:2.5
20 BuildRequires:  python-setuptools
21 %if %{with tests}
22 BuildRequires:  python-pytest
23 %endif
24 %endif
25 %if %{with python3}
26 BuildRequires:  python3-modules >= 1:3.2
27 BuildRequires:  python3-setuptools
28 %if %{with tests}
29 BuildRequires:  python-pytest
30 %endif
31 %endif
32 BuildRequires:  rpm-pythonprov
33 BuildRequires:  rpmbuild(macros) >= 1.714
34 Requires:       python-modules >= 1:2.5
35 BuildArch:      noarch
36 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37
38 %description
39 scripttest is a library to help you test your interactive command-line
40 applications.
41
42 With it you can easily run the command (in a subprocess) and see the
43 output (stdout, stderr) and any file modifications.
44
45 %description -l pl.UTF-8
46 scripttest to biblioteka pomagająca testować interaktywne aplikacje
47 linii poleceń.
48
49 Przy jej użyciu mozna łatwo uruchamiać polecenia (w podprocesie) i
50 sprawdzać wyjście (stdout, stderr) oraz zmiany dowolnych plików.
51
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
57
58 %description -n python3-%{module}
59 scripttest is a library to help you test your interactive command-line
60 applications.
61
62 With it you can easily run the command (in a subprocess) and see the
63 output (stdout, stderr) and any file modifications.
64
65 %description -n python3-%{module} -l pl.UTF-8
66 scripttest to biblioteka pomagająca testować interaktywne aplikacje
67 linii poleceń.
68
69 Przy jej użyciu mozna łatwo uruchamiać polecenia (w podprocesie) i
70 sprawdzać wyjście (stdout, stderr) oraz zmiany dowolnych plików.
71
72 %prep
73 %setup -q -n %{module}-%{version}
74
75 %build
76 %if %{with python2}
77 %py_build %{?with_tests:test}
78 %endif
79
80 %if %{with python3}
81 %py3_build %{?with_tests:test}
82 %endif
83
84 %install
85 rm -rf $RPM_BUILD_ROOT
86
87 %if %{with python2}
88 %py_install
89
90 %py_postclean
91 %endif
92
93 %if %{with python3}
94 %py3_install
95 %endif
96
97 %clean
98 rm -rf $RPM_BUILD_ROOT
99
100 %if %{with python2}
101 %files
102 %defattr(644,root,root,755)
103 %doc README.rst
104 %{py_sitescriptdir}/scripttest.py[co]
105 %{py_sitescriptdir}/scripttest-%{version}-py*.egg-info
106 %endif
107
108 %if %{with python3}
109 %files -n python3-%{module}
110 %defattr(644,root,root,755)
111 %doc README.rst
112 %{py3_sitescriptdir}/scripttest.py
113 %{py3_sitescriptdir}/__pycache__/scripttest.cpython-*.py[co]
114 %{py3_sitescriptdir}/scripttest-%{version}-py*.egg-info
115 %endif
This page took 0.100609 seconds and 3 git commands to generate.