[packages/python-scripttest] new package

jajcus jajcus at pld-linux.org
Wed Nov 25 21:00:14 CET 2015


commit 434a00795c420c33331371bb65ee64e1eee7b8dc
Author: Jacek Konieczny <jajcus at jajcus.net>
Date:   Wed Nov 25 20:59:53 2015 +0100

    new package

 python-scripttest.spec | 98 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 98 insertions(+)
---
diff --git a/python-scripttest.spec b/python-scripttest.spec
new file mode 100644
index 0000000..be356bf
--- /dev/null
+++ b/python-scripttest.spec
@@ -0,0 +1,98 @@
+#
+# Conditional build:
+%bcond_with	tests	# do perform tests (not included)
+%bcond_without	python2 # CPython 2.x module
+%bcond_without	python3 # CPython 3.x module
+
+%define 	module	scripttest
+Summary:	Helper to test command-line scripts
+Name:		python-%{module}
+Version:	1.3
+Release:	1
+License:	MIT
+Group:		Libraries/Python
+Source0:	https://pypi.python.org/packages/source/s/scripttest/%{module}-%{version}.tar.gz
+# Source0-md5:	1d1c5117ccfc7b5961cae6c1020c0848
+URL:		http://pythonpaste.org/scripttest/
+BuildRequires:	rpm-pythonprov
+BuildRequires:	rpmbuild(macros) >= 1.710
+%if %{with python2}
+BuildRequires:	python-setuptools
+%if %{with tests}
+BuildRequires:	python-pytest
+%endif
+%endif
+%if %{with python3}
+BuildRequires:	python3-setuptools
+%if %{with tests}
+BuildRequires:	python-pytest
+%endif
+%endif
+Requires:	python-modules
+BuildArch:	noarch
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+scripttest is a library to help you test your interactive command-line
+applications.
+
+With it you can easily run the command (in a subprocess) and see the
+output (stdout, stderr) and any file modifications.
+
+%package -n python3-%{module}
+Summary:	Helper to test command-line scripts
+Group:		Libraries/Python
+Requires:	python3-modules
+
+%description -n python3-%{module}
+scripttest is a library to help you test your interactive command-line
+applications.
+
+With it you can easily run the command (in a subprocess) and see the
+output (stdout, stderr) and any file modifications.
+
+%prep
+%setup -q -n %{module}-%{version}
+
+%build
+%if %{with python2}
+%py_build %{?with_tests:test}
+%endif
+
+%if %{with python3}
+%py3_build %{?with_tests:test}
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%if %{with python2}
+%py_install
+%endif
+
+%if %{with python3}
+%py3_install
+%endif
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%if %{with python2}
+%files
+%defattr(644,root,root,755)
+%doc README.rst
+%{py_sitescriptdir}/%{module}*.py
+%{py_sitescriptdir}/%{module}*.py[co]
+%if "%{py_ver}" > "2.4"
+%{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
+%endif
+%endif
+
+%if %{with python3}
+%files -n python3-%{module}
+%defattr(644,root,root,755)
+%doc README.rst
+%{py3_sitescriptdir}/%{module}.py
+%{py3_sitescriptdir}/__pycache__/%{module}.*
+%{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
+%endif
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-scripttest.git/commitdiff/434a00795c420c33331371bb65ee64e1eee7b8dc



More information about the pld-cvs-commit mailing list