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
16 changes: 7 additions & 9 deletions .github/workflows/build_wheel.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: Build wheel

on:
workflow_dispatch:
on: [workflow_dispatch, workflow_call]

concurrency:
group: ${{ github.head_ref || github.run_id }}
Expand All @@ -10,17 +9,14 @@ concurrency:
jobs:
build:
strategy:
fail-fast: false
fail-fast: true
matrix:
platform: [windows-latest, ubuntu-latest, macos-latest, macos-14]
platform: [windows-latest, ubuntu-latest, macos-13, macos-14]
env:
CIBW_SKIP: 'pp*'
CIBW_ARCHS: 'auto64'
CIBW_PROJECT_REQUIRES_PYTHON: '>=3.9'
CIBW_TEST_REQUIRES: 'pytest'
# Appends the project path since build is not done in the project directory
CIBW_TEST_COMMAND: 'pytest {project}/tmp/tests'

defaults:
run:
shell: bash -l {0}
Expand All @@ -36,7 +32,7 @@ jobs:
with:
python-version: "3.x"
- name: Install OMP (MacOS Intel)
if: matrix.platform == 'macos-latest'
if: matrix.platform == 'macos-13'
run: |
brew install llvm libomp
echo "export CC=/usr/local/opt/llvm/bin/clang" >> ~/.bashrc
Expand Down Expand Up @@ -64,8 +60,10 @@ jobs:
# of local package.
mkdir tmp
cp -r tests tmp/tests/
CIBW_TEST_COMMAND='cd ${pwd}/tmp && python -m pytest tests'
echo "CIBW_TEST_COMMAND=${CIBW_TEST_COMMAND}" >> $GITHUB_ENV
python -m pip install cibuildwheel==2.16.5
python -m cibuildwheel --output-dir wheelhouse
python -m cibuildwheel --output-dir ./wheelhouse
- uses: actions/upload-artifact@v4
with:
name: wheels-${{ runner.os }}-${{ strategy.job-index }}
Expand Down
5 changes: 5 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
include README.md
recursive-include cpp/RAT *
prune tests
prune */__pycache__
global-exclude .git
2 changes: 1 addition & 1 deletion cpp/rat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ class DylibEngine
return py::make_tuple(output, roughness);

}catch (const dylib::symbol_error &) {
throw std::runtime_error("failed to get dynamic library symbol for ***functionName");
throw std::runtime_error("failed to get dynamic library symbol for " + functionName);
}
};
};
Expand Down
16 changes: 0 additions & 16 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,3 @@ requires = [
]
build-backend = 'setuptools.build_meta'

dependencies = [
'numpy >= 1.20',
'prettytable>=3.9.0',
'pydantic>=2.7.2',
'StrEnum>=0.4.15; python_version<"3.11"',
]

[optional-dependencies]
Dev = ['pytest>=7.4.0', 'pytest-cov>=4.1.0']
Matlab_latest = ['matlabengine']
Matlab-2023b = ['matlabengine==23.2.1']
Matlab-2023a = ['matlabengine==9.14.3']
Matlab-2022b = ['matlabengine==9.13.9']
Matlab-2022a = ['matlabengine==9.12.19']
Matlab-2021b = ['matlabengine==9.11.21']
Matlab-2021a = ['matlabengine==9.10.3']
4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,11 @@ def build_libraries(self, libraries):
author_email='',
url='https://github.com/RascalSoftware/python-RAT',
description='Python extension for the Reflectivity Analysis Toolbox (RAT)',
long_description=open('README.md').read(),
long_description_content_type='text/markdown',
packages=find_packages(),
include_package_data=True,
package_data={'': [get_shared_object_name(libevent[0])]},
package_data={'': [get_shared_object_name(libevent[0])], 'RAT.examples': ["data/*.dat"]},
cmdclass={'build_clib': BuildClib, 'build_ext': BuildExt},
libraries=[libevent],
ext_modules=ext_modules,
Expand Down