Skip to content

Commit

Permalink
Back off further
Browse files Browse the repository at this point in the history
  • Loading branch information
matthew-brett committed Nov 10, 2023
1 parent dcf3f3d commit 9899ac1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
else
export MACOSX_DEPLOYMENT_TARGET="10.10"
fi
# Mac Pythons do not have toml parser by default.
python3 install tomli
fi

if [[ "$MB_PYTHON_VERSION" == pypy3* ]]; then
Expand All @@ -20,14 +22,13 @@ fi
echo "::group::Install a virtualenv"
source multibuild/common_utils.sh
source multibuild/travis_steps.sh
$PYTHON_EXE -m pip install virtualenv
python3 -m pip install virtualenv
before_install
echo "::endgroup::"

echo "::group::Build wheel"
export WHEEL_SDIR=wheelhouse
$PIP_CMD install tomlkit
export BUILD_DEPENDS=$($PYTHON_EXE ./print_deps.py ${MB_PYTHON_VERSION} ${REPO_DIR})
export BUILD_DEPENDS=$(python3 ./print_deps.py ${MB_PYTHON_VERSION} ${REPO_DIR})
clean_code
build_wheel
ls -l "${GITHUB_WORKSPACE}/${WHEEL_SDIR}/"
Expand Down
5 changes: 0 additions & 5 deletions config.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
# Define custom utilities
# Test for OSX with [ -n "$IS_MACOS" ]

function pip_wheel_cmd {
local abs_wheelhouse=$1
pip wheel $(pip_opts) -w $abs_wheelhouse --no-build-isolation --no-deps .
}

function run_tests {
# Runs tests on installed distribution from an empty directory
python --version
Expand Down
7 changes: 5 additions & 2 deletions print_deps.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,15 @@
from pathlib import Path
from argparse import ArgumentParser, RawDescriptionHelpFormatter

import tomlkit
try:
import tomllib as tlib
except ImportError:
import tomli as tlib


def get_phase_requirements(repo_path, phase='build'):
toml = (Path(repo_path) / 'pyproject.toml').read_text()
config = tomlkit.loads(toml)
config = tlib.loads(toml)
if phase == 'build':
requires = config.get('build-system', {}).get('requires', [])
else:
Expand Down

0 comments on commit 9899ac1

Please sign in to comment.