-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/USEPA/pybeepop
- Loading branch information
Showing
16 changed files
with
183 additions
and
83 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
name: CI-Build-Publish | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- pybeepop/** | ||
- .github/workflows/ci-build-publish.yml | ||
- pyproject.toml | ||
- build.py | ||
# tags: | ||
# - '*.*.*' | ||
pull_request: | ||
release: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build_wheels: | ||
name: Build wheels on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Checkout BeePop+ code | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: quanted/vpoplib | ||
ref: dev | ||
path: beepop | ||
|
||
- name: Build wheels | ||
uses: pypa/[email protected] | ||
env: | ||
CIBW_ARCHS: auto64 | ||
CIBW_BUILD_VERBOSITY: 1 | ||
CIBW_PROJECT_REQUIRES_PYTHON: ">=3.8" | ||
with: | ||
config-file: "pyproject.toml" | ||
|
||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }} | ||
path: ./wheelhouse/*.whl | ||
|
||
build_sdist: | ||
name: Build source distribution | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Build sdist | ||
run: pipx run poetry build --format=sdist | ||
|
||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: cibw-sdist | ||
path: dist/*.tar.gz | ||
|
||
upload_testpypi: | ||
needs: [build_wheels, build_sdist] | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: testpypi | ||
url: https://test.pypi.org/p/pybeepop-plus | ||
permissions: | ||
id-token: write | ||
# if: github.event_name == 'release' && github.event.action == 'created' | ||
# or, alternatively, upload to PyPI on every tag starting with 'v' (remove on: release above to use this) | ||
# if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') | ||
steps: | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
# unpacks all CIBW artifacts into dist/ | ||
pattern: cibw-* | ||
path: dist | ||
merge-multiple: true | ||
|
||
- uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
repository-url: https://test.pypi.org/legacy/ | ||
skip-existing: true | ||
|
||
upload_pypi: | ||
needs: [build_wheels, build_sdist] | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: pypi | ||
url: https://pypi.org/p/pybeepop-plus | ||
permissions: | ||
id-token: write | ||
if: github.event_name == 'release' && github.event.action == 'published' | ||
# or, alternatively, upload to PyPI on every tag starting with 'v' (remove on: release above to use this) | ||
# if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') | ||
steps: | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
# unpacks all CIBW artifacts into dist/ | ||
pattern: cibw-* | ||
path: dist | ||
merge-multiple: true | ||
|
||
- uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
skip-existing: true |
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,2 @@ | ||
def build(setup_kwargs): | ||
print("Placehold build code!") |
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
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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 |
---|---|---|
@@ -1,9 +1,12 @@ | ||
[tool.poetry] | ||
name = "pybeepop-plus" | ||
version = "0.1.0" | ||
version = "0.1.1" | ||
description = "EPA's Python wrapper for the EPA/USDA honey bee colony model BeePop+" | ||
authors = ["Jeffrey Minucci <[email protected]>"] | ||
maintainers = ["Jeffrey Minucci <[email protected]>"] | ||
license = "MIT" | ||
readme = "README.md" | ||
repository = "https://github.com/USEPA/pybeepop" | ||
documentation = "https://usepa.github.io/pybeepop/" | ||
packages = [ | ||
{ include = "pybeepop", from ="." }, | ||
|
@@ -13,12 +16,53 @@ classifiers = [ | |
"Operating System :: Microsoft :: Windows", | ||
"Operating System :: POSIX :: Linux", | ||
"Programming Language :: Python", | ||
"Intended Audience :: Science/Research", | ||
] | ||
|
||
[tool.poetry.dependencies] | ||
python = "^3.9.0" | ||
python = "^3.8.0" | ||
pandas = "^2.0.0" | ||
|
||
[build-system] | ||
requires = ["poetry-core"] | ||
requires = ["poetry-core", "setuptools"] | ||
build-backend = "poetry.core.masonry.api" | ||
|
||
[tool.poetry.build] | ||
script = "build.py" | ||
generate-setup-file = true | ||
|
||
[tool.cibuildwheel.linux] | ||
before-all = ["yum -y install cmake", | ||
"cd beepop", | ||
"mkdir build", | ||
"cd build", | ||
"cmake -DCMAKE_POSITION_INDEPENDENT_CODE=ON ..", | ||
"cmake --build . --config Release", | ||
"pwd", | ||
"cp liblibvpop.so ../../pybeepop/lib", | ||
"mv -f ../../pybeepop/lib/liblibvpop.so ../../pybeepop/lib/beepop_linux.so", | ||
] | ||
|
||
[tool.cibuildwheel.windows] | ||
before-all = [ | ||
"cd beepop", | ||
"mkdir build", | ||
"cd build", | ||
"cmake -DCMAKE_POSITION_INDEPENDENT_CODE=ON ..", | ||
"cmake --build . --config Release", | ||
"copy Release\\libvpop.dll ..\\..\\pybeepop\\lib", | ||
"move /y ..\\..\\pybeepop\\lib\\libvpop.dll ..\\..\\pybeepop\\lib\\beepop_win64.dll", | ||
] | ||
|
||
[[tool.cibuildwheel.overrides]] | ||
select = "*-musllinux*" | ||
before-all = ["apk add cmake", | ||
"cd beepop", | ||
"mkdir build", | ||
"cd build", | ||
"cmake -DCMAKE_POSITION_INDEPENDENT_CODE=ON ..", | ||
"cmake --build . --config Release", | ||
"pwd", | ||
"cp liblibvpop.so ../../pybeepop/lib", | ||
"mv -f ../../pybeepop/lib/liblibvpop.so ../../pybeepop/lib/beepop_linux.so", | ||
] |
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