Skip to content

Commit

Permalink
Enable python sdist
Browse files Browse the repository at this point in the history
  • Loading branch information
kylebarron committed Aug 15, 2023
1 parent ccdd97a commit 46fcf14
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 42 deletions.
74 changes: 33 additions & 41 deletions .github/workflows/python-core-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: Python (Core) Wheels

on:
push:
tags:
- "python-core-v*"
# tags:
# - "python-core-v*"

jobs:
build-wheel-manylinux2014:
Expand Down Expand Up @@ -148,52 +148,44 @@ jobs:
with:
path: python/geoarrow-rust/wheels/*.whl

# sdist build currently broken
# https://github.com/PyO3/maturin/issues/1083#issuecomment-1674085413

# build_sdist:
# name: Build source distribution
# runs-on: ubuntu-latest
# defaults:
# run:
# working-directory: python/geoarrow-rust

# 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

# - run: |
# pwd
# ls ../../
# cargo metadata

# - 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-rust/dist/*.tar.gz
build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
defaults:
run:
working-directory: python/geoarrow-rust

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-rust/dist/*.tar.gz

upload_pypi:
needs:
[
build-wheel-manylinux2014,
build-wheels-mac,
build-wheel-windows,
# build_sdist,
build_sdist,
]
runs-on: ubuntu-latest
# Make sure we only run this on new tags/release
Expand Down
2 changes: 1 addition & 1 deletion python/geoarrow-rust/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build-system]
requires = ["maturin>=1.2,<2.0"]
requires = ["maturin>=1.2.1,<2.0"]
build-backend = "maturin"

[project]
Expand Down

0 comments on commit 46fcf14

Please sign in to comment.