diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0912903a..725bf3db 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,16 +15,16 @@ jobs: matrix: os: ["ubuntu-20.04", "ubuntu-latest", "macos-latest"] compiler: [gcc-7, gcc-9, clang] - python-version: ["2.7", "3.7", "3.8", "3.9"] - numpy-version: ["1.16", "1.18"] + python-version: ["3.9", "3.12"] + numpy-version: ["1.20", "2.0.1"] include: - - numpy-version: "1.22" + - numpy-version: "1.23" compiler: gcc-10 python-version: "3.10" os: ubuntu-latest - - numpy-version: "1.22" + - numpy-version: "1.23" compiler: gcc-11 python-version: "3.10" os: ubuntu-latest @@ -39,17 +39,17 @@ jobs: python-version: "3.10" os: ubuntu-latest - - numpy-version: "1.22" + - numpy-version: "1.23" compiler: gcc-10 python-version: "3.11" os: ubuntu-latest - - numpy-version: "1.22" + - numpy-version: "1.23" compiler: gcc-11 python-version: "3.11" os: ubuntu-latest - - numpy-version: "1.22" + - numpy-version: "1.23" compiler: gcc-12 python-version: "3.11" os: ubuntu-latest @@ -88,12 +88,9 @@ jobs: - os: "ubuntu-latest" compiler: gcc-7 - # Don't run numpy 1.16 on ubuntu-latest - - os: "ubuntu-latest" - numpy-version: 1.16 - + # Only use latest numpy on ubuntu-latest - os: "ubuntu-latest" - numpy-version: 1.18 + numpy-version: 1.20 # python3.10 only on ubuntu-latest # - os: "ubuntu-20.04" @@ -101,26 +98,11 @@ jobs: # - os: "macos-latest" # python-version: "3.10" - # numpy1.18 only on python3.10 - # (which, in turn, is only on 'latest') - - python-version: "2.7" - numpy-version: "1.18" - python-version: "3.9" - numpy-version: "1.18" - - python-version: "3.8" - numpy-version: "1.18" - - python-version: "3.7" - numpy-version: "1.18" - - # excludes for numpy 1.22 - # - python-version: "2.7" - # numpy-version: "1.22" - # - python-version: "3.9" - # numpy-version: "1.22" - # - python-version: "3.8" - # numpy-version: "1.22" - # - python-version: "3.7" - # numpy-version: "1.22" + numpy-version: "2.0.1" + + - python-version: "3.12" + numpy-version: "1.20" env: CC: ${{ matrix.compiler }} diff --git a/CHANGES.rst b/CHANGES.rst index 0b248095..f0d61d39 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -10,6 +10,15 @@ New features - conda installable package - GPU version +2.5.3 (06/08/2024) +================== +Final release of the 2.5.x series and last Corrfunc version to support ``python2`` + +Infrastructure +-------------- +- Updated minimum numpy to ``1.20`` [#324] +- No longer testing on ``python2`` [#324] + 2.5.2 (04/10/2023) ================== @@ -23,7 +32,7 @@ Infrastructure - Automatic uploads of new releases to PyPI [#305] - Added @dependabot for automatic dependency updates in GitHub Actions [#306, #307, #308] - + 2.5.1 (28/07/2023) ================== diff --git a/common.mk b/common.mk index d390366d..9e5773ef 100644 --- a/common.mk +++ b/common.mk @@ -375,7 +375,7 @@ ifeq ($(DO_CHECKS), 1) endif # Check if using clang on Apple with M1/M1 Max/M2 etc - # if so, remove -march=native from CFLAGS and + # if so, remove -march=native from CFLAGS and # then add -mcpu=apple-m1 -mtune=apple-m1 # ARCH := $(shell uname -m) # $(info ARCH is $(ARCH)) @@ -400,12 +400,12 @@ ifeq ($(DO_CHECKS), 1) #### MS: 3rd May 2023 ### For reasons unknown to me, the addition to CFLAGS does not work correctly if I ### change this variable name "opt" to match the remaining names of "copt". Works fine - ### for 'clang' on OSX but not for 'gcc'. Adds the -march=native but somehow that + ### for 'clang' on OSX but not for 'gcc'. Adds the -march=native but somehow that ### extra flag is removed when testing the -mcpu/-mtune compiler options. For the sake ### of my sanity, I have accepted that this is how it shall work! Hopefully, in the future, - ### someone will figure out/explain *why* this behaviour is expected. It - ### seems more like a gcc bug to me where gcc is updating CFLAGS based on - ### the options on the last compile call (since cland does not show + ### someone will figure out/explain *why* this behaviour is expected. It + ### seems more like a gcc bug to me where gcc is updating CFLAGS based on + ### the options on the last compile call (since cland does not show ### this behaviour) - MS: 3rd May, 2023 ## TLDR: Leave this variable as "opt" while the remaining are set to "copt". Otherwise, @@ -424,7 +424,7 @@ ifeq ($(DO_CHECKS), 1) CFLAGS += $(copt) else CFLAGS := $(filter-out $(copt), $(CFLAGS)) - endif + endif copt := -mtune=apple-m1 COMPILE_OPT_SUPPORTED := $(shell $(CC) $(copt) -dM -E - < /dev/null 2>&1 1>/dev/null) @@ -478,7 +478,7 @@ ifeq ($(DO_CHECKS), 1) MIN_PYTHON_MINOR := 7 MIN_NUMPY_MAJOR := 1 - MIN_NUMPY_MINOR := 16 + MIN_NUMPY_MINOR := 20 PYTHON_AVAIL := $(shell [ $(PYTHON_VERSION_MAJOR) -gt $(MIN_PYTHON_MAJOR) -o \( $(PYTHON_VERSION_MAJOR) -eq $(MIN_PYTHON_MAJOR) -a $(PYTHON_VERSION_MINOR) -ge $(MIN_PYTHON_MINOR) \) ] && echo true) NUMPY_AVAIL := $(shell [ $(NUMPY_VERSION_MAJOR) -gt $(MIN_NUMPY_MAJOR) -o \( $(NUMPY_VERSION_MAJOR) -eq $(MIN_NUMPY_MAJOR) -a $(NUMPY_VERSION_MINOR) -ge $(MIN_NUMPY_MINOR) \) ] && echo true) @@ -506,14 +506,14 @@ ifeq ($(DO_CHECKS), 1) # NUMPY is available -> next step should not fail # That's why we are not checking if the NUMPY_INCL_FLAG is defined. ifeq ($(NUMPY_CHECKED), 0) - export NUMPY_INCL_FLAG := $(shell $(PYTHON) -c "from __future__ import print_function; import numpy; print('-isystem ' + numpy.__path__[0] + '/core/include/numpy/')") + export NUMPY_INCL_FLAG := $(shell $(PYTHON) -c "from __future__ import print_function; import numpy; print('-isystem ' + numpy.get_include())") # Take the second word -> the path (the first word is "isystem") NUMPY_INCL_PATH := $(word 2, ${NUMPY_INCL_FLAG}) # Now check that the 'arrayobject.h' file is present in the # supposed numpy directory. Otherwise, compilation will fail. # The absence of the file likely indicates a missing numpy-devel # package (see issue #134 on github) - NUMPY_NEEDED_HEADER_FILE := ${NUMPY_INCL_PATH}arrayobject.h + NUMPY_NEEDED_HEADER_FILE := ${NUMPY_INCL_PATH}/numpy/arrayobject.h ifeq (,$(wildcard ${NUMPY_NEEDED_HEADER_FILE})) $(error Required $(ccred)numpy headers$(ccreset) are missing...stopping the compilation. You might be able to fix this by installing $(ccblue)numpy-devel$(ccreset)) endif diff --git a/mocks/python_bindings/_countpairs_mocks.c b/mocks/python_bindings/_countpairs_mocks.c index cbe41afa..e4f386a9 100644 --- a/mocks/python_bindings/_countpairs_mocks.c +++ b/mocks/python_bindings/_countpairs_mocks.c @@ -10,7 +10,7 @@ #include /* Now, include the numpy header*/ -#include +#include //for correlation functions #include "countpairs_rp_pi_mocks.h" diff --git a/theory/python_bindings/_countpairs.c b/theory/python_bindings/_countpairs.c index 8bc3c93c..9f52ca3e 100644 --- a/theory/python_bindings/_countpairs.c +++ b/theory/python_bindings/_countpairs.c @@ -15,7 +15,7 @@ #include /* Now, include the numpy header*/ -#include +#include //for correlation functions #include "countpairs.h"