15
0

Accepting request 1141566 from home:bnavigator:branches:devel:languages:python

- Update to 2.4.4
  ## Changes
  * Removed support for Python 3.6 (EOL since December 2021)
  ## Enhancements
  * Added attribute alphabetic (#1634)
  * Added attribute json_key (#1648)
  * Added value validation for numerical VRs, add type validation
    for all validated VRs (#1414)
  * CLI commands now accept pydicom charset test files and CLI help
    shows Python Version (#1674)
  * Added support for Python 3.11 (#1658)
  * Added ISfloat to allow non-strict reading of existing files
    with float IS values (#1661)
  * Improved speed of creating and accessing highly nested
    structures (#1728, #1734)
  * Switched to a pyproject.toml build process (#1792)
  * Updated DICOM and UID dicts to DICOM 2023b (#1803)
  ## Fixes
  * Fixed length validation of DS values with maximum length
    without a leading zero (#1632)
  * Increased download speed with progress bar for test data
    (#1611)
  * Fixed crash due to invalid private creator (#1638)
  * Fixed extremely long BytesLengthException error messages
    (#1683)
  * In codify, ensure unique variable names for DICOM keywords
    repeated in sequences, and handle unicode characters correctly
    (#1670)
  * Fixed handling of some invalid values in to_json_dict() if
    suppress_invalid_tags is set to True (#1693)

OBS-URL: https://build.opensuse.org/request/show/1141566
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pydicom?expand=0&rev=28
This commit is contained in:
2024-01-26 09:37:48 +00:00
committed by Git OBS Bridge
parent fa90e1b0cd
commit 1abc033a13
5 changed files with 109 additions and 21 deletions

View File

@@ -16,26 +16,31 @@
#
%{?sle15allpythons}
%{?sle15_python_module_pythons}
Name: python-pydicom
Version: 2.3.1
Version: 2.4.4
Release: 0
Summary: Pure python package for DICOM medical file reading and writing
License: MIT
URL: https://github.com/darcymason/pydicom
Source: https://files.pythonhosted.org/packages/source/p/pydicom/pydicom-%{version}.tar.gz
Source: https://github.com/pydicom/pydicom/archive/refs/tags/v%{version}.tar.gz#/pydicom-%{version}-gh.tar.gz
# PATCH-FIX-UPSTREAM pydicom-pr1908-fixpillow.patch gh#pydicom/pydicom#1908 fixes gh#pydicom/pydicom#1907
Patch0: pydicom-pr1908-fixpillow.patch
BuildRequires: %{python_module base >= 3.7}
BuildRequires: %{python_module flit-core >= 3.2}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
# SECTION test requirements
BuildRequires: %{python_module numpy}
BuildRequires: %{python_module pydicom-data}
BuildRequires: %{python_module Pillow}
BuildRequires: %{python_module pydicom-data}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module requests}
%if 0%{?suse_version} > 1550
# GDCM is not multiflavor in Tumbleweed
BuildRequires: python3-gdcm
%endif
# /SECTION
BuildArch: noarch
Requires(post): update-alternatives
@@ -52,7 +57,7 @@ medical images and related information such as reports
and radiotherapy objects.
%prep
%setup -q -n pydicom-%{version}
%autosetup -p1 -n pydicom-%{version}
%build
%pyproject_wheel
@@ -60,25 +65,33 @@ and radiotherapy objects.
%install
%pyproject_install
%python_clone -a %{buildroot}%{_bindir}/pydicom
%python_expand rm -r %{buildroot}%{$python_sitelib}/pydicom/{benchmarks,tests,data/test_files}
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
export LANG=en_US.UTF-8
%{python_expand # see https://github.com/pydicom/pydicom/issues/1697
mkdir build/locallib
cp -r %{$python_sitelib}/data_store %{$python_sitelib}/pydicom_data*.dist-info build/locallib/
}
export PYTHONPATH=$PWD/build/locallib
# these assume that a cache is updatable from online downloads
skips="test_fetch_data_files"
# see https://github.com/pydicom/pydicom-data/issues/9
skips="$skips or OBXXXX1A or (test_can_access_unsupported_dataset and (TestPillowHandler_JPEG or TestPillowHandler_JPEG2K))"
skips="$skips or test_get_testdata_file_external_hash_mismatch"
skips="$skips or test_get_testdata_files_local_external_and_cache"
skips="$skips or test_get_testdata_files_hash_match"
skips="$skips or test_get_testdata_files_hash_mismatch"
skips="$skips or test_get_testdata_files_external_ignore_hash"
# Failures only on ppc64
skips="$skips or test_invalid_arr_dtype_raises or TestHandlerGenerateMultiplex or TestHandlerMultiplexArray"
# Failures only on i586
skips="$skips or test_write_file_id or test_file_id or test_encapsulate_bot_large_raises or (TestPillowHandler_JPEG2K and test_array)"
if [ "$RPM_ARCH" = "ppc64le" -o "$RPM_ARCH" = "aarch64" ]; then
skips="$skips or TestPillowHandler_JPEG2K"
fi
if [ $(getconf LONG_BIT) -eq 32 ]; then
# Failures on i586
skips="$skips or test_write_file_id or test_file_id or test_encapsulate_bot_large_raises or (TestPillowHandler_JPEG2K and test_array)"
fi
# see https://github.com/pydicom/pydicom/issues/1697
ignores="--ignore pydicom/tests/test_dataset.py --ignore pydicom/tests/test_data_manager.py"
%pytest -rs pydicom/tests $ignores -k "not ($skips)"
%pytest -rsfR $ignores -k "not ($skips)"
%post
%python_install_alternative pydicom