From 687e11feefe3fa24d7380d56eea30f353fc694d2722766468ee1473e61271245 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Wed, 29 Aug 2018 12:15:08 +0000 Subject: [PATCH] - Update to 1.1.0: * License is distributed * Various speed improvements - Add patch to work with python 3.7: * python37.patch OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pydicom?expand=0&rev=7 --- license.txt | 60 ------------------------------------------ pydicom-0.9.9.tar.gz | 3 --- pydicom-1.1.0.tar.gz | 3 +++ python-pydicom.changes | 9 +++++++ python-pydicom.spec | 25 +++++++----------- python37.patch | 36 +++++++++++++++++++++++++ 6 files changed, 58 insertions(+), 78 deletions(-) delete mode 100644 license.txt delete mode 100644 pydicom-0.9.9.tar.gz create mode 100644 pydicom-1.1.0.tar.gz create mode 100644 python37.patch diff --git a/license.txt b/license.txt deleted file mode 100644 index aeb8051..0000000 --- a/license.txt +++ /dev/null @@ -1,60 +0,0 @@ -License file for pydicom, a pure-python DICOM library - -Copyright (c) 2008-2010 Darcy Mason and pydicom contributors - -Except for portions outlined below, pydicom is released under an MIT license: - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -Portions of pydicom (private dictionary file(s)) were generated from the -private dictionary of the GDCM library, released under the following license: - - Program: GDCM (Grassroots DICOM). A DICOM library - Module: http://gdcm.sourceforge.net/Copyright.html - -Copyright (c) 2006-2010 Mathieu Malaterre -Copyright (c) 1993-2005 CREATIS -(CREATIS = Centre de Recherche et d'Applications en Traitement de l'Image) -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - * Neither name of Mathieu Malaterre, or CREATIS, nor the names of any - contributors (CNRS, INSERM, UCB, Universite Lyon I), may be used to - endorse or promote products derived from this software without specific - prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/pydicom-0.9.9.tar.gz b/pydicom-0.9.9.tar.gz deleted file mode 100644 index b143d46..0000000 --- a/pydicom-0.9.9.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:09b82896319d9b0e5e95dae64875c37413b6ca9b974f4bb785564875f617236a -size 422348 diff --git a/pydicom-1.1.0.tar.gz b/pydicom-1.1.0.tar.gz new file mode 100644 index 0000000..7abf6f1 --- /dev/null +++ b/pydicom-1.1.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9e3cb1d4e2f46203bf2785cf26d3897868e40e167110e4559603b20eff9bc1ec +size 6724086 diff --git a/python-pydicom.changes b/python-pydicom.changes index c2dc8c9..f88f122 100644 --- a/python-pydicom.changes +++ b/python-pydicom.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Wed Aug 29 12:04:20 UTC 2018 - tchvatal@suse.com + +- Update to 1.1.0: + * License is distributed + * Various speed improvements +- Add patch to work with python 3.7: + * python37.patch + ------------------------------------------------------------------- Mon Sep 11 15:14:49 UTC 2017 - jengelh@inai.de diff --git a/python-pydicom.spec b/python-pydicom.spec index a00c94a..c8bf57d 100644 --- a/python-pydicom.spec +++ b/python-pydicom.spec @@ -1,7 +1,7 @@ # # spec file for package python-pydicom # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2018 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 @@ -18,27 +18,25 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} %define oldpython python -%bcond_without test Name: python-pydicom -Version: 0.9.9 +Version: 1.1.0 Release: 0 Summary: Pure python package for DICOM medical file reading and writing License: MIT Group: Development/Languages/Python -Url: https://github.com/darcymason/pydicom +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_module devel} +Patch0: python37.patch +BuildRequires: %{python_module pytest-runner} +BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros +BuildArch: noarch %ifpython2 Obsoletes: %{oldpython}-dicom < %{version} Provides: %{oldpython}-dicom = %{version} %endif -BuildArch: noarch - %python_subpackages %description @@ -52,7 +50,7 @@ and radiotherapy objects. %prep %setup -q -n pydicom-%{version} -cp %{SOURCE1} ./ +%autopatch -p1 %build %python_build @@ -61,15 +59,12 @@ cp %{SOURCE1} ./ %python_install %python_expand %fdupes %{buildroot}%{$python_sitelib} -%if %{with test} %check export LANG=en_US.UTF-8 -%python_exec setup.py test -%endif +%python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} py.test-%{$python_version} pydicom/tests %files %{python_files} -%defattr(-,root,root,-) -%doc license.txt +%license LICENSE %{python_sitelib}/* %changelog diff --git a/python37.patch b/python37.patch new file mode 100644 index 0000000..a0029ab --- /dev/null +++ b/python37.patch @@ -0,0 +1,36 @@ +From 3ca897f772e0376e83d32897bebe378742b57ce4 Mon Sep 17 00:00:00 2001 +From: mrbean-bremen +Date: Sat, 30 Jun 2018 21:49:24 +0200 +Subject: [PATCH] Execute date time tests only for the backport to Python 2 + (#670) + +- added Travis config for Python 3.7 +- fixes #668 +--- + pydicom/tests/test_fixes.py | 5 +++++ + 2 files changed, 12 insertions(+) + +Index: pydicom-1.1.0/pydicom/tests/test_fixes.py +=================================================================== +--- pydicom-1.1.0.orig/pydicom/tests/test_fixes.py ++++ pydicom-1.1.0/pydicom/tests/test_fixes.py +@@ -12,7 +12,10 @@ from datetime import datetime + from datetime import timedelta + from datetime import tzinfo + ++import pytest ++ + import pydicom as pydicom_module ++from pydicom import compat + from pydicom.util.fixes import timezone + + pickle_choices = [(pickle, pickle, proto) +@@ -82,6 +85,8 @@ class USTimeZone(tzinfo): + Eastern = USTimeZone(-5, "Eastern", "EST", "EDT") + + ++@pytest.mark.skipif(not compat.in_py2, ++ reason='only test the backport to Python 2') + class TestTimeZone(unittest.TestCase): + """Backport of datetime.timezone tests. +