14
0

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

- Implement single-spec version.
- Fix source URL.

OBS-URL: https://build.opensuse.org/request/show/494500
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pydotplus?expand=0&rev=3
This commit is contained in:
Todd R
2017-05-11 02:36:01 +00:00
committed by Git OBS Bridge
parent 2a493c25bc
commit 9dd96ee9cc
2 changed files with 32 additions and 8 deletions

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-pydotplus
#
# 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
@@ -15,6 +15,9 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
%bcond_without tests
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-pydotplus
Version: 2.0.2
Release: 0
@@ -22,13 +25,20 @@ License: MIT
Summary: Python interface to Graphviz's Dot language
Url: http://pydotplus.readthedocs.org/
Group: Development/Languages/Python
Source: https://pypi.python.org/packages/source/p/pydotplus/pydotplus-%{version}.tar.gz
BuildRequires: python-devel
BuildRequires: python-setuptools
BuildRequires: python-pyparsing >= 2.0.1
Source: https://files.pythonhosted.org/packages/source/p/pydotplus/pydotplus-%{version}.tar.gz
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module pyparsing >= 2.0.1}
%if %{with tests}
BuildRequires: graphviz
%endif
Requires: python-pyparsing >= 2.0.1
Requires: graphviz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
%python_subpackages
%description
PyDotPlus is an improved version of the old pydot project that provides a
@@ -38,12 +48,20 @@ Python Interface to Graphviz's Dot language.
%setup -q -n pydotplus-%{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}
%files
%if %{with tests}
%check
%{python_expand export PYTHONPATH=%{buildroot}%{$python_sitelib}
$python test/pydot_unittest.py
}
%endif
%files %{python_files}
%defattr(-,root,root,-)
%doc README.rst LICENSE
%{python_sitelib}/*