]> git.pld-linux.org Git - packages/python-scripttest.git/blame - python-scripttest.spec
- updated URLs and packaging
[packages/python-scripttest.git] / python-scripttest.spec
CommitLineData
434a0079
JK
1#
2# Conditional build:
343939f1 3%bcond_with tests # unit tests (not included in sdist)
434a0079
JK
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
343939f1 9Summary(pl.UTF-8): Moduł pomocniczy do testowania skryptów linii poleceń
434a0079
JK
10Name: python-%{module}
11Version: 1.3
242928e8 12Release: 9
434a0079
JK
13License: MIT
14Group: Libraries/Python
343939f1 15Source0: https://files.pythonhosted.org/packages/source/s/scripttest/%{module}-%{version}.tar.gz
434a0079 16# Source0-md5: 1d1c5117ccfc7b5961cae6c1020c0848
343939f1 17URL: https://pypi.org/project/scripttest/
434a0079 18%if %{with python2}
343939f1 19BuildRequires: python-modules >= 1:2.5
434a0079
JK
20BuildRequires: python-setuptools
21%if %{with tests}
22BuildRequires: python-pytest
23%endif
24%endif
25%if %{with python3}
343939f1 26BuildRequires: python3-modules >= 1:3.2
434a0079
JK
27BuildRequires: python3-setuptools
28%if %{with tests}
29BuildRequires: python-pytest
30%endif
31%endif
343939f1
JB
32BuildRequires: rpm-pythonprov
33BuildRequires: rpmbuild(macros) >= 1.714
34Requires: python-modules >= 1:2.5
434a0079
JK
35BuildArch: noarch
36BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37
38%description
39scripttest is a library to help you test your interactive command-line
40applications.
41
42With it you can easily run the command (in a subprocess) and see the
43output (stdout, stderr) and any file modifications.
44
343939f1
JB
45%description -l pl.UTF-8
46scripttest to biblioteka pomagająca testować interaktywne aplikacje
47linii poleceń.
48
49Przy jej użyciu mozna łatwo uruchamiać polecenia (w podprocesie) i
50sprawdzać wyjście (stdout, stderr) oraz zmiany dowolnych plików.
51
434a0079
JK
52%package -n python3-%{module}
53Summary: Helper to test command-line scripts
343939f1 54Summary(pl.UTF-8): Moduł pomocniczy do testowania skryptów linii poleceń
434a0079 55Group: Libraries/Python
343939f1 56Requires: python3-modules >= 1:3.2
434a0079
JK
57
58%description -n python3-%{module}
59scripttest is a library to help you test your interactive command-line
60applications.
61
62With it you can easily run the command (in a subprocess) and see the
63output (stdout, stderr) and any file modifications.
64
343939f1
JB
65%description -n python3-%{module} -l pl.UTF-8
66scripttest to biblioteka pomagająca testować interaktywne aplikacje
67linii poleceń.
68
69Przy jej użyciu mozna łatwo uruchamiać polecenia (w podprocesie) i
70sprawdzać wyjście (stdout, stderr) oraz zmiany dowolnych plików.
71
434a0079
JK
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
85rm -rf $RPM_BUILD_ROOT
86
87%if %{with python2}
88%py_install
343939f1
JB
89
90%py_postclean
434a0079
JK
91%endif
92
93%if %{with python3}
94%py3_install
95%endif
96
97%clean
98rm -rf $RPM_BUILD_ROOT
99
100%if %{with python2}
101%files
102%defattr(644,root,root,755)
103%doc README.rst
343939f1
JB
104%{py_sitescriptdir}/scripttest.py[co]
105%{py_sitescriptdir}/scripttest-%{version}-py*.egg-info
434a0079
JK
106%endif
107
108%if %{with python3}
109%files -n python3-%{module}
110%defattr(644,root,root,755)
111%doc README.rst
343939f1
JB
112%{py3_sitescriptdir}/scripttest.py
113%{py3_sitescriptdir}/__pycache__/scripttest.cpython-*.py[co]
114%{py3_sitescriptdir}/scripttest-%{version}-py*.egg-info
434a0079 115%endif
This page took 0.159855 seconds and 4 git commands to generate.