forked from pool/python-pydicom
Accepting request 632267 from devel:languages:python
- Disable test_code_file as it randomly fails in OBS - 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/request/show/632267 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pydicom?expand=0&rev=4
This commit is contained in:
commit
5f8f93b20a
60
license.txt
60
license.txt
@ -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.
|
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:09b82896319d9b0e5e95dae64875c37413b6ca9b974f4bb785564875f617236a
|
|
||||||
size 422348
|
|
3
pydicom-1.1.0.tar.gz
Normal file
3
pydicom-1.1.0.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:9e3cb1d4e2f46203bf2785cf26d3897868e40e167110e4559603b20eff9bc1ec
|
||||||
|
size 6724086
|
@ -1,3 +1,17 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Aug 30 08:34:34 UTC 2018 - Tomáš Chvátal <tchvatal@suse.com>
|
||||||
|
|
||||||
|
- Disable test_code_file as it randomly fails in OBS
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
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
|
Mon Sep 11 15:14:49 UTC 2017 - jengelh@inai.de
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package python-pydicom
|
# 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
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -18,27 +18,25 @@
|
|||||||
|
|
||||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||||
%define oldpython python
|
%define oldpython python
|
||||||
%bcond_without test
|
|
||||||
Name: python-pydicom
|
Name: python-pydicom
|
||||||
Version: 0.9.9
|
Version: 1.1.0
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Pure python package for DICOM medical file reading and writing
|
Summary: Pure python package for DICOM medical file reading and writing
|
||||||
License: MIT
|
License: MIT
|
||||||
Group: Development/Languages/Python
|
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
|
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.
|
Patch0: python37.patch
|
||||||
Source1: license.txt
|
BuildRequires: %{python_module pytest-runner}
|
||||||
BuildRequires: %{python_module devel}
|
BuildRequires: %{python_module pytest}
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
|
BuildArch: noarch
|
||||||
%ifpython2
|
%ifpython2
|
||||||
Obsoletes: %{oldpython}-dicom < %{version}
|
Obsoletes: %{oldpython}-dicom < %{version}
|
||||||
Provides: %{oldpython}-dicom = %{version}
|
Provides: %{oldpython}-dicom = %{version}
|
||||||
%endif
|
%endif
|
||||||
BuildArch: noarch
|
|
||||||
|
|
||||||
%python_subpackages
|
%python_subpackages
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -52,7 +50,7 @@ and radiotherapy objects.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n pydicom-%{version}
|
%setup -q -n pydicom-%{version}
|
||||||
cp %{SOURCE1} ./
|
%autopatch -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%python_build
|
%python_build
|
||||||
@ -61,15 +59,13 @@ cp %{SOURCE1} ./
|
|||||||
%python_install
|
%python_install
|
||||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||||
|
|
||||||
%if %{with test}
|
|
||||||
%check
|
%check
|
||||||
|
# test_code_file - randomly fails in OBS
|
||||||
export LANG=en_US.UTF-8
|
export LANG=en_US.UTF-8
|
||||||
%python_exec setup.py test
|
%python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} py.test-%{$python_version} pydicom/tests -k 'not test_code_file'
|
||||||
%endif
|
|
||||||
|
|
||||||
%files %{python_files}
|
%files %{python_files}
|
||||||
%defattr(-,root,root,-)
|
%license LICENSE
|
||||||
%doc license.txt
|
|
||||||
%{python_sitelib}/*
|
%{python_sitelib}/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
36
python37.patch
Normal file
36
python37.patch
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
From 3ca897f772e0376e83d32897bebe378742b57ce4 Mon Sep 17 00:00:00 2001
|
||||||
|
From: mrbean-bremen <mrbean-bremen@users.noreply.github.com>
|
||||||
|
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.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user