Skip to content

Commit 57c45fb

Browse files
Merge pull request #45 from IntelPython/update-installation-steps
Update installation steps
2 parents 3b45998 + b0c5927 commit 57c45fb

File tree

10 files changed

+814
-777
lines changed

10 files changed

+814
-777
lines changed

.github/workflows/build-with-clang.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
strategy:
1515
matrix:
1616
python: ["3.9", "3.10", "3.11", "3.12"]
17-
use_pre: ["", "--pre"]
17+
numpy_build_version: ["numpy'<2'", "numpy'>=2'"]
1818
env:
1919
ONEAPI_ROOT: /opt/intel/oneapi
2020

@@ -53,7 +53,7 @@ jobs:
5353
shell: bash -l {0}
5454
run: |
5555
pip install cython setuptools pytest pytest-cov
56-
pip install numpy ${{ matrix.use_pre }}
56+
pip install ${{ matrix.numpy_build_version }}
5757
5858
- name: List oneAPI folder content
5959
shell: bash -l {0}
@@ -73,4 +73,6 @@ jobs:
7373
shell: bash -l {0}
7474
run: |
7575
source /opt/intel/oneapi/setvars.sh
76+
# Test with NumPy<2 for now
77+
pip install numpy"<2"
7678
pytest -s -v --pyargs mkl_random

.github/workflows/conda-package.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
run: conda install conda-build
4444
- name: Build conda package
4545
run: |
46-
CHANNELS="-c conda-forge -c intel --override-channels"
46+
CHANNELS="-c conda-forge -c https://software.repos.intel.com/python/conda --override-channels"
4747
VERSIONS="--python ${{ matrix.python }}"
4848
TEST="--no-test"
4949
@@ -89,7 +89,7 @@ jobs:
8989
- name: Install conda-build
9090
run: conda install conda-build
9191
- name: Build conda package
92-
run: conda build --no-test --python ${{ matrix.python }} -c intel -c conda-forge --override-channels conda-recipe
92+
run: conda build --no-test --python ${{ matrix.python }} -c https://software.repos.intel.com/python/conda -c conda-forge --override-channels conda-recipe
9393
- name: Upload artifact
9494
uses: actions/upload-artifact@v4
9595
with:
@@ -103,11 +103,12 @@ jobs:
103103
strategy:
104104
matrix:
105105
python: ['3.9', '3.10']
106+
numpy: ['1.26*']
106107
experimental: [false]
107108
runner: [ubuntu-latest]
108109
continue-on-error: ${{ matrix.experimental }}
109110
env:
110-
CHANNELS: -c conda-forge -c intel --override-channels
111+
CHANNELS: -c conda-forge -c https://software.repos.intel.com/python/conda --override-channels
111112

112113
steps:
113114
- name: Download artifact
@@ -132,7 +133,7 @@ jobs:
132133
. $CONDA/etc/profile.d/conda.sh
133134
CHANNELS="-c $GITHUB_WORKSPACE/channel ${{ env.CHANNELS }}"
134135
export PACKAGE_VERSION=$(python -c "${VER_SCRIPT1} ${VER_SCRIPT2}")
135-
conda create -n ${{ env.TEST_ENV_NAME }} $PACKAGE_NAME=${PACKAGE_VERSION} python=${{ matrix.python }} $CHANNELS --only-deps --dry-run > lockfile
136+
conda create -n ${{ env.TEST_ENV_NAME }} $PACKAGE_NAME=${PACKAGE_VERSION} python=${{ matrix.python }} numpy=${{ matrix.numpy }} $CHANNELS --only-deps --dry-run > lockfile
136137
cat lockfile
137138
- name: Set pkgs_dirs
138139
run: |
@@ -154,7 +155,7 @@ jobs:
154155
. $CONDA/etc/profile.d/conda.sh
155156
CHANNELS="-c $GITHUB_WORKSPACE/channel ${{ env.CHANNELS }}"
156157
export PACKAGE_VERSION=$(python -c "${VER_SCRIPT1} ${VER_SCRIPT2}")
157-
conda create -n ${{ env.TEST_ENV_NAME }} $PACKAGE_NAME=${PACKAGE_VERSION} pytest python=${{ matrix.python }} $CHANNELS
158+
conda create -n ${{ env.TEST_ENV_NAME }} $PACKAGE_NAME=${PACKAGE_VERSION} pytest python=${{ matrix.python }} numpy=${{ matrix.numpy }} $CHANNELS
158159
# Test installed packages
159160
conda list
160161
- name: Run tests
@@ -170,11 +171,12 @@ jobs:
170171
strategy:
171172
matrix:
172173
python: ['3.9', '3.10']
174+
numpy: ['1.26*']
173175
experimental: [false]
174176
runner: [windows-2019]
175177
continue-on-error: ${{ matrix.experimental }}
176178
env:
177-
CHANNELS: -c conda-forge -c intel --override-channels
179+
CHANNELS: -c conda-forge -c https://software.repos.intel.com/python/conda --override-channels
178180

179181
steps:
180182
- name: Download artifact
@@ -205,7 +207,7 @@ jobs:
205207
FOR /F "tokens=* USEBACKQ" %%F IN (`python -c "%SCRIPT%"`) DO (
206208
SET PACKAGE_VERSION=%%F
207209
)
208-
conda create -n ${{ env.TEST_ENV_NAME }} ${{ env.PACKAGE_NAME }}=%PACKAGE_VERSION% python=${{ matrix.python }} -c ${{ env.GITHUB_WORKSPACE }}/channel ${{ env.CHANNELS }} --only-deps --dry-run > lockfile
210+
conda create -n ${{ env.TEST_ENV_NAME }} ${{ env.PACKAGE_NAME }}=%PACKAGE_VERSION% python=${{ matrix.python }} numpy=${{ matrix.numpy }} -c ${{ env.GITHUB_WORKSPACE }}/channel ${{ env.CHANNELS }} --only-deps --dry-run > lockfile
209211
more lockfile
210212
- name: Cache conda packages
211213
uses: actions/cache@v4
@@ -227,7 +229,7 @@ jobs:
227229
FOR /F "tokens=* USEBACKQ" %%F IN (`python -c "%SCRIPT%"`) DO (
228230
SET PACKAGE_VERSION=%%F
229231
)
230-
conda create -n ${{ env.TEST_ENV_NAME }} ${{ env.PACKAGE_NAME }}=%PACKAGE_VERSION% pytest python=${{ matrix.python }} -c ${{ env.GITHUB_WORKSPACE }}/channel ${{ env.CHANNELS }}
232+
conda create -n ${{ env.TEST_ENV_NAME }} ${{ env.PACKAGE_NAME }}=%PACKAGE_VERSION% pytest python=${{ matrix.python }} numpy=${{ matrix.numpy }} -c ${{ env.GITHUB_WORKSPACE }}/channel ${{ env.CHANNELS }}
231233
# Test installed packages
232234
conda list
233235
- name: Run tests

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,16 @@
66
Per NumPy's community suggestions, voiced in https://github.com/numpy/numpy/pull/8209, it is being released as a
77
stand-alone package.
88

9-
Prebuilt `mkl_random` can be installed into conda environment from Intel's channel on Anaconda cloud:
9+
Prebuilt `mkl_random` can be installed into conda environment from Intel's channel:
1010

1111
```
12-
conda install -c intel mkl_random
12+
conda install -c https://software.repos.intel.com/python/conda mkl_random
13+
```
14+
15+
or from conda forge channel:
16+
17+
```
18+
conda install -c conda-forge mkl_random
1319
```
1420

1521
---

0 commit comments

Comments
 (0)