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