Skip to content

Commit 44a4c42

Browse files
authored
Merge pull request #53 from isuruf/osx-arm64
osx-arm64 support
2 parents 8be9cf8 + e5931c2 commit 44a4c42

File tree

5 files changed

+25
-8
lines changed

5 files changed

+25
-8
lines changed

.travis.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@ language: generic
22

33
matrix:
44
include:
5+
- os: osx
6+
env:
7+
- ARCH=arm64
8+
- MINIFORGE_NAME="Miniforge3"
9+
- OS_NAME="MacOSX"
10+
511
- os: osx
612
env:
713
- ARCH=x86_64

Miniforge3/construct.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ channels:
99
# specifying the channel with the full URL adds two channels
1010
# when the end user adds the channel without the full URL
1111
# - https://conda.anaconda.org/conda-forge
12-
- conda-forge
12+
- conda-forge # [not (osx and arm64)]
13+
- https://conda-web.anaconda.org/conda-forge # [osx and arm64]
1314

1415
write_condarc: True
1516
# keep pkgs for space-saving implications for hardlinks when create new environments

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ Latest installers with python 3.8 in the base environment
1717
- [linux-ppc64le](https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-ppc64le.sh) (also called `POWER8/9`)
1818
- [linux-x86_64](https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh) (also called `amd64`)
1919
- [osx-x86_64](https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-MacOSX-x86_64.sh)
20+
- [osx-arm64](https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-MacOSX-arm64.sh) (Apple Silicon)
2021

2122
#### Miniforge-pypy3
2223
Latest installers with pypy3.6 in the base environment
@@ -70,7 +71,7 @@ To release a new version of Miniforge:
7071
1. One installer with the version name
7172
2. One installer without the version name
7273
3. The SHA256
73-
- At the time of writing, the is a sum of 24 artifacts, and with the two sources, we expect a grand total of 26 artifacts.
74+
- At the time of writing, the is a sum of 27 artifacts, and with the two sources, we expect a grand total of 29 artifacts.
7475
- Mark the pre-release as a release
7576

7677
NOTE: using a pre-release is important to make sure the latest links work.

build_miniforge_osx.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,6 @@ export CONSTRUCT_ROOT=$PWD
1616
mkdir -p build
1717

1818
bash scripts/build.sh
19-
bash scripts/test.sh
19+
if [[ "$ARCH" == "$(uname -m)" ]]; then
20+
bash scripts/test.sh
21+
fi

scripts/build.sh

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ CONSTRUCT_ROOT="${CONSTRUCT_ROOT:-/construct}"
88

99
cd $CONSTRUCT_ROOT
1010

11-
# Constructor should be >= 3.0.1 for aarch64.
12-
# See https://github.com/conda-forge/miniforge/pull/2#issuecomment-554394343
11+
# Constructor should be latest for non-native building
12+
# See https://github.com/conda/constructor
1313
echo "***** Install constructor *****"
14-
conda install -y "constructor>=3.0.1" jinja2
15-
pip install git+git://github.com/conda/constructor@01209f0bf772c601dda062bc0167d0e00b70c6e4#egg=constructor --force --no-deps
14+
conda install -y "constructor>=3.1.0" jinja2
15+
pip install git+git://github.com/conda/constructor@926707a34def8cb51be640b98842180260e7fa0a#egg=constructor --force --no-deps
1616
conda list
1717

1818
echo "***** Make temp directory *****"
@@ -24,8 +24,15 @@ cp LICENSE $TEMP_DIR/
2424

2525
ls -al $TEMP_DIR
2626

27+
if [[ $(uname -r) != "$ARCH" ]]; then
28+
if [[ "$ARCH" == "arm64" ]]; then
29+
# Use a x86_64 binary here since we don't have a standalone conda for arm64 yet.
30+
EXTRA_CONSTRUCTOR_ARGS="$EXTRA_CONSTRUCTOR_ARGS --conda-exe $CONDA_PREFIX/standalone_conda/conda.exe --platform osx-$ARCH"
31+
fi
32+
fi
33+
2734
echo "***** Construct the installer *****"
28-
constructor $TEMP_DIR/Miniforge3/ --output-dir $TEMP_DIR
35+
constructor $TEMP_DIR/Miniforge3/ --output-dir $TEMP_DIR $EXTRA_CONSTRUCTOR_ARGS
2936

3037
echo "***** Generate installer hash *****"
3138
cd $TEMP_DIR

0 commit comments

Comments
 (0)