Accepting request 484325 from home:alois:branches:devel:languages:python

OBS-URL: https://build.opensuse.org/request/show/484325
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-extras?expand=0&rev=18
This commit is contained in:
Thomas Bechtold
2017-04-03 06:30:45 +00:00
committed by Git OBS Bridge
parent 18a38e239d
commit 40a8b75d58
2 changed files with 22 additions and 13 deletions

View File

@@ -1,3 +1,8 @@
-------------------------------------------------------------------
Sat Apr 1 11:09:27 UTC 2017 - aloisio@gmx.com
- Converted to single-spec
-------------------------------------------------------------------
Wed Aug 31 07:57:56 UTC 2016 - aplanas@suse.com

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-extras
#
# 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
@@ -20,6 +20,7 @@
# enable testing with a build conditional (off by default):
%bcond_with tests
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-extras
Version: 1.0.0
Release: 0
@@ -28,18 +29,20 @@ License: MIT
Group: Development/Languages/Python
Url: https://github.com/testing-cabal/extras
Source: https://pypi.io/packages/source/e/extras/extras-%{version}.tar.gz
BuildRequires: python-devel
BuildRequires: python-setuptools
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools}
# Test requirements:
%if %{with tests}
BuildRequires: python-testtools
BuildRequires: %{python_module nose}
BuildRequires: %{python_module testtools}
%endif
BuildRequires: fdupes
BuildRequires: python-rpm-macros
# Break cycle
#!BuildIgnore: python-extras
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()")}
%else
BuildArch: noarch
%endif
%python_subpackages
%description
extras is a set of extensions to the Python standard library, originally
@@ -50,20 +53,21 @@ general use outside of a testing context.
%setup -q -n extras-%{version}
%build
python setup.py build
%python_build
%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
%python_install
%python_expand %fdupes -s %{buildroot}%{$python_sitelib}
%if %{with tests}
%check
python setup.py test
%python_exec %{_bindir}/nosetests
%endif
%files
%files %{python_files}
%defattr(-,root,root,-)
%doc LICENSE NEWS README.rst
%{python_sitelib}/extras-%{version}-py%{py_ver}.egg-info/
%{python_sitelib}/extras
%{python_sitelib}/extras-%{version}-py%{python_version}.egg-info/
%changelog