DataMedSci / pymchelper

Python toolkit for SHIELD-HIT12A and FLUKA
http://datamedsci.github.io/pymchelper/
15 stars 7 forks source link

Fix problems with dependencies #684

Closed hendzeld closed 10 months ago

hendzeld commented 10 months ago

We have to resolve some issues with NumPy and other dependencies.

In this pipeline (https://github.com/DataMedSci/pymchelper/actions/runs/6342276507/job/17227689169?pr=656). Pipeline runs Python 3.9 on MacOS.

pip cannot resolve dependencies for packages specified below:

About NumPy, according to https://numpy.org/doc/stable/release/1.25.0-notes.html version 1.25.0 and 1.26.0 does not support Python 3.8.

The Python versions supported in this release are 3.9-3.11.
hendzeld commented 10 months ago

Comparison of old successful build with the current one

Sucess (https://github.com/DataMedSci/pymchelper/actions/runs/6143219428/job/16666295561):

Collecting pytrip98 (from pymchelper==2.5.2+rev13->-r requirements.txt (line 4))
  Downloading pytrip98-3.8.0-cp39-cp39-macosx_10_9_x86_64.whl (156 kB)

Fail:

 Collecting pytrip98 (from pymchelper==2.5.2+rev15->-r requirements.txt (line 4))
  Downloading pytrip98-3.9.0.tar.gz (158 kB)

Previously, a built wheel was used, now we are attempting to build pytrip98 from sources.

@grzanka

  1. Should we skip building for MacOS for now?
  2. Should we drop support for Python 3.8, or restrict NumPy to versions prior to 1.26 for it?

I will update NumPy dependency matrix in ./setup.py.

grzanka commented 10 months ago

Comparison of old successful build with the current one

Sucess (https://github.com/DataMedSci/pymchelper/actions/runs/6143219428/job/16666295561):

Collecting pytrip98 (from pymchelper==2.5.2+rev13->-r requirements.txt (line 4))
  Downloading pytrip98-3.8.0-cp39-cp39-macosx_10_9_x86_64.whl (156 kB)

Fail:

 Collecting pytrip98 (from pymchelper==2.5.2+rev15->-r requirements.txt (line 4))
  Downloading pytrip98-3.9.0.tar.gz (158 kB)

Previously, a built wheel was used, now we are attempting to build pytrip98 from sources.

@grzanka

  1. Should we skip building for MacOS for now?

You can restrict pytrip98 version to <3.9 for MacOSX.

  1. Should we drop support for Python 3.8, or restrict NumPy to versions prior to 1.26 for it?

Restrict numpy version is possible.

I will update NumPy dependency matrix in ./setup.py.

Cheers, Leszek

reviewpad[bot] commented 10 months ago

AI-Generated Summary: This pull request includes several changes on the setup.py file:

1) The numpy version is limited for different Python versions, ensuring compatibility. 2) The NumPy and Python compatibility matrix is updated to include information for both Numpy 1.26 and 1.25 versions. 3) Pytrip98 version limitations are introduced for MacOS. 4) Later, the numpy version restrictions are updated again. 5) Syntax errors in the platform-related conditions for pytrip98 dependencies in 'setup.py' are corrected. 6) A line in the setup.py file exceeding standard line length is overlooked with the use of # noqa: E501 comment to ignore the style check. 7) Corrections in the platform_system marker by updating 'darwin' to 'Darwin' in platform-specific conditions for pytrip98 dependencies. 8) Lastly, the line formatting in the 'setup.py' has been fixed.

These changes collectively enhance Python package's compatibility with various systems and Python versions.