mirror of
https://github.com/psycopg/psycopg2.git
synced 2025-07-29 17:39:49 +03:00
Try again
This commit is contained in:
parent
fe1165544c
commit
8d55da4074
34
.github/workflows/packages.yml
vendored
34
.github/workflows/packages.yml
vendored
|
@ -2,6 +2,8 @@
|
||||||
name: Build packages
|
name: Build packages
|
||||||
on:
|
on:
|
||||||
- workflow_dispatch
|
- workflow_dispatch
|
||||||
|
# XXX: Temp change while working on PR; remove with prettier changes
|
||||||
|
- pull_request
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-sdist:
|
build-sdist:
|
||||||
|
@ -137,24 +139,44 @@ 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: macos-10.15
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
name: "build-macos (3.8-3.10 - arm64)"
|
matrix:
|
||||||
|
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
|
||||||
|
run: |
|
||||||
|
# brew install gnu-sed postgresql@13
|
||||||
|
brew install postgresql@13
|
||||||
|
brew services start postgresql
|
||||||
|
# gsed -i "s/^setup(name=\"psycopg2\"/setup(name=\"psycopg2-binary\"/" setup.py
|
||||||
|
# git diff
|
||||||
|
|
||||||
# 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:
|
with:
|
||||||
output-dir: dist
|
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_MACOS: arm64
|
CIBW_ARCHS: arm64
|
||||||
# Skip testing the arm64 builds
|
PACKAGE_NAME: psycopg2-binary
|
||||||
CIBW_TEST_SKIP: "*:arm64"
|
|
||||||
|
- name: Some tests
|
||||||
|
run: |
|
||||||
|
git diff
|
||||||
|
ls -l dist
|
||||||
|
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')"
|
||||||
|
|
||||||
- name: Upload artifacts
|
- name: Upload artifacts
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: packages_macos_arm64
|
name: packages_${{ matrix.os }}_arm64
|
||||||
path: |
|
path: |
|
||||||
dist/*macosx_11_0_arm64.whl
|
dist/*macosx_11_0_arm64.whl
|
||||||
|
|
|
@ -35,15 +35,9 @@ mkdir -p "$distdir"
|
||||||
# Install required python packages
|
# Install required python packages
|
||||||
pip install -U pip wheel delocate
|
pip install -U pip wheel delocate
|
||||||
|
|
||||||
# Replace the package name
|
|
||||||
if [[ "${PACKAGE_NAME:-}" ]]; then
|
|
||||||
gsed -i "s/^setup(name=\"psycopg2\"/setup(name=\"${PACKAGE_NAME}\"/" \
|
|
||||||
"${prjdir}/setup.py"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Build the wheels
|
# Build the wheels
|
||||||
wheeldir="${prjdir}/wheels"
|
wheeldir="${prjdir}/wheels"
|
||||||
pip wheel -w ${wheeldir} .
|
pip wheel --use-feature=in-tree-build -w ${wheeldir} .
|
||||||
delocate-listdeps ${wheeldir}/*.whl
|
delocate-listdeps ${wheeldir}/*.whl
|
||||||
|
|
||||||
# Check where is the libpq. I'm gonna kill it for testing
|
# Check where is the libpq. I'm gonna kill it for testing
|
||||||
|
|
3
setup.py
3
setup.py
|
@ -45,6 +45,7 @@ except ImportError:
|
||||||
# for a consistent versioning pattern.
|
# for a consistent versioning pattern.
|
||||||
|
|
||||||
PSYCOPG_VERSION = '2.9.1'
|
PSYCOPG_VERSION = '2.9.1'
|
||||||
|
PSYCOPG_NAME = os.environ.get("PACKAGE_NAME", "psycopg2")
|
||||||
|
|
||||||
|
|
||||||
# note: if you are changing the list of supported Python version please fix
|
# note: if you are changing the list of supported Python version please fix
|
||||||
|
@ -545,7 +546,7 @@ except Exception:
|
||||||
print("failed to read readme: ignoring...")
|
print("failed to read readme: ignoring...")
|
||||||
readme = __doc__
|
readme = __doc__
|
||||||
|
|
||||||
setup(name="psycopg2",
|
setup(name=PSYCOPG_NAME,
|
||||||
version=PSYCOPG_VERSION,
|
version=PSYCOPG_VERSION,
|
||||||
author="Federico Di Gregorio",
|
author="Federico Di Gregorio",
|
||||||
author_email="fog@initd.org",
|
author_email="fog@initd.org",
|
||||||
|
|
Loading…
Reference in New Issue
Block a user