From 5cefc3bed1800815fbc4894ac1ded540674904ab4ae91c8454635eaae0ff38dd Mon Sep 17 00:00:00 2001 From: Todd R Date: Mon, 11 Sep 2017 15:09:39 +0000 Subject: [PATCH] Accepting request 523247 from home:TheBlackCat:branches:devel:languages:python - Implement single-spec version OBS-URL: https://build.opensuse.org/request/show/523247 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pydicom?expand=0&rev=3 --- python-pydicom.changes | 5 +++++ python-pydicom.spec | 31 +++++++++++++++++++++---------- 2 files changed, 26 insertions(+), 10 deletions(-) diff --git a/python-pydicom.changes b/python-pydicom.changes index 514b7d3..e9d709c 100644 --- a/python-pydicom.changes +++ b/python-pydicom.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Sep 11 14:47:43 UTC 2017 - toddrme2178@gmail.com + +- Implement single-spec version + ------------------------------------------------------------------- Thu Oct 13 19:45:31 UTC 2016 - toddrme2178@gmail.com diff --git a/python-pydicom.spec b/python-pydicom.spec index c950618..95ee200 100644 --- a/python-pydicom.spec +++ b/python-pydicom.spec @@ -1,7 +1,7 @@ # # spec file for package python-pydicom # -# 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,6 +16,9 @@ # +%{?!python_module:%define python_module() python-%{**} python3-%{**}} +%define oldpython python +%bcond_without test Name: python-pydicom Version: 0.9.9 Release: 0 @@ -26,13 +29,18 @@ Url: https://github.com/darcymason/pydicom Source: https://files.pythonhosted.org/packages/source/p/pydicom/pydicom-%{version}.tar.gz # This will be included in the tarball in the next release. It can be removed then. Source1: license.txt -BuildRequires: python-devel -BuildRequires: python-setuptools -Provides: python-dicom = %{version} -Obsoletes: python-dicom < %{version} -BuildRoot: %{_tmppath}/%{name}-%{version}-build +BuildRequires: %{python_module devel} +BuildRequires: %{python_module setuptools} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +%ifpython2 +Obsoletes: %{oldpython}-dicom < %{version} +Provides: %{oldpython}-dicom = %{version} +%endif BuildArch: noarch +%python_subpackages + %description pydicom is a pure python package for parsing DICOM files. @@ -49,16 +57,19 @@ Modified datasets can be written again to DICOM format files. cp %{SOURCE1} ./ %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 test} %check export LANG=en_US.UTF-8 -python setup.py test +%python_exec setup.py test +%endif -%files +%files %{python_files} %defattr(-,root,root,-) %doc license.txt %{python_sitelib}/*