mirror of
https://github.com/psycopg/psycopg2.git
synced 2025-07-29 17:39:49 +03:00
Upload repaired_wheels
This commit is contained in:
parent
f3c696d22e
commit
6d99aa2f29
21
.github/workflows/packages.yml
vendored
21
.github/workflows/packages.yml
vendored
|
@ -140,32 +140,37 @@ jobs:
|
||||||
|
|
||||||
# This only uploads the arm64 wheels for Apple M1 Silicon usage
|
# This only uploads the arm64 wheels for Apple M1 Silicon usage
|
||||||
build-macos-arm64:
|
build-macos-arm64:
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: macos-11.0
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
name: "build-macos-11 - arm64"
|
||||||
os: [macos-10.15, macos-11.0]
|
|
||||||
name: "build-${{ matrix.os }} - arm64"
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Install pre-requisites
|
- name: Install pre-requisites
|
||||||
|
# This skips updating brew when installing a package
|
||||||
|
env: HOMEBREW_NO_AUTO_UPDATE=1
|
||||||
run: |
|
run: |
|
||||||
brew install postgresql@13
|
brew install postgresql@13
|
||||||
brew services start postgresql
|
brew services start postgresql
|
||||||
|
|
||||||
# This builds all possible Python versions (currently, 3.8 to 3.10)
|
# This builds all possible Python versions (currently, 3.8 to 3.10)
|
||||||
- uses: pypa/cibuildwheel@v2.1.1
|
- uses: pypa/cibuildwheel@v2.1.1
|
||||||
with:
|
|
||||||
output-dir: dist
|
|
||||||
# Read about options here https://cibuildwheel.readthedocs.io/en/stable/options
|
# Read about options here https://cibuildwheel.readthedocs.io/en/stable/options
|
||||||
env:
|
env:
|
||||||
CIBW_ARCHS: arm64
|
CIBW_ARCHS: arm64
|
||||||
|
# This changes the default in order to place the wheel in "repaired_wheels"
|
||||||
|
CIBW_REPAIR_WHEEL_COMMAND: delocate-listdeps {wheel} && delocate-wheel --require-archs {delocate_archs} -w repaired_wheels {wheel}
|
||||||
# This allows substitution within setup.py
|
# This allows substitution within setup.py
|
||||||
PACKAGE_NAME: psycopg2-binary
|
PACKAGE_NAME: psycopg2-binary
|
||||||
|
|
||||||
|
- run: |
|
||||||
|
ls -l
|
||||||
|
ls -l dist
|
||||||
|
ls -l repaired_wheels
|
||||||
|
|
||||||
- name: Upload artifacts
|
- name: Upload artifacts
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: packages_${{ matrix.os }}_arm64
|
name: packages_macos_arm64
|
||||||
path: |
|
path: |
|
||||||
dist/*macosx_11_0_arm64.whl
|
repaired_wheels/*.whl
|
||||||
|
|
|
@ -33,7 +33,9 @@ distdir="${prjdir}/dist/psycopg2-$version"
|
||||||
mkdir -p "$distdir"
|
mkdir -p "$distdir"
|
||||||
|
|
||||||
# Install required python packages
|
# Install required python packages
|
||||||
pip install -U pip wheel delocate
|
pip install -U pip wheel
|
||||||
|
# Running it after installing wheel will save building the wheel
|
||||||
|
pip install -U delocate
|
||||||
|
|
||||||
# Build the wheels
|
# Build the wheels
|
||||||
wheeldir="${prjdir}/wheels"
|
wheeldir="${prjdir}/wheels"
|
||||||
|
@ -46,8 +48,10 @@ if [[ -z "${LIBPQ:-}" ]]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
delocate-wheel ${wheeldir}/*.whl
|
delocate-wheel ${wheeldir}/*.whl
|
||||||
# https://github.com/MacPython/wiki/wiki/Spinning-wheels#question-will-pip-give-me-a-broken-wheel
|
if [[ $(uname -m) != 'arm64' ]]; then
|
||||||
delocate-addplat --rm-orig -x 10_9 -x 10_10 ${wheeldir}/*.whl
|
# https://github.com/MacPython/wiki/wiki/Spinning-wheels#question-will-pip-give-me-a-broken-wheel
|
||||||
|
delocate-addplat --rm-orig -x 10_9 -x 10_10 ${wheeldir}/*.whl
|
||||||
|
fi
|
||||||
cp ${wheeldir}/*.whl ${distdir}
|
cp ${wheeldir}/*.whl ${distdir}
|
||||||
|
|
||||||
# kill the libpq to make sure tests don't depend on it
|
# kill the libpq to make sure tests don't depend on it
|
||||||
|
|
|
@ -9,4 +9,15 @@
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
url=
|
tempdir=$(mktemp -d /tmp/psycopg2.$$)
|
||||||
|
venv="$tempdir/venv"
|
||||||
|
unzip "$1" -d "$tempdir"
|
||||||
|
|
||||||
|
# XXX: It would be ideal to run this script against various Python versions
|
||||||
|
python3 -m venv "$venv"
|
||||||
|
source "$venv/bin/activate"
|
||||||
|
pip install psycopg2-binary --no-index -f dist
|
||||||
|
python -c "import psycopg2; print(psycopg2.__version__)"
|
||||||
|
python -c "import psycopg2; print(psycopg2.__libpq_version__)"
|
||||||
|
python -c "import psycopg2; print(psycopg2.extensions.libpq_version())"
|
||||||
|
python -c "import tests; tests.unittest.main(defaultTest='tests.test_suite')"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user