Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions .github/workflows/CI_pyHAMS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
fail-fast: false #true
matrix:
os: ["ubuntu-latest", "macOS-latest"] #, "windows-latest"]
python-version: ["3.9", "3.10", "3.11", "3.12"]
python-version: ["3.10", "3.11", "3.12", "3.13"]

steps:
- name: Setup GNU Fortran
Expand Down Expand Up @@ -44,7 +44,7 @@ jobs:
mingw-w64-x86_64-gcc-fortran

- name: checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Mac openmp
if: contains( matrix.os, 'mac')
Expand All @@ -58,7 +58,7 @@ jobs:
echo "CXX=${{ steps.install_cc.outputs.cxx }}" >> $GITHUB_ENV

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
uses: actions/setup-python@v6
id: cp
with:
python-version: ${{ matrix.python-version }}
Expand Down Expand Up @@ -91,13 +91,14 @@ jobs:
fail-fast: false #true
matrix:
os: ["ubuntu-latest", "macOS-latest", "windows-latest"]
python-version: ["3.9", "3.10", "3.11", "3.12"]
python-version: ["3.10", "3.11", "3.12", "3.13"]

steps:
- name: checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5

- uses: conda-incubator/setup-miniconda@v2
- name: Install miniconda
uses: conda-incubator/setup-miniconda@v3
# https://github.com/marketplace/actions/setup-miniconda
with:
#mamba-version: "*"
Expand All @@ -118,13 +119,13 @@ jobs:
- name: Add dependencies unix specific
if: contains( matrix.os, 'ubuntu')
run: |
conda install -y libgomp
conda install -y libgomp gfortran
gfortran --version

- name: Add dependencies mac specific
if: contains( matrix.os, 'mac')
run: |
conda install -y compilers llvm-openmp
conda install -y gfortran llvm-openmp
gfortran --version

# Install
Expand Down
28 changes: 14 additions & 14 deletions .github/workflows/Publish_pyHAMS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-12, macos-13, macos-14]
os: [ubuntu-latest, windows-latest, macos-13, macos-14, macos-15]

steps:
- name: Set up QEMU
Expand Down Expand Up @@ -46,38 +46,38 @@ jobs:

- name: Build wheels linux
if: contains( matrix.os, 'ubuntu')
uses: pypa/cibuildwheel@v2.18.1
uses: pypa/cibuildwheel@v3.1.4
env:
CC: ${{ steps.install_cc.outputs.cc }}
CXX: ${{ steps.install_cc.outputs.cxx }}

- name: Build wheels mac-12
if: contains( matrix.os, 'macos-12')
uses: pypa/cibuildwheel@v2.18.1
env:
CC: ${{ steps.install_cc.outputs.cc }}
CXX: ${{ steps.install_cc.outputs.cxx }}
CIBW_ENVIRONMENT_MACOS: MACOSX_DEPLOYMENT_TARGET="12.0"

- name: Build wheels mac-13
if: contains( matrix.os, 'macos-13')
uses: pypa/cibuildwheel@v2.18.1
uses: pypa/cibuildwheel@v3.1.4
env:
CC: ${{ steps.install_cc.outputs.cc }}
CXX: ${{ steps.install_cc.outputs.cxx }}
CIBW_ENVIRONMENT_MACOS: MACOSX_DEPLOYMENT_TARGET="13.0"

- name: Build wheels mac-14
if: contains( matrix.os, 'macos-14')
uses: pypa/cibuildwheel@v2.18.1
uses: pypa/cibuildwheel@v3.1.4
env:
CC: ${{ steps.install_cc.outputs.cc }}
CXX: ${{ steps.install_cc.outputs.cxx }}
CIBW_ENVIRONMENT_MACOS: MACOSX_DEPLOYMENT_TARGET="14.0"

- name: Build wheels mac-15
if: contains( matrix.os, 'macos-15')
uses: pypa/cibuildwheel@v3.1.4
env:
CC: ${{ steps.install_cc.outputs.cc }}
CXX: ${{ steps.install_cc.outputs.cxx }}
CIBW_ENVIRONMENT_MACOS: MACOSX_DEPLOYMENT_TARGET="15.0"

- name: Build wheels windows
if: contains( matrix.os, 'windows')
uses: pypa/cibuildwheel@v2.18.1
uses: pypa/cibuildwheel@v3.1.4

- uses: actions/upload-artifact@v4
with:
Expand All @@ -88,7 +88,7 @@ jobs:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5

- name: Build sdist
run: pipx run build --sdist
Expand Down
8 changes: 7 additions & 1 deletion meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,13 @@ endif
# https://mesonbuild.com/Python-module.html
# Here we differentiate from the python used by meson, py3_command, and that python target, py3_target. This is useful
# when cross compiling like on conda-forge
py3 = import('python').find_installation(pure: false)
#py3 = import('python').find_installation(pure: false)
py_mod = import('python')
if get_option('python_target') != ''
py3 = py_mod.find_installation(get_option('python_target'))
else
py3 = py_mod.find_installation('python')
endif
py3_dep = py3.dependency()

message(py3.path())
Expand Down
6 changes: 6 additions & 0 deletions meson_options.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
option('incdir_numpy', type: 'string', value: '',
description: 'Include directory for numpy. If left empty Meson will try to find it on its own.')

option('python_target', type: 'string', value: '',
description: '''Target python path. This is used in the case that the Python installation that PyOptSparse is intended
to be built for is different than the Python installation that is used to run Meson. For example, Meson may be installed
on the user's system which is run using the system Python installation, but the user may want build PyOptSparse for
a Python installation in a virtual environment. Leave as an empty string to build for Python installation running
Meson.''')
18 changes: 9 additions & 9 deletions pyhams/meson.build
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# NumPy include directory - needed in all submodules
incdir_numpy = meson.get_external_property('numpy-include-dir', 'not-given')
if incdir_numpy == 'not-given'
incdir_numpy = run_command(py3,
[
'-c',
'import os; os.chdir(".."); import numpy; print(numpy.get_include())'
],
check: true
).stdout().strip()
incdir_numpy = get_option('incdir_numpy')
if incdir_numpy == ''
incdir_numpy = run_command(py3,
[
'-c',
'import os; os.chdir(".."); import numpy; print(numpy.get_include())'
],
check: true
).stdout().strip()
endif
# this creates a raw string which is useful for Windows use of '\' for paths
incdir_numpy = '''@0@'''.format(incdir_numpy)
Expand Down
4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "pyHAMS"
version = "1.3.0"
version = "1.3.1"
description = "Python module wrapping around HAMS"
readme = "README.md"
requires-python = ">=3.9"
Expand Down Expand Up @@ -37,6 +37,8 @@ classifiers = [ # Optional
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Fortran",
"Operating System :: Microsoft :: Windows",
Expand Down
13 changes: 1 addition & 12 deletions test/test_cylinder.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,16 +94,5 @@ def test_cylinder_heading_list(self):
#npt.assert_array_almost_equal(truth3, actual3)


def suite():
suite = unittest.TestSuite()
suite.addTest(unittest.makeSuite(CertTest))
return suite

if __name__ == '__main__':
result = unittest.TextTestRunner().run(suite())

if result.wasSuccessful():
exit(0)
else:
exit(1)

unittest.main()
Loading