From b14ea9eb46edc1c1d39e0d4c293fde8ad37e3b7cc689e47df880a2e7df63d20c Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Sat, 24 Sep 2022 10:21:18 +0000 Subject: [PATCH] Accepting request 1005690 from home:jayvdb:branches:devel:languages:python - Skip a lot of tests, mostly due to missing test data, but there are over 1900 still passing. - Update to v2.3.0 * See https://github.com/pydicom/pydicom/tree/master/doc/release_notes OBS-URL: https://build.opensuse.org/request/show/1005690 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pydicom?expand=0&rev=21 --- pydicom-1.4.2.tar.gz | 3 --- pydicom-2.3.0.tar.gz | 3 +++ python-pydicom.changes | 8 ++++++ python-pydicom.spec | 58 ++++++++++++++++++++++++++++++++++++++---- 4 files changed, 64 insertions(+), 8 deletions(-) delete mode 100644 pydicom-1.4.2.tar.gz create mode 100644 pydicom-2.3.0.tar.gz diff --git a/pydicom-1.4.2.tar.gz b/pydicom-1.4.2.tar.gz deleted file mode 100644 index bde8191..0000000 --- a/pydicom-1.4.2.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9488495a9f3e202d1219f7cb165aee0de31efd512d938c0226d34147ce860391 -size 35237997 diff --git a/pydicom-2.3.0.tar.gz b/pydicom-2.3.0.tar.gz new file mode 100644 index 0000000..4c959f0 --- /dev/null +++ b/pydicom-2.3.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dbfa081c9ad9ac8ff8a8efbd71784104db9eecf02fd775f7d7773f2183f89386 +size 2164552 diff --git a/python-pydicom.changes b/python-pydicom.changes index c688ca0..2c6139f 100644 --- a/python-pydicom.changes +++ b/python-pydicom.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Sat Sep 24 02:04:40 UTC 2022 - John Vandenberg + +- Skip a lot of tests, mostly due to missing test data, but there + are over 1900 still passing. +- Update to v2.3.0 + * See https://github.com/pydicom/pydicom/tree/master/doc/release_notes + ------------------------------------------------------------------- Fri Dec 10 07:41:02 UTC 2021 - pgajdos@suse.com diff --git a/python-pydicom.spec b/python-pydicom.spec index 226757c..8cc0062 100644 --- a/python-pydicom.spec +++ b/python-pydicom.spec @@ -1,7 +1,7 @@ # # spec file for package python-pydicom # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -19,21 +19,29 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} %define oldpython python Name: python-pydicom -Version: 1.4.2 +Version: 2.3.0 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 -BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros +# SECTION test requirements +BuildRequires: %{python_module numpy} +BuildRequires: %{python_module Pillow} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module requests} +BuildRequires: python3-gdcm +# /SECTION BuildArch: noarch %ifpython2 Obsoletes: %{oldpython}-dicom < %{version} Provides: %{oldpython}-dicom = %{version} %endif +Requires(post): update-alternatives +Requires(postun): update-alternatives %python_subpackages %description @@ -53,14 +61,54 @@ and radiotherapy objects. %install %python_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 -%pytest pydicom/tests +# Many test modules and individual tests fail due to test data not included in sdist +# And requires https://github.com/pydicom/pydicom-data , which hasnt been +# packaged yet. c.f. https://github.com/pydicom/pydicom-data/issues/9 + +skips="test_fetch_data_files or test_reading_ds_with_known_tags_with_UN_VR or test_empty_bot_multi_fragments_per_frame" +skips="$skips or test_convert_rgb_from_implicit_to_explicit_vr or test_empty_bot_too_few_fragments or test_encapsulate" +skips="$skips or test_sequence_with_implicit_vr or test_rgb_ybr_rgb_single_frame or test_rgb_ybr_rgb_multi_frame or test_frame_by_frame" +skips="$skips or test_specific_tags_with_unknown_length_tag or test_tag_with_unknown_length_tag_too_short or test_planar_config" +skips="$skips or test_correct_ambiguous_vr_compressed or test_write_removes_grouplength or test_raw_elements_preserved_explicit_vr" +skips="$skips or test_cycle_u8_1s_1f or test_encoders_gdcm or test_unsupported_syntax_raises or test_can_access_unsupported_dataset" +skips="$skips or TestDatasetOverlayArray or TestGDCM_JPEG_LS_no_gdcm or TestGDCM_JPEG2000_no_gdcm or TestGDCM_JPEGlossy_no_gdcm" +skips="$skips or TestGDCM_JPEGlossless_no_gdcm or TestEncodeFrame or TestEncodeSegment or TestRLEEncodeFrame or TestNumpy_ModalityLUT" +skips="$skips or TestNumpy_PaletteColor or TestNumpy_ApplyWindowing or TestNumpy_ApplyVOI or (TestNumpy_PackBits and test_functional)" +skips="$skips or TestNumpy_NumpyHandler or TestNumpy_GetOverlayArray or TestNumpy_NoRLEHandler or TestNumpy_RLEHandler" +skips="$skips or TestPillowHandler_JPEG2K or TestPillowHandler_JPEG" +# 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" + +# The ignores cause failure during test collection +%{pytest -rs pydicom/tests \ + --ignore pydicom/tests/test_JPEG_LS_transfer_syntax.py \ + --ignore pydicom/tests/test_dataset.py \ + --ignore pydicom/tests/test_gdcm_pixel_data.py \ + --ignore pydicom/tests/test_jpeg_ls_pixel_data.py \ + --ignore pydicom/tests/test_JPEG_LS_transfer_syntax.py \ + --ignore pydicom/tests/test_jpeg_ls_pixel_data.py \ + --ignore pydicom/tests/test_numpy_pixel_data.py \ + -k "not ($skips)" +} + +%post +%python_install_alternative pydicom + +%postun +%python_uninstall_alternative pydicom %files %{python_files} +%doc README.md %license LICENSE -%{python_sitelib}/* +%python_alternative %{_bindir}/pydicom +%{python_sitelib}/pydicom* %changelog