Skip to content

Commit

Permalink
Enable python sdist (#156)
Browse files Browse the repository at this point in the history
* Enable python sdist

* re-enable only on tags
  • Loading branch information
kylebarron authored Aug 20, 2023
1 parent ccdd97a commit 43373e7
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 40 deletions.
70 changes: 31 additions & 39 deletions .github/workflows/python-core-wheels.yml
Original file line number Diff line number Diff line change
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 43373e7

Please sign in to comment.