-
Notifications
You must be signed in to change notification settings - Fork 248
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #233 from diegoferigo/feature/setuptools
Update CMake and setuptools logic for the Python bindings
- Loading branch information
Showing
14 changed files
with
278 additions
and
159 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
name: release | ||
on: | ||
push: | ||
tags: | ||
- '*' | ||
pull_request: | ||
branches: | ||
- devel # master only when ready | ||
- master | ||
workflow_dispatch: | ||
|
||
jobs: | ||
|
||
build-sdist: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- run: git fetch --prune --unshallow | ||
|
||
- name: Install Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.6 | ||
|
||
- name: Setup apt | ||
run: | | ||
sudo apt update | ||
sudo apt install -y libeigen3-dev | ||
- name: Setup | ||
run: | | ||
python3 -m pip install --upgrade pip | ||
pip3 install build | ||
- name: Build sdist | ||
run: python3 -m build --sdist -o dist/ | ||
|
||
- name: Build wheel | ||
run: python3 -m build --wheel -o dist/ | ||
|
||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: dist | ||
path: dist/* | ||
# path: | | ||
# path/*.whl | ||
# path/*.tar.gz | ||
|
||
upload_pypi: | ||
needs: build-sdist | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- uses: actions/download-artifact@v2 | ||
with: | ||
name: dist | ||
path: dist | ||
|
||
- name: Inspect dist folder | ||
run: ls -lah dist/ | ||
|
||
# @todo: see https://github.com/diegoferigo/manif/pull/1#discussion_r668531581 | ||
# - uses: pypa/gh-action-pypi-publish@master | ||
# if: | | ||
# github.repository == 'artivis/manif' && | ||
# ((github.event_name == 'release' && github.event.action == 'published') || | ||
# (github.event_name == 'push' && github.ref == 'refs/heads/main')) | ||
# with: | ||
# user: __token__ | ||
# password: ${{ secrets.PYPI_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,3 +15,4 @@ docs/m.css | |
*.so | ||
*__pycache__ | ||
.pytest_cache | ||
dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
[build-system] | ||
requires = [ | ||
"wheel", | ||
"setuptools>=45", | ||
"setuptools_scm[toml]>=6.0", | ||
"ninja", | ||
"cmake>=3.18.2", | ||
"cmake-build-extension", | ||
"pybind11", | ||
] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[tool.setuptools_scm] | ||
local_scheme = "dirty-tag" |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.