Skip to content

add zlib.pc stub

add zlib.pc stub #65

name: Python (geoarrow.proj) Wheels
on:
push:
# tags:
# - "python-core-v*"
jobs:
# build-wheel-manylinux2014:
# name: "Build manylinux2014 wheels"
# runs-on: ubuntu-latest
# container: quay.io/pypa/manylinux2014_x86_64
# defaults:
# run:
# working-directory: python/geoarrow-proj
# # NOTE: We abstain from most reusable github actions given that this is running in a docker
# # image
# steps:
# - uses: actions/checkout@v3
# with:
# submodules: "recursive"
# - name: Install latest stable rust
# run: |
# curl --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --profile minimal --default-toolchain stable -y
# - name: Install python dependencies
# run: |
# export PATH="/opt/python/cp38-cp38/bin/:$PATH"
# pip install -U pip
# pip install maturin
# - name: Install clang
# run: |
# # Install clang via yum to fix error:
# # error: 'stddef.h' file not found
# # Not sure why I can't get this to work via pixi. Am I missing a dependency?
# yum update
# yum install -y clang
# yum install -y llvm-toolset-7
# - name: Install Pixi
# run: |
# curl -fsSL https://pixi.sh/install.sh | bash
# - name: Install build requirements
# run: |
# export PATH="$HOME/.pixi/bin:$PATH"
# cd build
# pixi install
# - name: Build Python wheel
# run: |
# source $HOME/.cargo/env
# export PATH="/opt/python/cp38-cp38/bin/:$PATH"
# export PATH="$HOME/.pixi/bin:$PATH"
# export LD_LIBRARY_PATH="$(pwd)/build/.pixi/env/lib:$LD_LIBRARY_PATH"
# export PKG_CONFIG_PATH="$(pwd)/build/.pixi/env/lib/pkgconfig:$PKG_CONFIG_PATH"
# export LIBCLANG_PATH="$(pwd)/build/.pixi/env/lib"
# # export RUSTFLAGS="-I$(pwd)/build/.pixi/env/include"
# # pixi run --manifest-path build/pixi.toml
# maturin build --strip --interpreter /opt/python/cp38-cp38/bin/python --manylinux 2014 -o wheels
# - name: List wheels
# run: find ./wheels
# # Have to set path from root
# # https://github.com/actions/upload-artifact/issues/232#issuecomment-964235360
# - uses: actions/upload-artifact@v2
# with:
# path: python/geoarrow-proj/wheels/*.whl
# build-wheels-mac-x86:
# runs-on: macos-latest
# defaults:
# run:
# working-directory: python/geoarrow-proj
# steps:
# - uses: actions/checkout@v3
# with:
# submodules: "recursive"
# - name: Install Rust
# uses: dtolnay/rust-toolchain@stable
# - uses: Swatinem/rust-cache@v2
# - name: Set up Python
# uses: actions/setup-python@v4
# with:
# python-version: "3.8"
# - name: Install Pixi
# run: |
# curl -fsSL https://pixi.sh/install.sh | bash
# echo "$HOME/.pixi/bin" >> $GITHUB_PATH
# - name: Install build requirements
# run: |
# cd build
# pixi install
# - name: Set native dependency paths
# run: |
# echo "LD_LIBRARY_PATH=$(pwd)/build/.pixi/env/lib" >> "$GITHUB_ENV"
# echo "PKG_CONFIG_PATH=$(pwd)/build/.pixi/env/lib/pkgconfig" >> "$GITHUB_ENV"
# - name: Install Python dependencies
# run: |
# python -V
# pip install maturin
# - name: Build
# run: |
# maturin build --strip -o wheels
# - name: Include shared libraries
# run: |
# pip install delocate
# # TODO: delocate shared lib
# - name: List wheels
# run: find ./wheels
# # Have to set path from root
# # https://github.com/actions/upload-artifact/issues/232#issuecomment-964235360
# - uses: actions/upload-artifact@v2
# with:
# path: python/geoarrow-proj/wheels/*.whl
build-wheel-windows:
runs-on: windows-latest
defaults:
run:
working-directory: python/geoarrow-proj
strategy:
fail-fast: false
matrix:
include:
- os: "windows-2019"
arch: "auto64"
triplet: "x64-windows"
vcpkg_cache: "c:\\vcpkg\\installed"
vcpkg_logs: "c:\\vcpkg\\buildtrees\\**\\*.log"
steps:
- uses: actions/checkout@v3
with:
submodules: "recursive"
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Install Pixi
# shell: bash
run: |
iwr -useb https://pixi.sh/install.ps1 | iex
- name: Add pixi to PATH
shell: bash
run: |
echo "C:/Users/runneradmin/AppData/Local/pixi/bin" >> $GITHUB_PATH
- name: Install build requirements
shell: bash
run: |
cd build
pixi install
- name: cat pkg-config file
shell: bash
run: |
cat ./build/.pixi/env/Library/lib/pkgconfig/proj.pc
- name: Try pkg-config
shell: bash
run: |
cp -n build/pkgconfig/* ./build/.pixi/env/Library/lib/pkgconfig/
pixi run --manifest-path build/pixi.toml pkg-config --libs --cflags proj proj >= 9.2.0
- name: Set native dependency paths
shell: bash
run: |
echo "listing env"
ls $(pwd)/build/.pixi/env
echo "listing Library"
ls $(pwd)/build/.pixi/env/Library
echo "listing Library/bin"
ls $(pwd)/build/.pixi/env/Library/bin
echo "listing Library/lib"
ls $(pwd)/build/.pixi/env/Library/lib
echo "listing Library/include"
ls $(pwd)/build/.pixi/env/Library/include
echo "listing Library/include"
ls $(pwd)/build/.pixi/env/Library/include
echo "$(pwd)/build/.pixi/env/Library/bin" >> $GITHUB_PATH
echo "LD_LIBRARY_PATH=$(pwd)/build/.pixi/env/Library/lib" >> "$GITHUB_ENV"
echo "PKG_CONFIG_PATH=$(pwd)/build/.pixi/env/Library/lib/pkgconfig" >> "$GITHUB_ENV"
# man pkg-config
# echo "try pkg-config"
# ./build/.pixi/env/Library/bin/pkg-config --libs --cflags proj proj>=9.2.0
- name: Set LIBCLANG_PATH
run: echo "LIBCLANG_PATH=$((gcm clang).source -replace "clang.exe")" >> $env:GITHUB_ENV
# # We manually pass in a checksum because it appears to be flaky on CI, occasionally
# # downloading from sourceforge via insecure http without a checksum
# - name: Install pkg-config
# run: |
# choco install pkgconfiglite -y --checksum 6004df17818f5a6dbf19cb335cc92702
- name: Install Python dependencies
shell: bash
run: |
python -V
python -m pip install maturin
python -m pip install delvewheel
- name: Build
shell: bash
run: |
echo "$PKG_CONFIG_PATH"
# export PKG_CONFIG_PATH="$VCPKG_INSTALLATION_ROOT/installed/${{ matrix.triplet }}/lib/pkgconfig"
pixi run --manifest-path build/pixi.toml cd .. && maturin build --strip -o wheels
# pixi run --manifest-path maturin build --strip -o wheels
- name: List wheels
shell: bash
run: find ./wheels
# Have to set path from root
# https://github.com/actions/upload-artifact/issues/232#issuecomment-964235360
- uses: actions/upload-artifact@v2
with:
path: python/geoarrow-proj/wheels/*.whl
build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
defaults:
run:
working-directory: python/geoarrow-proj
steps:
- uses: actions/checkout@v3
with:
submodules: "recursive"
- uses: actions/setup-python@v2
name: Install Python
with:
python-version: "3.8"
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Build sdist
run: |
pip install -U build
python -m build --sdist
# Have to set path from root
# https://github.com/actions/upload-artifact/issues/232#issuecomment-964235360
- uses: actions/upload-artifact@v2
with:
path: python/geoarrow-proj/dist/*.tar.gz
# upload_pypi:
# needs:
# [
# build-wheel-manylinux2014,
# build-wheels-mac-x86,
# build-wheel-windows,
# build_sdist,
# ]
# runs-on: ubuntu-latest
# # Make sure we only run this on new tags/release
# if: startsWith(github.event.ref, 'refs/tags') || github.event_name == 'release'
# steps:
# - uses: actions/download-artifact@v2
# with:
# name: artifact
# path: dist
# - uses: pypa/gh-action-pypi-publish@release/v1
# with:
# user: __token__
# password: ${{ secrets.PYPI_PASSWORD }}
# # To test: repository_url: https://test.pypi.org/legacy/