forked from pool/python-testrepository
Accepting request 496807 from devel:languages:python
1 OBS-URL: https://build.opensuse.org/request/show/496807 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-testrepository?expand=0&rev=17
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri May 19 14:12:32 UTC 2017 - tbechtold@suse.com
|
||||
|
||||
- Convert to singlespec
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jul 14 17:39:14 UTC 2016 - dmueller@suse.com
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-testrepository
|
||||
#
|
||||
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -16,6 +16,7 @@
|
||||
#
|
||||
|
||||
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
Name: python-testrepository
|
||||
Version: 0.0.20
|
||||
Release: 0
|
||||
@@ -23,16 +24,18 @@ Summary: A repository of test results
|
||||
License: BSD-3-Clause or Apache-2.0
|
||||
Group: Development/Languages/Python
|
||||
Url: https://launchpad.net/testrepository
|
||||
Source: http://pypi.python.org/packages/source/t/testrepository/testrepository-%{version}.tar.gz
|
||||
BuildRequires: python-devel
|
||||
BuildRequires: python-extras
|
||||
BuildRequires: python-fixtures
|
||||
BuildRequires: python-pbr
|
||||
BuildRequires: python-python-mimeparse
|
||||
BuildRequires: python-python-subunit >= 0.0.18
|
||||
BuildRequires: python-setuptools
|
||||
BuildRequires: python-testscenarios
|
||||
BuildRequires: python-testtools >= 0.9.30
|
||||
Source: https://pypi.io/packages/source/t/testrepository/testrepository-%{version}.tar.gz
|
||||
BuildRequires: %{python_module devel}
|
||||
BuildRequires: %{python_module extras}
|
||||
BuildRequires: %{python_module fixtures}
|
||||
BuildRequires: %{python_module pbr}
|
||||
BuildRequires: %{python_module python-mimeparse}
|
||||
BuildRequires: %{python_module python-subunit}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: %{python_module testresources}
|
||||
BuildRequires: %{python_module testscenarios}
|
||||
BuildRequires: %{python_module testtools}
|
||||
BuildRequires: python-rpm-macros
|
||||
Requires: python-extras
|
||||
Requires: python-fixtures
|
||||
Requires: python-python-subunit >= 0.0.10
|
||||
@@ -41,12 +44,9 @@ Requires: python-testtools >= 0.9.30
|
||||
Requires(post): update-alternatives
|
||||
Requires(postun): update-alternatives
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
|
||||
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
|
||||
Requires: python-discover
|
||||
%else
|
||||
BuildArch: noarch
|
||||
%endif
|
||||
|
||||
%python_subpackages
|
||||
|
||||
%description
|
||||
This project provides a database of test results which can be used as part of
|
||||
@@ -62,37 +62,24 @@ subunit or be converted into a subunit stream can be accepted).
|
||||
|
||||
%prep
|
||||
%setup -q -n testrepository-%{version}
|
||||
sed -i -e "s|testr = |testr-%{py_ver} = |" \
|
||||
-e "s|'testr'|'testr-%{py_ver}'|" setup.py
|
||||
mv testr testr-%{py_ver}
|
||||
|
||||
%build
|
||||
python setup.py build
|
||||
%python_build
|
||||
|
||||
%install
|
||||
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
||||
touch %{buildroot}%{_sysconfdir}/alternatives/testr
|
||||
ln -sf %{_sysconfdir}/alternatives/testr %{buildroot}/%{_bindir}/testr
|
||||
|
||||
%check
|
||||
python setup.py test
|
||||
%python_install
|
||||
%python_clone -a %{buildroot}%{_bindir}/testr
|
||||
|
||||
%post
|
||||
update-alternatives \
|
||||
--install %{_bindir}/testr testr %{_bindir}/testr-%{py_ver} 20
|
||||
%python_install_alternative testr
|
||||
|
||||
%postun
|
||||
if [ $1 -eq 0 ] ; then
|
||||
update-alternatives --remove testr %{_bindir}/testr-%{py_ver}
|
||||
fi
|
||||
%preun
|
||||
%python_uninstall_alternative testr
|
||||
|
||||
%files
|
||||
%files %{python_files}
|
||||
%defattr(-,root,root,-)
|
||||
%doc Apache-2.0 COPYING NEWS README.txt BSD
|
||||
%{_bindir}/testr
|
||||
%{_bindir}/testr-%{py_ver}
|
||||
%ghost %{_sysconfdir}/alternatives/testr
|
||||
%python_alternative %{_bindir}/testr
|
||||
%{python_sitelib}/*
|
||||
|
||||
%changelog
|
||||
|
Reference in New Issue
Block a user