## START: Set by rpmautospec ## (rpmautospec version 0.7.3) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 7; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec %global _description %{expand: pydicom is a pure python package for working with DICOM files. It was made for inspecting and modifying DICOM data in an easy "pythonic" way. The modifications can be written again to a new file. pydicom is not a DICOM server, and is not primarily about viewing images. It is designed to let you manipulate data elements in DICOM files with python code. Limitations -- the main limitation of the current version is that compressed pixel data (e.g. JPEG) cannot be altered in an intelligent way as it can for uncompressed pixels. Files can always be read and saved, but compressed pixel data cannot easily be modified. Documentation is available at https://pydicom.github.io/pydicom} Name: python-pydicom Version: 3.0.1 Release: %autorelease Summary: Read, modify and write DICOM files with python code # There are generated data (private dict) in special format from GDCM (see License file) License: MIT and BSD-3-Clause URL: https://github.com/darcymason/pydicom Source0: %{url}/archive/v%{version}/pydicom-%{version}.tar.gz # Man pages hand-written for Fedora in groff_man(7) format based on --help Source10: pydicom.1 Source11: pydicom-codify.1 Source12: pydicom-help.1 Source13: pydicom-show.1 # Patch for fixes to non-compressed imaging + RLE (pydicom + numpy) # https://github.com/pydicom/pydicom/issues/2147#issuecomment-2421048992 Patch: pydicom-3.0.1-endian-numpy.patch # Patch for compressed imaging with (pydicom + numpy + pillow) # https://github.com/pydicom/pydicom/issues/2147#issuecomment-2423736084 Patch: pydicom-3.0.1-endian-pillow.patch # Fix for python 3.14 Patch: https://github.com/pydicom/pydicom/pull/2173/commits/016abf0fa18a6f578a55d9816084f901a9809367.patch # The package contains no compiled code, and the binary RPMs are noarch, but # the base package is arched because there are arch-dependent test failures and # we need to test on all architectures. %global debug_package %{nil} # This is a leaf package *on i686* because everything that requires it # (directly or indirectly) is noarch, and noarch packages are no longer built # on i686. # repoquery --repo=rawhide{,-source} --whatrequires python3-pydicom --recursive # https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval # (Also, there are a handful of failing tests we would have to skip.) ExcludeArch: %{ix86} %description %_description %package -n python3-pydicom Summary: %{summary} BuildArch: noarch BuildRequires: python3-devel # For weak dependencies (also useful in tests) BuildRequires: python3-gdcm BuildRequires: python3-numpy BuildRequires: python3-pillow # Extra dependencies for tests only: BuildRequires: python3-pydicom-data BuildRequires: python3-pytest Recommends: python3-gdcm Recommends: python3-numpy Recommends: python3-pillow %description -n python3-pydicom %_description %prep %autosetup -n pydicom-%{version} -p1 %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel %install %pyproject_install %pyproject_save_files pydicom install -t '%{buildroot}%{_mandir}/man1' -p -m 0644 -D \ '%{SOURCE10}' '%{SOURCE11}' '%{SOURCE12}' '%{SOURCE13}' %check %pyproject_check_import # Requires network access, since this explicitly tests downloading the test # data files (which we have provided via a BuildRequires on # python3-pydicom-data). k="${k-}${k+ and }not test_fetch_data_files" # TODO: What is wrong? # > assert [0.92012787, 0.91510725, 0.9160201, 0.92104053] == [ # round(x, 8) for x in arr[:4, 0] # ] # E AssertionError k="${k-}${k+ and }not (TestAsArray and test_reference_expl[parametric_map_float.dcm])" k="${k-}${k+ and }not (TestAsArray and test_reference_expl_binary[parametric_map_float.dcm])" k="${k-}${k+ and }not (TestIterArray and test_reference_expl[parametric_map_float.dcm])" k="${k-}${k+ and }not (TestIterArray and test_reference_expl_binary[parametric_map_float.dcm])" # Some error message texts have changed very slightly. # # E AssertionError: Regex pattern did not match. # E Regex: "Unable to decompress as the plugins for the 'JPEG 2000 Image # Compression \\(Lossless Only\\)' decoder are all missing # dependencies:" # E Input: "Unable to decompress 'JPEG 2000 Image Compression (Lossless # Only)' pixel data because the specified plugin is missing # dependencies:\n\tpylibjpeg - requires pylibjpeg>=2.0 and # pylibjpeg-openjpeg>=2.0" k="${k-}${k+ and }not (TestDecompress and test_no_decoders_raises)" # E AssertionError: Regex pattern did not match. # E Regex: "Error deepcopying the buffered element \\(7FE0,0010\\) # 'Pixel Data': cannot (.*) '_io.BufferedReader' object" # E Input: "Error deepcopying the buffered element (7FE0,0010) 'Pixel # Data': cannot pickle 'BufferedReader' instances" k="${k-}${k+ and }not (TestDatasetWithBufferedData and test_deepcopy_bufferedreader_raises)" %ifarch s390x # A number of tests fail on big-endian hosts (s390x) # https://github.com/pydicom/pydicom/issues/2147 k="${k-}${k+ and }not (TestDecoding and test_bits_allocated_mismatch)" k="${k-}${k+ and }not (TestDecoding and test_j2k[693_J2KI.dcm])" k="${k-}${k+ and }not (TestDecoding and test_j2k[JPEG2000.dcm])" k="${k-}${k+ and }not (TestDecoding and test_j2k[MR2_J2KI.dcm])" k="${k-}${k+ and }not (TestDecoding and test_j2k[RG1_J2KI.dcm])" k="${k-}${k+ and }not (TestDecoding and test_j2k[RG3_J2KI.dcm])" k="${k-}${k+ and }not (TestDecoding and test_j2k_lossless[693_J2KR.dcm])" k="${k-}${k+ and }not (TestDecoding and test_j2k_lossless[J2K_pixelrep_mismatch.dcm])" k="${k-}${k+ and }not (TestDecoding and test_j2k_lossless[MR2_J2KR.dcm])" k="${k-}${k+ and }not (TestDecoding and test_j2k_lossless[MR_small_jp2klossless.dcm])" k="${k-}${k+ and }not (TestDecoding and test_j2k_lossless[RG1_J2KR.dcm])" k="${k-}${k+ and }not (TestDecoding and test_j2k_lossless[RG3_J2KR.dcm])" k="${k-}${k+ and }not (TestDecoding and test_j2k_lossless[emri_small_jpeg_2k_lossless.dcm])" k="${k-}${k+ and }not (TestDecoding and test_jls_lossless[JLSL_16_15_1_1F.dcm])" k="${k-}${k+ and }not (TestDecoding and test_jls_lossless[MR_small_jpeg_ls_lossless.dcm])" k="${k-}${k+ and }not (TestDecoding and test_jls_lossless[emri_small_jpeg_ls_lossless.dcm])" k="${k-}${k+ and }not (TestDecoding and test_jls_lossy[JPEGLSNearLossless_16.dcm])" k="${k-}${k+ and }not (TestDecoding and test_jpg_lossless_sv1[JPEG-LL.dcm])" k="${k-}${k+ and }not (TestRLELossless and test_cycle_i16_1s_1f)" k="${k-}${k+ and }not (TestRLELossless and test_cycle_u16_3s_1f)" k="${k-}${k+ and }not (TestRLELossless and test_cycle_u32_1s_1f)" k="${k-}${k+ and }not (TestRLELossless and test_cycle_u32_3s_1f)" k="${k-}${k+ and }not (TestRLELossless and test_cycle_u8_1s_1f)" k="${k-}${k+ and }not (TestRLELossless and test_cycle_u8_3s_1f)" k="${k-}${k+ and }not (Test_JPEG_LS_Lossless_transfer_syntax and test_read_emri_with_gdcm)" k="${k-}${k+ and }not (Test_JPEG_LS_Lossless_transfer_syntax and test_read_mr_with_gdcm)" k="${k-}${k+ and }not (TestsWithGDCM and test_JPEG2000PixelArray[File])" k="${k-}${k+ and }not (TestsWithGDCM and test_JPEG2000PixelArray[InMemory])" k="${k-}${k+ and }not (TestsWithGDCM and test_JPEG_LS_PixelArray[File])" k="${k-}${k+ and }not (TestsWithGDCM and test_JPEG_LS_PixelArray[InMemory])" k="${k-}${k+ and }not (TestsWithGDCM and test_JPEGlosslessPixelArray[File])" k="${k-}${k+ and }not (TestsWithGDCM and test_JPEGlosslessPixelArray[InMemory])" k="${k-}${k+ and }not (TestsWithGDCM and test_JPEGlossyPixelArray[File])" k="${k-}${k+ and }not (TestsWithGDCM and test_JPEGlossyPixelArray[InMemory])" k="${k-}${k+ and }not (TestsWithGDCM and test_decompress_using_gdcm[File])" k="${k-}${k+ and }not (TestsWithGDCM and test_decompress_using_gdcm[InMemory])" k="${k-}${k+ and }not (TestsWithGDCM and test_emri_JPEG2000PixelArray[File])" k="${k-}${k+ and }not (TestsWithGDCM and test_emri_JPEG2000PixelArray[InMemory])" k="${k-}${k+ and }not (TestsWithGDCM and test_emri_JPEG_LS_PixelArray_with_gdcm[File])" k="${k-}${k+ and }not (TestsWithGDCM and test_emri_JPEG_LS_PixelArray_with_gdcm[InMemory])" k="${k-}${k+ and }not (TestsWithGDCM and test_pixel_rep_mismatch[File])" k="${k-}${k+ and }not (TestsWithGDCM and test_pixel_rep_mismatch[InMemory])" %endif %{pytest} -k "${k-}" -rs -vv %files -n python3-pydicom -f %{pyproject_files} %license LICENSE %doc README.md %{_bindir}/pydicom %{_mandir}/man1/pydicom.1* %{_mandir}/man1/pydicom-*.1* %changelog ## START: Generated by rpmautospec * Mon Nov 18 2024 Ankur Sinha (Ankur Sinha Gmail) - 3.0.1-7 - fix: include upstream patch for py3.14 (fixes rh#2325443) * Sat Oct 19 2024 Benjamin A. Beasley - 3.0.1-6 - Fix some of the endianness issues affecting the s390x architecture * Fri Sep 27 2024 Benjamin A. Beasley - 3.0.1-5 - Make the package ExcludeArch: i686 * Fri Sep 27 2024 Benjamin A. Beasley - 3.0.1-4 - Skip tests that fail on s390x (make the base package arched) * Thu Sep 26 2024 Benjamin A. Beasley - 3.0.1-3 - Add man pages * Thu Sep 26 2024 Benjamin A. Beasley - 3.0.1-2 - Run as many tests as we can; tidy up dependencies * Sun Sep 22 2024 Packit - 3.0.1-1 - Update to 3.0.1 upstream release - Resolves: rhbz#2308066 * Fri Jul 19 2024 Fedora Release Engineering - 2.4.4-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild * Sat Jun 08 2024 Python Maint - 2.4.4-4 - Rebuilt for Python 3.13 * Fri Jan 26 2024 Fedora Release Engineering - 2.4.4-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Mon Jan 22 2024 Fedora Release Engineering - 2.4.4-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Thu Dec 14 2023 Packit - 2.4.4-1 - [packit] 2.4.4 upstream release - Resolves rhbz#2254618 * Wed Aug 16 2023 Ankur Sinha (Ankur Sinha Gmail) - 2.4.3-2 - feat: use spdx license * Wed Aug 16 2023 Packit - 2.4.3-1 - [packit] 2.4.3 upstream release * Wed Aug 16 2023 Ankur Sinha (Ankur Sinha Gmail) - 2.4.1-4 - chore(packit): limit to rawhide, add koji build task * Wed Aug 16 2023 Ankur Sinha (Ankur Sinha Gmail) - 2.4.1-3 - chore(packit): add upstream tag template * Sat Jul 22 2023 Ankur Sinha (Ankur Sinha Gmail) - 2.4.1-2 - feat(packit): add conf file * Sat Jul 22 2023 Ankur Sinha (Ankur Sinha Gmail) - 2.4.1-1 - feat: update to 2.4.1 (fixes rhbz#2214622) * Fri Jul 21 2023 Fedora Release Engineering - 2.3.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild * Tue Jun 13 2023 Python Maint - 2.3.1-3 - Rebuilt for Python 3.12 * Fri Jan 20 2023 Fedora Release Engineering - 2.3.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Thu Nov 17 2022 Alessio - 2.3.1-1 - 2.3.1 release * Sat Aug 06 2022 Alessio - 2.3.0-1 - 2.3.0 release * Fri Jul 22 2022 Fedora Release Engineering - 2.2.2-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Mon Jun 13 2022 Python Maint - 2.2.2-3 - Rebuilt for Python 3.11 * Fri Jan 21 2022 Fedora Release Engineering - 2.2.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Mon Dec 06 2021 Alessio - 2.2.2-1 - 2.2.2 release * Fri Aug 06 2021 Alessio - 2.2.0-1 - 2.2.0 release * Fri Jul 23 2021 Fedora Release Engineering - 2.1.2-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Fri Jun 04 2021 Python Maint - 2.1.2-3 - Rebuilt for Python 3.10 * Wed Jan 27 2021 Fedora Release Engineering - 2.1.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild * Mon Dec 14 2020 Alessio - 2.1.2-1 - 2.1.2 release * Wed Dec 02 2020 Alessio - 2.1.1-2 - Removed sphinx-* buildrequire. Removed docs subpackage: bundles JS bits. * Mon Nov 30 2020 Alessio - 2.1.1-1 - 2.1.1 release * Wed Jul 29 2020 Fedora Release Engineering - 2.0.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild * Fri Jun 05 2020 Alessio - 2.0.0-3 - New build * Wed Jun 03 2020 Alessio - 2.0.0-2 - Modified conditional to disable test_handler_util python test * Wed Jun 03 2020 Alessio - 2.0.0-1 - 2.0.0. release * Tue May 26 2020 Miro Hrončok - 1.4.2-3 - Rebuilt for Python 3.9 * Mon Feb 24 2020 Alessio - 1.4.2-2 - Disabled TestPillowHandler_JPEG.test_color_3d test * Mon Feb 24 2020 Alessio - 1.4.2-1 - Update to new release - Splitted docs into a subpackage * Sat Feb 01 2020 Ankur Sinha - 1.4.1-1 - Update to new release * Thu Jan 30 2020 Fedora Release Engineering - 1.3.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild * Thu Oct 03 2019 Miro Hrončok - 1.3.0-2 - Rebuilt for Python 3.8.0rc1 (#1748018) * Thu Aug 22 2019 Ankur Sinha - 1.3.0-1 - Update to 1.3.0 - Add patch to fix python 3.8 error - Enable all tests * Mon Aug 19 2019 Miro Hrončok - 1.2.2-3 - Rebuilt for Python 3.8 * Fri Jul 26 2019 Fedora Release Engineering - 1.2.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild * Sat Feb 16 2019 Ankur Sinha - 1.2.2-1 - Update to latest upstream release * Sat Feb 02 2019 Fedora Release Engineering - 1.1.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild * Tue Aug 21 2018 Miro Hrončok - 1.1.0-3 - Drop python2 subpackage * Sat Jul 14 2018 Fedora Release Engineering - 1.1.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild * Sun Jun 24 2018 Miro Hrončok - 1.1.0-1 - Update to 1.1.0 (#1544224) - Stop building python2 docs as they have python2 syntax errors - Skip test_PI_RGB[JPEG_RGB_RGB] for now - Skip TestTimeZone.test_constructor on Python 3 for now * Tue Jun 19 2018 Miro Hrončok - 1.0.0-0.12.gitf6191c7 - Rebuilt for Python 3.7 * Fri Feb 09 2018 Fedora Release Engineering - 1.0.0-0.11.gitf6191c7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild * Sat Jan 27 2018 Iryna Shcherbina - 1.0.0-0.10.gitf6191c7 - Update Python 2 dependency declarations to new packaging standards (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3) * Thu Jul 27 2017 Fedora Release Engineering - 1.0.0-0.9.gitf6191c7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild * Sat Feb 11 2017 Fedora Release Engineering - 1.0.0-0.8.gitf6191c7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild * Mon Dec 19 2016 Miro Hrončok - 1.0.0-0.7.gitf6191c7 - Rebuild for Python 3.6 * Tue Jul 19 2016 Fedora Release Engineering - 1.0.0-0.6.gitf6191c7 - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages * Thu Feb 04 2016 Fedora Release Engineering - 1.0.0-0.5.gitf6191c7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Thu Nov 12 2015 Kalev Lember - 1.0.0-0.4.gitf6191c7 - Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5 * Sun Nov 08 2015 Igor Gnatenko - 1.0.0-0.3.gitf6191c7 - Fix provide macro for py3 (typo) - Remove shebang from dicom_dao.py (non-executable-script) * Sun Nov 08 2015 Igor Gnatenko - 1.0.0-0.2.gitf6191c7 - Include license file - Add BSD to license list (generated data) from GDCM * Tue Nov 03 2015 Igor Gnatenko - 1.0.0-0.1.gitf6191c7 - Simplify building docs * Sat Oct 31 2015 Igor Gnatenko - 1.0.0-0.0.gitf6191c7 - Initial package ## END: Generated by rpmautospec