15
0

Accepting request 494507 from home:TheBlackCat:branches:devel:languages:python

- Implement singlespec version
- Fix source URL.
- Update to version 0.2.2

OBS-URL: https://build.opensuse.org/request/show/494507
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-cloudpickle?expand=0&rev=3
This commit is contained in:
Todd R
2017-05-11 03:28:26 +00:00
committed by Git OBS Bridge
parent 918f5352b8
commit 6df99f74ef
4 changed files with 49 additions and 21 deletions

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-cloudpickle
#
# 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,26 +16,32 @@
#
%bcond_without tests
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-cloudpickle
Version: 0.1.1
Version: 0.2.2
Release: 0
Summary: Extended pickling support for Python objects
License: BSD-3-Clause
Group: Development/Languages/Python
Url: https://github.com/cloudpipe/cloudpickle
Source: https://pypi.python.org/packages/source/c/cloudpickle/cloudpickle-%{version}.tar.gz
BuildRequires: python-devel
BuildRequires: python-setuptools
# Test requirements
BuildRequires: python-mock
BuildRequires: python-pytest
BuildRequires: python-pytest-cov
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
Source: https://files.pythonhosted.org/packages/source/c/cloudpickle/cloudpickle-%{version}.tar.gz
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools}
%if %{with tests}
BuildRequires: %{python_module mock}
BuildRequires: %{python_module numpy}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module pytest-cov}
BuildRequires: %{python_module scipy}
BuildRequires: %{python_module tornado}
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
%python_subpackages
%description
The cloudpickle package makes it possible to serialize Python constructs
@@ -54,15 +60,20 @@ functions and classes defined interactively in the __main__ module.
%setup -q -n cloudpickle-%{version}
%build
python setup.py build
%python_build
%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%if %{with tests}
%check
PYTHONPATH="./:%{buildroot}%{python_sitelib}" python setup.py test
# Tests require very specific paths and py.test arguments
export PYTHONPATH='.:tests'
%python_expand py.test-%{$python_bin_suffix} -s
%endif
%files
%files %{python_files}
%defattr(-,root,root,-)
%doc LICENSE README.md
%{python_sitelib}/*