mirror of
https://github.com/CoolProp/CoolProp.git
synced 2026-01-13 07:58:04 -05:00
* Update setup.py replace distutils with setuptools PEP 632 – Deprecate distutils module. Edit line 4-6: from distutils.version import LooseVersion from distutils.sysconfig import get_config_var from setuptools.command.build_ext import build_ext To from packaging.version import Version from sysconfig import get_config_var from setuptools.command.build_ext import build_ext Edit line 291: cython_version = Version (Cython.__version__) To cython_version = str(Version (Cython.__version__)) Edit line 353: from distutils.errors import CompileError To from setuptools import CompileError Edit line 394: from Cython.Distutils.extension import Extension To from setuptools.extension import Extension Delete line 396: from Cython.Distutils import build_ext This is now handled with line 6 and thus redundant from setuptools.command.build_ext import build_ext Edit line 3, 60, 61 62, 66, 77, 229, and 291 Replace all instances of LooseVersion with Version * Update python_buildwheels.yml * Update python_cibuildwheel.yml * Update setup.py * Update setup.py * Update setup.py * Update python_buildwheels.yml Added module packaging to the list of dependencies. * Update python_cibuildwheel.yml Updated cibuildwheel version form 2.17.0 to latest edition 2.21.3 for python 3.13 support. * Update python_buildwheels.yml Deleted lines with python specific exclusions for Windows ARM64 as it already excluded generically. * Update python_buildwheels.yml Deleted lines with python specific exclusions for MacOS as these are no longer supported.
78 lines
2.4 KiB
YAML
78 lines
2.4 KiB
YAML
name: Python build one single wheel
|
|
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
python-version:
|
|
required: true
|
|
type: string
|
|
os:
|
|
required: true
|
|
type: string
|
|
arch:
|
|
required: true
|
|
type: string
|
|
|
|
jobs:
|
|
build:
|
|
#name: py${{ inputs.python-version }}-${{ inputs.os }}-${{ inputs.arch }}
|
|
runs-on: ${{ inputs.os }}-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
submodules: recursive
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: 3.13.x
|
|
|
|
- name: Install Python dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
python -m pip install requests packaging
|
|
|
|
- name: Figure out the TestPyPi/PyPi Version
|
|
shell: bash
|
|
run: |
|
|
if [[ "$GITHUB_REF" == *"refs/tags"* ]]; then
|
|
python dev/extract_version.py --pypi --replace-setup-py
|
|
else
|
|
python dev/extract_version.py --replace-setup-py
|
|
fi;
|
|
|
|
- name: Set up QEMU
|
|
if: ${{ runner.os == 'Linux' }}
|
|
uses: docker/setup-qemu-action@v3.2.0
|
|
with:
|
|
platforms: all
|
|
|
|
- name: Build and test wheels
|
|
uses: pypa/cibuildwheel@v2.21.3
|
|
env:
|
|
MACOSX_DEPLOYMENT_TARGET: 10.9
|
|
CIBW_ENVIRONMENT_MACOS: MACOSX_DEPLOYMENT_TARGET=10.9 SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk
|
|
CIBW_BEFORE_BUILD: >
|
|
pip install setuptools wheel Cython requests jinja2 pyyaml
|
|
CIBW_ENVIRONMENT_LINUX: COOLPROP_CMAKE=default,NATIVE
|
|
CIBW_BUILD: cp${{ inputs.python-version }}-*
|
|
CIBW_ARCHS_MACOS: ${{ inputs.arch }} # x86_64 arm64 # universal2 is redundant
|
|
CIBW_ARCHS_WINDOWS: ${{ inputs.arch }} # AMD64 x86 # ARM64 creates problems with msgpack-c
|
|
CIBW_ARCHS_LINUX: ${{ inputs.arch }} # i686 x86_64 aarch64 ppc64le s390x
|
|
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
|
|
CIBW_MANYLINUX_I686_IMAGE: manylinux2014
|
|
CIBW_MANYLINUX_AARCH64_IMAGE: manylinux2014
|
|
CIBW_SKIP: "pp*"
|
|
CIBW_TEST_SKIP: "*-macosx_arm64 *-win_arm64"
|
|
with:
|
|
package-dir: ./wrappers/Python/
|
|
output-dir: Python
|
|
|
|
- name: Upload Files
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: Python-${{ inputs.os }}-${{ inputs.python-version }}-${{ inputs.arch }}
|
|
path: |
|
|
./Python/*.whl
|