From 9dd96ee9cc0a8b4e3ca006c048fcfb79ae253e9651b99cf753f153934e93e3cb Mon Sep 17 00:00:00 2001 From: Todd R Date: Thu, 11 May 2017 02:36:01 +0000 Subject: [PATCH] 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 --- python-pydotplus.changes | 6 ++++++ python-pydotplus.spec | 34 ++++++++++++++++++++++++++-------- 2 files changed, 32 insertions(+), 8 deletions(-) diff --git a/python-pydotplus.changes b/python-pydotplus.changes index 3fa9730..f9c20cd 100644 --- a/python-pydotplus.changes +++ b/python-pydotplus.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu May 11 02:34:26 UTC 2017 - toddrme2178@gmail.com + +- Implement single-spec version. +- Fix source URL. + ------------------------------------------------------------------- Mon Jul 25 09:23:18 UTC 2016 - tbechtold@suse.com diff --git a/python-pydotplus.spec b/python-pydotplus.spec index b36bf2f..079b89f 100644 --- a/python-pydotplus.spec +++ b/python-pydotplus.spec @@ -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}/*