Skip to content

Commit b6a7854

Browse files
authored
Merge pull request #23 from simpeg/0.2.0_staging
Staging for 0.2.0
2 parents cc8bb2a + 5a35352 commit b6a7854

File tree

3 files changed

+46
-35
lines changed

3 files changed

+46
-35
lines changed

.github/workflows/python-package-conda.yml

Lines changed: 37 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
uses: actions/setup-python@v2
5353
with:
5454
python-version: "3.13"
55-
55+
5656
- name: Create Conda environment file
5757
run: |
5858
python -m pip install pyyaml
@@ -96,45 +96,50 @@ jobs:
9696
verbose: true # optional (default = false)
9797
token: ${{ secrets.CODECOV_TOKEN }} # required
9898

99-
distribute:
100-
name: Distributing from 3.11
101-
needs: build-and-test
102-
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
99+
build_sdist:
100+
name: Build source distribution
103101
runs-on: ubuntu-latest
102+
steps:
103+
- uses: actions/checkout@v5
104+
with:
105+
fetch-depth: 0
106+
107+
- name: Build sdist
108+
run: pipx run build --sdist -Csetup-args="-Ddist_ignore_mkl_dep=true"
109+
110+
- uses: actions/upload-artifact@v4
111+
with:
112+
name: cibw-sdist
113+
path: dist/*.tar.gz
114+
115+
release:
116+
needs: [
117+
build_sdist
118+
]
119+
runs-on: ubuntu-latest
120+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
104121
defaults:
105122
run:
106123
shell: bash -l {0}
107-
108124
steps:
109-
- uses: actions/checkout@v4
110-
- name: Setup Conda
111-
uses: conda-incubator/setup-miniconda@v3
125+
- uses: actions/download-artifact@v4
112126
with:
113-
python-version: "3.11"
114-
channels: defaults
115-
channel-priority: true
116-
activate-environment: dev
127+
# unpacks all CIBW artifacts into dist/
128+
pattern: cibw-*
129+
path: dist
130+
merge-multiple: true
117131

118-
- name: Install Env
119-
run: |
120-
conda info
121-
conda list
122-
conda config --show
123-
124-
- name: Create environment
125-
run: |
126-
conda install --quiet --yes -c conda-forge \
127-
pip numpy scipy cython mkl=2023 \
128-
mkl-devel pkg-config meson-python meson ninja setuptools_scm \
129-
python-build
130-
131-
- name: Generate Source Distribution
132-
run: |
133-
python -m build --no-isolation --skip-dependency-check --sdist .
132+
- name: Release to github
133+
uses: softprops/action-gh-release@v2
134+
with:
135+
files: dist/*
136+
generate_release_notes: true
137+
prerelease: false
134138

135-
- name: pypi-publish
136-
uses: pypa/gh-action-pypi-publish@v1.4.2
139+
- name: Upload wheels to pypi
140+
uses: pypa/gh-action-pypi-publish@release/v1
137141
with:
138142
user: __token__
139143
password: ${{ secrets.PYPI_API_TOKEN }}
140-
skip_existing: true
144+
skip-existing: true
145+
packages-dir: ./dist/

meson.options

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,8 @@ option('use-ilp64', type: 'boolean', value: false,
55
description: 'Use ILP64 (64-bit integer) BLAS and LAPACK interfaces')
66

77
option('mkl-threading', type: 'string', value: 'auto',
8-
description: 'MKL threading method, one of: `seq`, `iomp`, `gomp`, `tbb`')
8+
description: 'MKL threading method, one of: `seq`, `iomp`, `gomp`, `tbb`')
9+
10+
option('dist_ignore_mkl_dep', type: 'boolean', value: false,
11+
description: 'Mark the mkl dep as optional, for use during source distribution archiving.'
12+
)

pydiso/meson.build

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,10 @@ mkl_version_req = '>=2023.0'
4040

4141
use_sdl = get_option('use-sdl')
4242

43+
mkl_required = not get_option('dist_ignore_mkl_dep')
44+
4345
if use_sdl
44-
mkl_dep = dependency('mkl-sdl', required: true)
46+
mkl_dep = dependency('mkl-sdl', required: mkl_required)
4547
else
4648
# find mkl
4749
mkl_dep = dependency(mkl_dep_name,
@@ -55,7 +57,7 @@ else
5557
# or missing it because no pkg-config installed. If so, we need to retry
5658
# with MKL SDL, and drop the version constraint.
5759
if not mkl_dep.found() and mkl_may_use_sdl
58-
mkl_dep = dependency('mkl-sdl', required: true)
60+
mkl_dep = dependency('mkl-sdl', required: mkl_required)
5961
endif
6062

6163
endif

0 commit comments

Comments
 (0)