-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
89 additions
and
8 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 |
---|---|---|
@@ -0,0 +1,76 @@ | ||
name: Build with Python | ||
|
||
on: | ||
push: | ||
branches: ["main","dev"] | ||
|
||
pull_request: | ||
branches: ["main","dev"] | ||
|
||
jobs: | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.10","3.11"] | ||
os: [ubuntu-latest, windows-latest] #, macos-latest] | ||
toolchain: | ||
- {compiler: gcc, version: 13} | ||
# - {compiler: gcc, version: 12} | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Fortran Setup | ||
uses: fortran-lang/setup-fortran@v1 | ||
id: setup-fortran | ||
with: | ||
compiler: ${{ matrix.toolchain.compiler }} | ||
version: ${{ matrix.toolchain.version }} | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
architecture: 'x64' | ||
cache: 'pip' | ||
|
||
- name: show-versions | ||
run: | | ||
gcc --version | ||
gfortran --version | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install click 'numpy<1.26' cython build wheel setuptools setuptools_scm meson-python pytest ninja | ||
- name: Install Patchelf | ||
if: runner.os == 'Linux' | ||
run: | | ||
python -m pip install patchelf | ||
- name: Build and package | ||
run: | | ||
python -m build --no-isolation | ||
- name: Store Wheel | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: pyfvs-${{ runner.os }}-py${{ matrix.python-version }}-wheels | ||
path: dist/*.whl | ||
if-no-files-found: warn | ||
|
||
- name: Store Sdist | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: pyfvs-sdist | ||
path: dist/*.tar.gz | ||
if-no-files-found: warn | ||
# - name: Test with pytest | ||
# run: | | ||
# pytest |
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,24 +1,27 @@ | ||
[build-system] | ||
# AVOID CHANGING REQUIRES: IT WILL BE UPDATED BY PYSCAFFOLD! | ||
requires = [ | ||
"setuptools>=45", | ||
"setuptools_scm[toml]>=6.2", | ||
"numpy", | ||
"cython", | ||
"setuptools>=64", | ||
"setuptools_scm[toml]>=8", | ||
"wheel", | ||
"meson", | ||
"meson-python>=0.13.2", | ||
# "ninja" | ||
"meson-python>=0.15", | ||
"ninja", | ||
"patchelf ; platform_system != 'Windows'", ## Only linux??? | ||
] | ||
build-backend = "mesonpy" | ||
|
||
[project] | ||
name = "pynvel" | ||
description = "A Python wrapper package for the National Volume Estimator library." | ||
description = "Python wrapper and extension package for the National Volume Estimator library." | ||
authors = [ | ||
{name="Tod Haren", email="[email protected]"}, | ||
] | ||
license = {file="LICENSE.txt"} | ||
readme = {file="README.md", content-type="text/markdown"} | ||
keywords = ["Forest Modeling", "Tree Volume", "NVEL"] | ||
keywords = ["Forest Modeling", "Forest Biometrics", "Tree Volume", "NVEL"] | ||
|
||
dynamic = ["version"] | ||
|
||
|
@@ -34,9 +37,12 @@ repository = "https://github.com/forest-modeling/PyNVEL" | |
[project.scripts] | ||
pynvel = "pynvel.__main__:cli" | ||
|
||
[tool.setuptools] | ||
packages = ["pynvel",] | ||
|
||
[tool.setuptools_scm] | ||
# For smarter version schemes and other configuration options, | ||
# check out https://github.com/pypa/setuptools_scm | ||
version_scheme = "post-release" | ||
# version_scheme = "guess-next-dev" | ||
write_to = "pynvel/_version.py" | ||
version_file = "pynvel/_version.py" |