-
Notifications
You must be signed in to change notification settings - Fork 126
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update project metadata, and test publishing from gha
- Loading branch information
1 parent
a0a2f35
commit f748acb
Showing
2 changed files
with
41 additions
and
10 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,9 +3,9 @@ name: Python Packaging | |
on: | ||
workflow_dispatch: | ||
pull_request: | ||
# push: | ||
# branches: | ||
# - main | ||
push: | ||
branches: | ||
- master | ||
release: | ||
types: | ||
- published | ||
|
@@ -19,6 +19,9 @@ jobs: | |
|
||
- name: Build SDist | ||
run: pipx run build --sdist | ||
env: | ||
# TODO: debug only, prevents upload failure due to "local" version | ||
SETUPTOOLS_SCM_PRETEND_VERSION: "2.9.2.post431" | ||
|
||
- uses: actions/upload-artifact@v3 | ||
with: | ||
|
@@ -35,20 +38,19 @@ jobs: | |
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
submodules: true | ||
|
||
- uses: pypa/[email protected] | ||
env: | ||
CIBW_BUILD: cp*-manylinux_x86_64 | ||
# TODO: debug only, prevents upload failure due to "local" version | ||
SETUPTOOLS_SCM_PRETEND_VERSION: "2.9.2.post431" | ||
|
||
- name: Upload wheels | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
path: wheelhouse/*.whl | ||
|
||
upload_all: | ||
upload_pypi: | ||
needs: [build_wheels, make_sdist] | ||
environment: pypi | ||
permissions: | ||
|
@@ -61,5 +63,27 @@ jobs: | |
name: artifact | ||
path: dist | ||
|
||
- uses: pypa/gh-action-pypi-publish@release/v1 | ||
- name: Publish package distributions to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
|
||
upload_test_pypi: | ||
needs: [build_wheels, make_sdist] | ||
environment: pypi | ||
permissions: | ||
id-token: write | ||
runs-on: ubuntu-latest | ||
# Upload to Test PyPI for every commit on main branch | ||
# if: github.event_name == 'push' && github.event.ref == 'refs/heads/master' | ||
# TODO: debug only, test publishing to testpypi on this PR | ||
if: github.event_name == 'pull_request' && github.event.action == 'synchronize' && github.event.pull_request.head.ref == 'add-pip-packaging' | ||
steps: | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: artifact | ||
path: dist | ||
|
||
- name: Publish package distributions to TestPyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
repository-url: https://test.pypi.org/legacy/ | ||
|
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 |
---|---|---|
|
@@ -3,7 +3,7 @@ requires = ["scikit-build-core", "numpy", "setuptools_scm>=8"] | |
build-backend = "scikit_build_core.build" | ||
|
||
[project] | ||
name = "adios2_scottwittenburg" | ||
name = "adios2" | ||
dynamic = ["version"] | ||
authors = [ | ||
{ name="Chuck Atkins", email="[email protected]" }, | ||
|
@@ -27,14 +27,21 @@ dependencies = [ | |
|
||
[project.urls] | ||
Homepage = "https://github.com/ornladios/adios2" | ||
Issues = "https://github.com/ornladios/adios2/issues" | ||
Documentation = "https://adios2.readthedocs.io/" | ||
"Bug Tracker" = "https://github.com/ornladios/adios2/issues" | ||
Discussions = "https://github.com/ornladios/ADIOS2/discussions" | ||
Changelog = "https://github.com/ornladios/ADIOS2/releases" | ||
|
||
[tool.scikit-build] | ||
wheel.packages = ["adios2"] | ||
metadata.version.provider = "scikit_build_core.metadata.setuptools_scm" | ||
|
||
[tool.setuptools_scm] # Section required | ||
write_to = "_version.py" | ||
version_scheme = "post-release" | ||
|
||
[tool.cibuildwheel.linux] | ||
environment-pass = ["SETUPTOOLS_SCM_PRETEND_VERSION"] | ||
|
||
[tool.scikit-build.cmake.define] | ||
ADIOS2_USE_Python = "ON" | ||
|