Skip to content

Commit 57630bb

Browse files
authored
Merge pull request #207 from threeML/dev
Dev
2 parents 62f254c + 4d01903 commit 57630bb

File tree

5 files changed

+24
-11
lines changed

5 files changed

+24
-11
lines changed

.github/workflows/deploy.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ jobs:
1919
name: Publish to PyPi
2020
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
2121
runs-on: ubuntu-latest
22+
permissions:
23+
# IMPORTANT: this permission is mandatory for trusted publishing
24+
id-token: write
2225
steps:
2326
- name: Checkout source
2427
uses: actions/checkout@v4
@@ -31,10 +34,8 @@ jobs:
3134
pip install wheel setuptools -U
3235
python setup.py sdist
3336
- name: Publish
34-
uses: pypa/gh-action-pypi-publish@v1.1.0
37+
uses: pypa/gh-action-pypi-publish@release/v1
3538
with:
36-
user: __token__
37-
password: ${{ secrets.PYPI_TOKEN }}
3839
skip-existing: true
3940

4041
test-publish-pypi:
@@ -72,7 +73,7 @@ jobs:
7273
strategy:
7374
fail-fast: false
7475
matrix:
75-
os: [ubuntu-latest, macos-latest]
76+
os: [ubuntu-latest, macos-latest, macos-12]
7677
python-version: [3.9]
7778

7879
steps:

.github/workflows/test_and_build.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
fail-fast: false
3838
matrix:
3939
python-version: ["3.9", "3.10", "3.11"]
40-
os: ["ubuntu-latest", "macos-latest"]
40+
os: ["ubuntu-latest", "macos-latest", "macos-12"]
4141
runs-on: ${{ matrix.os }}
4242
steps:
4343
- name: Checkout
@@ -49,8 +49,14 @@ jobs:
4949
- name: Install dependencies
5050
run: |
5151
python -m pip install --upgrade pip wheel
52-
pip install --upgrade flake8 coverage pytest-cov cython "tables==3.8.0"
53-
pip install git+https://github.com/EconForge/interpolation.py.git
52+
pip install --upgrade flake8 coverage pytest-cov cython
53+
54+
if [[ ${{matrix.os}} == macos-latest ]];
55+
then
56+
brew update
57+
brew install hdf5
58+
fi
59+
5460
pip install -e .
5561
- name: Lint with flake8
5662
run: |
@@ -94,7 +100,7 @@ jobs:
94100
strategy:
95101
fail-fast: false
96102
matrix:
97-
os: ["ubuntu-latest", "macos-latest"]
103+
os: ["ubuntu-latest", "macos-latest", "macos-12"]
98104
python-version: [3.9]
99105
runs-on: ${{ matrix.os }}
100106
steps:

ci/environment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ dependencies:
2222
- wcslib
2323
- future
2424
- xspec-modelsonly==6.30.1
25-
- numba<0.59
25+
- numba
2626
- h5py
2727
- interpolation>=2.2.3
2828
- libgfortran

setup.cfg

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ install_requires =
3636
astropy>=1.2
3737
dill
3838
future
39-
interpolation>=2.2.3
40-
numba<0.59
39+
interpolation>=2.2.3
40+
numba
4141
h5py
4242
pandas
4343
tables

setup.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,10 +192,16 @@ def find_library(library_root, additional_places=None):
192192

193193
def setup_xspec():
194194

195+
skip_xspec = os.environ.get("SKIP_XSPEC")
195196
headas_root = os.environ.get("HEADAS")
196197
conda_prefix = os.environ.get("CONDA_PREFIX")
197198
xspec_version = os.environ.get("ASTRO_XSPEC_VERSION")
198199

200+
if skip_xspec is not None:
201+
202+
print("The SKIP_XSPEC env variable was set. Xspec support will not be installed.")
203+
return None
204+
199205
# thanks to the sherpa team for this
200206

201207
if xspec_version is None:

0 commit comments

Comments
 (0)