dstndstn / astrometry.net

Astrometry.net -- automatic recognition of astronomical images
http://astrometry.net
Other
650 stars 184 forks source link

Numpy 2.0 support #297

Closed juliotux closed 3 weeks ago

juliotux commented 1 month ago

Compile is failing when using numpy 2.0. It seems that some C api has changed.

util_wrap.c: In function 'print_array':
util_wrap.c:3596:44: error: 'PyArray_Descr' {aka 'struct _PyArray_Descr'} has no member named 'elsize'
 3596 |         printf("  descr elsize: %i\n", desc->elsize);
      |                                            ^~
error: command '/home/conda/feedstock_root/build_artifacts/astrometry_1716435233620/_build_env/bin/x86_64-conda-linux-gnu-cc' failed with exit code 1
make[1]: *** [Makefile:170: _util.cpython-310-x86_64-linux-gnu.so] Error 1
make[1]: Leaving directory '$SRC_DIR/util'
make: *** [Makefile:145: pyutil] Error 2

So, for now, conda-forge package won't support Numpy 2.0.

More details: https://github.com/conda-forge/astrometry-feedstock/pull/50

dstndstn commented 1 month ago

Numpy 2.0 isn't even released yet

On Thu, May 23, 2024 at 8:49 AM Julio Campagnolo @.***> wrote:

Compile is failing when using numpy 2.0. It seems that some C api has changed.

util_wrap.c: In function 'print_array': util_wrap.c:3596:44: error: 'PyArray_Descr' {aka 'struct _PyArray_Descr'} has no member named 'elsize' 3596 | printf(" descr elsize: %i\n", desc->elsize); | ^~ error: command '/home/conda/feedstock_root/build_artifacts/astrometry_1716435233620/_build_env/bin/x86_64-conda-linux-gnu-cc' failed with exit code 1 make[1]: [Makefile:170: _util.cpython-310-x86_64-linux-gnu.so] Error 1 make[1]: Leaving directory '$SRC_DIR/util' make: [Makefile:145: pyutil] Error 2

So, for now, conda-forge package won't support Numpy 2.0.

More details: conda-forge/astrometry-feedstock#50 https://github.com/conda-forge/astrometry-feedstock/pull/50

— Reply to this email directly, view it on GitHub https://github.com/dstndstn/astrometry.net/issues/297, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIEH7MYZWHCW6SVL3VUULLZDXQWPAVCNFSM6AAAAABIFSZUO6VHI2DSMVQWIX3LMV43ASLTON2WKOZSGMYTEOBUGA4TCMI . You are receiving this because you are subscribed to this thread.Message ID: @.***>

juliotux commented 1 month ago

Conda-forge started the migration. I think this is not a urgent fix, but this issue will happen in the final release.

dstndstn commented 1 month ago

Sure, thanks for the report :)