From 6ab5c67ebebcbbbdcf7d9bfb7082ebf3fe35ee33 Mon Sep 17 00:00:00 2001 From: q-posev Date: Mon, 27 Dec 2021 16:26:17 +0100 Subject: [PATCH] [pre-release] upgrade versions and produce wheels for CPython 3.10 --- CMakeLists.txt | 7 +++---- configure.ac | 3 +-- docker/build_manylinux_wheels.sh | 17 +++++++++-------- python/pyproject.toml | 17 ++++++++++++----- python/pytrexio/_version.py | 2 +- src/README.org | 4 ++-- 6 files changed, 28 insertions(+), 22 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 062a117..42e0030 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,9 +3,9 @@ cmake_minimum_required(VERSION 3.16) # =========== SETUP THE PROJECT ============= # Initialize the CMake project. -project(Trexio - VERSION 2.0.0 - DESCRIPTION "TREX I/O library" +project(Trexio + VERSION 2.1.0 + DESCRIPTION "TREX I/O library" LANGUAGES C Fortran ) @@ -43,4 +43,3 @@ add_subdirectory(src) # Add subdirectory with unit tests. enable_testing() add_subdirectory(tests) - diff --git a/configure.ac b/configure.ac index defb8ba..635f265 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ([2.69]) -AC_INIT([trexio],[2.0.0],[https://github.com/TREX-CoE/trexio/issues]) +AC_INIT([trexio],[2.1.0],[https://github.com/TREX-CoE/trexio/issues]) AC_CONFIG_SRCDIR([Makefile.in]) AC_CONFIG_HEADERS([include/config.h]) @@ -222,4 +222,3 @@ where the optional is: check - run unit tests install - install the library --------------------------------------------------" - diff --git a/docker/build_manylinux_wheels.sh b/docker/build_manylinux_wheels.sh index d282eca..6a51193 100755 --- a/docker/build_manylinux_wheels.sh +++ b/docker/build_manylinux_wheels.sh @@ -1,7 +1,7 @@ #!/bin/bash set -x -set -e +set -e export H5_LDFLAGS=-L/usr/local/lib export H5_CFLAGS=-I/usr/local/include @@ -30,7 +30,7 @@ gzip -cd /tmp/trexio-${TR_VERSION}.tar.gz | tar xvf - cd trexio-${TR_VERSION} # the function below build manylinux wheels based on the provided version of python (e.g. build_wheel_for_py 36) -function build_wheel_for_py() +function build_wheel_for_py() { if [[ -z "$1" ]]; then @@ -52,19 +52,21 @@ function build_wheel_for_py() # create and activate a virtual environment based on CPython version ${PYVERSION} /opt/python/${CPYTHON}/bin/python3 -m venv --clear trexio-manylinux-py${PYVERSION} - source trexio-manylinux-py${PYVERSION}/bin/activate + source trexio-manylinux-py${PYVERSION}/bin/activate python3 --version # upgrade pip, otherwise it complains that manylinux wheel is "...not supported wheel on this platform" - pip install --upgrade pip + pip install --upgrade pip # install dependencies needed to build manylinux wheel pip install --upgrade setuptools wheel auditwheel if [ ${PYVERSION} -eq 36 ] || [ ${PYVERSION} -eq 37 ]; then pip install numpy==1.17.3 elif [ ${PYVERSION} -eq 38 ]; then pip install numpy==1.18.3 - else + elif [ ${PYVERSION} -eq 39 ]; then pip install numpy==1.19.3 + else + pip install numpy==1.21.4 fi # set an environment variable needed to locate numpy header files @@ -94,9 +96,8 @@ function build_wheel_for_py() } -# build wheels for all versions of CPython in this container -for CPYVERSION in 36 37 38 39 +# build wheels for all versions of CPython in this container +for CPYVERSION in 36 37 38 39 310 do build_wheel_for_py ${CPYVERSION} done - diff --git a/python/pyproject.toml b/python/pyproject.toml index f8ac16d..7ca82aa 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -5,16 +5,23 @@ requires = [ "pkgconfig", # Numpy requirements for different OS/architectures # Copied from https://github.com/scipy/scipy/blob/master/pyproject.toml (which is also licensed under BSD) - "numpy==1.17.3; python_version=='3.6' and (platform_machine!='arm64' or platform_system!='Darwin') and platform_machine!='aarch64'", - "numpy==1.17.3; python_version=='3.7' and (platform_machine!='arm64' or platform_system!='Darwin') and platform_machine!='aarch64'", - "numpy==1.18.3; python_version=='3.8' and (platform_machine!='arm64' or platform_system!='Darwin') and platform_machine!='aarch64'", - "numpy==1.19.3; python_version>='3.9' and (platform_machine!='arm64' or platform_system!='Darwin')", + "numpy==1.17.3; python_version=='3.6' and (platform_machine!='arm64' or platform_system!='Darwin') and platform_machine!='aarch64' and platform_python_implementation != 'PyPy'", + "numpy==1.17.3; python_version=='3.7' and (platform_machine!='arm64' or platform_system!='Darwin') and platform_machine!='aarch64' and platform_python_implementation != 'PyPy'", + "numpy==1.18.3; python_version=='3.8' and (platform_machine!='arm64' or platform_system!='Darwin') and platform_machine!='aarch64' and platform_python_implementation != 'PyPy'", + "numpy==1.19.3; python_version=='3.9' and (platform_machine!='arm64' or platform_system!='Darwin') and platform_python_implementation != 'PyPy'", + "numpy==1.21.4; python_version=='3.10' and platform_python_implementation != 'PyPy'", # Aarch64(Python 3.9 requirements are the same as AMD64) "numpy==1.19.2; python_version=='3.6' and platform_machine=='aarch64'", "numpy==1.19.2; python_version=='3.7' and platform_machine=='aarch64'", "numpy==1.19.2; python_version=='3.8' and platform_machine=='aarch64'", # Darwin Arm64 "numpy>=1.20.0; python_version=='3.8' and platform_machine=='arm64' and platform_system=='Darwin'", - "numpy>=1.20.0; python_version=='3.9' and platform_machine=='arm64' and platform_system=='Darwin'" + "numpy>=1.20.0; python_version=='3.9' and platform_machine=='arm64' and platform_system=='Darwin'", + # For Python versions which aren't yet officially supported, + # we specify an unpinned NumPy which allows source distributions + # to be used and allows wheels to be used as soon as they + # become available. + "numpy; python_version>='3.11'", + "numpy; python_version>='3.8' and platform_python_implementation=='PyPy'", ] build-backend = "setuptools.build_meta" diff --git a/python/pytrexio/_version.py b/python/pytrexio/_version.py index 5becc17..6849410 100644 --- a/python/pytrexio/_version.py +++ b/python/pytrexio/_version.py @@ -1 +1 @@ -__version__ = "1.0.0" +__version__ = "1.1.0" diff --git a/src/README.org b/src/README.org index 76e7904..0b6efb2 100644 --- a/src/README.org +++ b/src/README.org @@ -4,13 +4,14 @@ #+BEGIN_EXPORT html - + #+END_EXPORT ------------------ - [[./tutorial_benzene.html][Tutorial]] - [[./trex.html][Data stored with TREXIO]] + - [[./examples.html][How-to guide]] - [[./templator_front.html][Front end API]] - [[./templator_hdf5.html][HDF5 back end]] - [[./templator_text.html][TEXT back end]] @@ -34,4 +35,3 @@ [[https://trex-coe.eu/sites/default/files/inline-images/euflag.jpg]] [[https://trex-coe.eu][TREX: Targeting Real Chemical Accuracy at the Exascale]] project has received funding from the European Union’s Horizon 2020 - Research and Innovation program - under grant agreement no. 952165. The content of this document does not represent the opinion of the European Union, and the European Union is not responsible for any use that might be made of such content. # -*- mode: org -*- -