Skip to content

Commit

Permalink
BLD: support for python 3.9, equinor#530
Browse files Browse the repository at this point in the history
  • Loading branch information
jcrivenaes committed Apr 20, 2021
1 parent 8f6852f commit bd093e2
Show file tree
Hide file tree
Showing 8 changed files with 53 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-test-xtgeo-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:

strategy:
matrix:
python-version: [3.6, 3.7, 3.8]
python-version: [3.6, 3.7, 3.8, 3.9]

steps:
- uses: actions/checkout@v1
Expand Down
39 changes: 31 additions & 8 deletions .github/workflows/ci-test-xtgeo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,14 @@ env:
pytest tests --disable-warnings
CIBW_BUILD: |
cp36-manylinux_x86_64
cp36-macosx_x86_64
cp36-win_amd64
cp39-manylinux_x86_64
cp38-macosx_x86_64
cp38-win_amd64
# Verify that wheel build jobs succeed
jobs:
build_multiwheels:
name: CIBW PY36 on ${{ matrix.os }}
name: CIBW PY38 or 39 on ${{ matrix.os }}

runs-on: ${{ matrix.os }}

Expand All @@ -43,20 +44,31 @@ jobs:
run: |
python -m pip install pip -U
python -m pip install wheel
python -m pip install cibuildwheel==1.5.5
python -m pip install cibuildwheel
- name: Build wheels and test
run: |
python -m cibuildwheel --output-dir wheelhouse
build_pywheels:
name: PY ${{ matrix.python-version }} on linux
name: PY ${{ matrix.python-version }} on ${{ matrix.os }}

runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}

# All python versions are tested on linux, only first and last on win and osx
strategy:
matrix:
python-version: [3.6, 3.7, 3.8]
python-version: [3.6, 3.7, 3.8, 3.9]
os: [ubuntu-latest]
include:
- os: macos-latest
python-version: 3.6
- os: macos-latest
python-version: 3.8
- os: windows-latest
python-version: 3.6
- os: windows-latest
python-version: 3.8

steps:
- uses: actions/checkout@v1
Expand All @@ -66,6 +78,17 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Install swig (osx)
if: matrix.os == 'macos-latest'
run: brew install swig

- name: Install swig (win)
if: matrix.os == 'windows-latest'
run: |
(New-Object System.Net.WebClient).DownloadFile("http://prdownloads.sourceforge.net/swig/swigwin-4.0.2.zip","swigwin-4.0.2.zip");
Expand-Archive .\swigwin-4.0.2.zip .;
echo "$((Get-Item .).FullName)/swigwin-4.0.2" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Install xtgeo
run: |
pip install pip -U
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/deploy-xtgeo-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,14 @@ env:
CIBW_BEFORE_ALL_WINDOWS: "choco install -y --no-progress --allow-empty-checksums -r swig --version=4.0.1"
CIBW_BEFORE_ALL_MACOS: "brew install swig"
CIBW_TEST_COMMAND: 'python -c "import xtgeo; print(xtgeo.__version__)"'

# 3.9 have trouble with install on Mac and Win, due to PyTables missing wheel
# so those platforms are postponed.
CIBW_BUILD: |
cp36-manylinux_x86_64
cp37-manylinux_x86_64
cp38-manylinux_x86_64
cp39-manylinux_x86_64
cp36-macosx_x86_64
cp37-macosx_x86_64
cp38-macosx_x86_64
Expand All @@ -38,7 +42,7 @@ jobs:

- name: Install cibuildwheel
run: |
python -m pip install cibuildwheel==1.5.5
python -m pip install cibuildwheel
- name: Build wheels
run: |
Expand Down
5 changes: 5 additions & 0 deletions docs/history.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Release notes

## Version 2.15 (in prep)

* New features:
* Python 3.9 support, with PYPI wheel.

## Version 2.14

* New features:
Expand Down
13 changes: 8 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,11 @@ exclude = '''
)/
'''

# numpy version scheme to fulfill Roxar API compatibility
# numpy version scheme to fulfill Roxar API compatibility:
# RMS 11.* 12.0.* --> numpy == 1.13.3 with python 3.6
# RMS 12.1.* --> numpy == 1.19.2 with python 3.8
#
# For cmake, cmake >= 3.6 is tested to be OK actually but versions are linked to pip versions and
# manylinyx1 vs manylinux2010 issues (for Equinor Komodo installs)
[build-system]
requires = [
"pip>=19.1.1",
Expand All @@ -37,9 +39,10 @@ requires = [
'cmake==3.18.0; platform_system != "Linux"',
"ninja",
"setuptools_scm>=3.2.0",
'numpy==1.10.4; python_version == "3.4"',
'numpy==1.13.3; python_version >= "3.5" and python_version < "3.7" and platform_system == "Linux"',
'numpy==1.16.0; python_version >= "3.7" or platform_system != "Linux"',
'numpy==1.13.3; python_version == "3.6"',
'numpy==1.19.2; python_version == "3.8"',
'numpy>=1.19; python_version == "3.7"',
'numpy>=1.19; python_version >= "3.9"',
'Sphinx',
'sphinx-rtd-theme',
'sphinxcontrib-apidoc',
Expand Down
2 changes: 1 addition & 1 deletion requirements/requirements_dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ segyio>=1.8.6
matplotlib>=1.5
scipy>=0.17
shapely>=1.6.2; python_version < "3.8"
shapely==1.7a2; python_version == "3.8"
shapely==1.7a2; python_version >= "3.8"
black
autopep8
pylint
Expand Down
2 changes: 1 addition & 1 deletion requirements/requirements_dev_rms.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ recommonmark
bandit
segyio>=1.8.6
shapely>=1.6.2; python_version < "3.8"
shapely==1.7a2; python_version == "3.8"
shapely==1.7a2; python_version >= "3.8"
black
autopep8
pylint
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ def src(anypath):
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Physics",
"Topic :: Software Development :: Libraries",
Expand Down

0 comments on commit bd093e2

Please sign in to comment.