Skip to content

Commit

Permalink
Merge pull request #11 from jaimergp/py39
Browse files Browse the repository at this point in the history
Rebuild for Python 3.9
  • Loading branch information
jaimergp authored Mar 13, 2023
2 parents 59145b6 + 3c73da2 commit 19038f1
Show file tree
Hide file tree
Showing 5 changed files with 66 additions and 28 deletions.
24 changes: 18 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,11 @@ jobs:
DOCKERIMAGE: condaforge/linux-anvil-comp7
MINIFORGE_NAME: "Mambaforge-colab"
OS_NAME: "Linux"
# Reduce the test matrix because the builds timeouts on emulated architectures
# The time consuming operation is an attempt a full solve of conda/mamba/boa
# for as a compatibility
# xref https://github.com/conda-forge/miniforge/pull/361
TEST_IMAGE_NAMES: "ubuntu:22.04"

- os: ubuntu-latest
ARCH: x86_64
Expand All @@ -118,12 +123,17 @@ jobs:
# OS_NAME: "Linux"

# - os: ubuntu-latest
# ARCH: aarch64
# TARGET_PLATFORM: linux-aarch64
# DOCKER_ARCH: arm64v8
# DOCKERIMAGE: condaforge/linux-anvil-aarch64
# MINIFORGE_NAME: "Miniforge-pypy3"
# ARCH: ppc64le
# TARGET_PLATFORM: linux-ppc64le
# DOCKER_ARCH: ppc64le
# DOCKERIMAGE: condaforge/linux-anvil-ppc64le
# MINIFORGE_NAME: "Mambaforge"
# OS_NAME: "Linux"
# # Reduce the test matrix because the builds timeouts on emulated architectures
# # The time consuming operation is an attempt a full solve of conda/mamba/boa
# # for as a compatibility
# # xref https://github.com/conda-forge/miniforge/pull/361
# TEST_IMAGE_NAMES: "ubuntu:22.04"

# - os: ubuntu-latest
# ARCH: aarch64
Expand Down Expand Up @@ -189,7 +199,9 @@ jobs:

- uses: conda-incubator/setup-miniconda@v2.2.0
with:
miniconda-version: "latest"
miniforge-version: "latest"
miniforge-variant: Mambaforge
use-mamba: true
if: contains(matrix.OS_NAME, 'Windows')

- name: Build and test miniforge
Expand Down
16 changes: 11 additions & 5 deletions Miniforge3/construct.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% set version = os.environ.get("MINIFORGE_VERSION", "22.9.0-2") %}
{% set version = os.environ.get("MINIFORGE_VERSION", "22.11.1-4") %}
{% set name = os.environ.get("MINIFORGE_NAME", "Miniforge3") %}

name: {{ name }}
Expand All @@ -16,20 +16,26 @@ write_condarc: True
# and keep the same with Miniconda
keep_pkgs: True
license_file: ../LICENSE
# Blocked until https://github.com/mamba-org/mamba/issues/1497 is fixed
# transmute_file_type: .conda

# During the interactive installation, these variables are checked.
# During batch installation, conda is never initialized
initialize_conda: True
initialize_by_default: False

specs:
{% if name.endswith("pypy3") %}
- python 3.9.* *_pypy
{% elif name.endswith("colab") %}
- python 3.8.*
- python 3.9.*
{% else %}
- python 3.10.*
{% endif %}
{% if name.startswith("Mambaforge") %}
- mamba 1.0.0
- mamba 1.1.0
{% endif %}
- conda {{ version.split("-")[0] }}
- pip
# Unpin setuptools when the issue below is resolved
# https://github.com/conda-forge/conda-forge-pinning-feedstock/issues/3973
- setuptools 65.*
- miniforge_console_shortcut 1.* # [win]
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Miniforge
![Build Miniforge](https://github.com/conda-forge/miniforge/workflows/Build%20miniforge/badge.svg)
[![Build miniforge](https://github.com/conda-forge/miniforge/actions/workflows/ci.yml/badge.svg)](https://github.com/conda-forge/miniforge/actions/workflows/ci.yml)
[![GitHub downloads](https://img.shields.io/github/downloads/conda-forge/miniforge/total.svg)](https://tooomm.github.io/github-release-stats/?username=conda-forge&repository=miniforge)

This repository holds a minimal installer for [Conda](https://conda.io/) specific to [conda-forge](https://conda-forge.org/).
Miniforge allows you to install the conda package manager with the following features pre-configured:
Expand Down Expand Up @@ -80,7 +81,7 @@ Latest installers with Mamba and PyPy in the base environment:

## Install

### Unix-like platforms
### Unix-like platforms (Mac OS & Linux)

Download the installer using curl or wget or your favorite program download files and run the script.
For eg:
Expand Down Expand Up @@ -155,7 +156,7 @@ For Linux, any architecture, use the following command
wget -O Miniforge3.sh "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh"
When you want to use `Mambaforge`, you should replace Miniforge into Mamabaforge:
When you want to use `Mambaforge`, you should replace Miniforge into Mambaforge:
wget -O Mambaforge.sh "https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-$(uname)-$(uname -m).sh"
Expand Down
23 changes: 11 additions & 12 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,20 @@ CONSTRUCT_ROOT="${CONSTRUCT_ROOT:-${PWD}}"

cd "${CONSTRUCT_ROOT}"

# Constructor should be latest for non-native building
# See https://github.com/conda/constructor
echo "***** Install constructor *****"
conda install --yes \

mamba install --yes \
--channel conda-forge --override-channels \
jinja2 curl libarchive \
"constructor>=3.3.1"
"constructor>=3.4.2"

if [[ "$(uname)" == "Darwin" ]]; then
conda install --yes coreutils --channel conda-forge --override-channels
mamba install --yes \
--channel conda-forge --override-channels \
coreutils
fi
# shellcheck disable=SC2154
if [[ "${TARGET_PLATFORM}" == win-* ]]; then
conda install --yes "nsis=3.01" --channel conda-forge --override-channels
fi
conda list

mamba list

echo "***** Make temp directory *****"
if [[ "$(uname)" == MINGW* ]]; then
Expand All @@ -39,8 +38,8 @@ cp LICENSE "${TEMP_DIR}/"
ls -al "${TEMP_DIR}"

if [[ "${TARGET_PLATFORM}" != win-* ]]; then
MICROMAMBA_VERSION=1.0.0
MICROMAMBA_BUILD=1
MICROMAMBA_VERSION=1.3.1
MICROMAMBA_BUILD=0
mkdir "${TEMP_DIR}/micromamba"
pushd "${TEMP_DIR}/micromamba"
curl -L -O "https://anaconda.org/conda-forge/micromamba/${MICROMAMBA_VERSION}/download/${TARGET_PLATFORM}/micromamba-${MICROMAMBA_VERSION}-${MICROMAMBA_BUILD}.tar.bz2"
Expand Down
24 changes: 22 additions & 2 deletions scripts/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ else
fi
INSTALLER_PATH=$(find build/ -name "*forge*.${EXT}" | head -n 1)
INSTALLER_NAME=$(basename "${INSTALLER_PATH}" | cut -d "-" -f 1)
INSTALLER_EXE=$(basename "${INSTALLER_PATH}")

echo "***** Run the installer *****"
chmod +x "${INSTALLER_PATH}"
Expand All @@ -45,7 +46,10 @@ if [[ "$(uname)" == MINGW* ]]; then
conda.exe install r-base --yes --quiet
conda.exe list

if [[ "${INSTALLER_NAME}" == "Mambaforge" ]]; then
# hmaarrfk -- 2023/02
# For some reason the Mambaforge-Linux-ppc64le works fine in under 15 mins on a branch
# but then fails to build within the 6 hour time limit on the release CI.
if [[ "${INSTALLER_NAME}" == "Mambaforge" ]] && [[ "${INSTALLER_EXE}" != "Mambaforge-Linux-ppc64le.sh" ]]; then
echo "***** Mambaforge detected. Checking for boa compatibility *****"
mamba_version_start=$(mamba --version | grep mamba | cut -d ' ' -f 2)
mamba.exe install boa --yes
Expand All @@ -56,7 +60,23 @@ if [[ "$(uname)" == MINGW* ]]; then
fi
fi
else
bash "${INSTALLER_PATH}" -b -p "${CONDA_PATH}"
# Test one of our installers in batch mode
if [[ "${INSTALLER_NAME}" == "Mambaforge" ]]; then
bash "${INSTALLER_PATH}" -b -p "${CONDA_PATH}"
# And the other in interactive mode
else
# Test interactive install. The install will ask the user to
# - newline -- read the EULA
# - yes -- then accept
# - ${CONDA_PATH} -- Then specify the path
# - no -- Then whether or not they want to initialize conda
cat <<EOF | bash "${INSTALLER_PATH}"
yes
${CONDA_PATH}
no
EOF
fi

echo "***** Setup conda *****"
# shellcheck disable=SC1091
Expand Down

0 comments on commit 19038f1

Please sign in to comment.