-
Notifications
You must be signed in to change notification settings - Fork 21
Prepare release with packaged igakit #555
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
yguclu
merged 18 commits into
prepare-release
from
prepare-release-with-packaged-igakit
Dec 12, 2025
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
7e4a3c1
Meson needs subprojects to be in a folder named subprojects
EmilyBourne 636df83
Use meson for installation
EmilyBourne f886ead
Run test
EmilyBourne ccb8ce4
Test with dev version
EmilyBourne f87a568
Modify correct file
EmilyBourne a250805
Also update version in version.py
EmilyBourne b0f9fea
Save version in git to avoid meson ignoring update
EmilyBourne c901576
Correct path
EmilyBourne 1362971
Set user
EmilyBourne 711a312
Correct path
EmilyBourne 6b7cdad
Include Python files
EmilyBourne b546f4d
Install mesh
EmilyBourne 0133155
Extract version from package data
EmilyBourne bc37a79
Grab version from pyproject.toml. Don't modify version.py
EmilyBourne c01dbbf
remove trigger
EmilyBourne fbdcf58
Remove unnecessary grep flag
EmilyBourne 1f24673
Remove duplicate line
EmilyBourne 5126e4f
Add igakit cleanly with final path
EmilyBourne File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -45,10 +45,14 @@ jobs: | |
| - name: Build and deploy to TestPyPI | ||
| if: steps.duplicate_check.outputs.should_skip != 'true' | ||
| run: | | ||
| CURRENT_VERSION=$(sed -n 's/__version__ = "\(.*\)"/\1/p' psydac/version.py) | ||
| CURRENT_VERSION=$(grep 'version *= *"\([0-9\.]*\)"' pyproject.toml | grep '[0-9\.]*' -o) | ||
| TEST_VERSION=${CURRENT_VERSION}.dev$(date +%Y%m%d%H%M%S) | ||
| sed -i.bak "s/${CURRENT_VERSION}/${TEST_VERSION}/g" psydac/version.py && rm psydac/version.py.bak | ||
| sed -i.bak "s/\"${CURRENT_VERSION}\"/\"${TEST_VERSION}\"/g" pyproject.toml && rm pyproject.toml.bak | ||
| echo "TEST_VERSION=${TEST_VERSION}" >> $GITHUB_ENV | ||
| # Setup dummy user to save temp version for meson | ||
| git config --global user.email "[email protected]" | ||
| git config --global user.name "Your Name" | ||
| git commit -m "Save temp version" pyproject.toml | ||
| python -m build --sdist | ||
| ls dist/* | ||
| twine check --strict dist/* | ||
|
|
||
This file contains hidden or 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,3 +1,3 @@ | ||
| [submodule "external/igakit"] | ||
| path = external/igakit | ||
| [submodule "subprojects/igakit"] | ||
| path = subprojects/igakit | ||
| url = https://github.com/dalcinl/igakit/ |
This file contains hidden or 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,47 @@ | ||
| project( | ||
| 'psydac', | ||
| 'c', 'fortran', | ||
| meson_version: '>=1.1.0', | ||
| ) | ||
|
|
||
| run_command('pyccel', 'make', '-g', 'psydac/**/*_kernels.py', '--convert-only', | ||
| check: true) | ||
|
|
||
| find = find_program('find', required: true) | ||
|
|
||
| pyccel_meson_math_file = run_command(find, '__pyccel__/math', '-name', 'meson.build', | ||
| check: true).stdout().strip() | ||
| pyccel_meson_cwrapper_file = run_command(find, '__pyccel__/cwrapper', '-name', 'meson.build', | ||
| check: true).stdout().strip() | ||
| pyccel_meson_files = run_command(find, '__pyccel__/psydac', '-name', 'meson.build', | ||
| check: true).stdout().split() | ||
|
|
||
| sed = find_program('sed', required: true) | ||
|
|
||
| run_command(sed, '-i.swp', 's/install: true//g', pyccel_meson_math_file, pyccel_meson_cwrapper_file, | ||
| check: true) | ||
|
|
||
| foreach f : pyccel_meson_files | ||
| f_parts = f.split('/') | ||
| rel_f = f_parts.get(1) | ||
| foreach i : range(2, f_parts.length()-1) | ||
| rel_f = rel_f / f_parts.get(i) | ||
| endforeach | ||
| run_command(sed, '-i.swp', 's/install_dir: .*/subdir: \'' + rel_f.replace('/','\/') + '\',/g', f, | ||
| check: true) | ||
| endforeach | ||
|
|
||
|
|
||
| igakit_proj = subproject('igakit') | ||
|
|
||
| py = import('python').find_installation(modules: ['numpy'], pure: false) | ||
|
|
||
| subdir('__pyccel__/math') | ||
| subdir('__pyccel__/cwrapper') | ||
| subdir('__pyccel__/psydac') | ||
|
|
||
| # Install the pure-Python package itself | ||
| install_subdir('psydac', install_dir: py.get_install_dir()) | ||
| install_subdir('mesh', install_dir: py.get_install_dir()) | ||
|
|
||
|
|
||
This file contains hidden or 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 hidden or 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,14 +1,14 @@ | ||
| [build-system] | ||
| requires = ["setuptools >= 64.0, != 67.2.0", "wheel", "numpy", "pyccel >= 2.1.0"] | ||
| build-backend = "setuptools.build_meta" | ||
| requires = ["meson-python", "wheel", "numpy", "pyccel >= 2.1.0"] | ||
| build-backend = "mesonpy" | ||
|
|
||
| [project] | ||
| name = "psydac" | ||
| description = "Python package for isogeometric analysis (IGA)" | ||
| dynamic = ["version"] | ||
| readme = "README.md" | ||
| license = "MIT" | ||
| license-files = ["LICENSE", "AUTHORS"] | ||
| version = "0.1" | ||
yguclu marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| requires-python = ">= 3.10" | ||
| authors = [ | ||
| {name = "PSYDAC development team", email = "[email protected]"} | ||
|
|
@@ -51,9 +51,6 @@ dependencies = [ | |
| # When pyccel is run in parallel with MPI, it uses tblib to pickle | ||
| # tracebacks, which allows mpi4py to broadcast exceptions | ||
| 'tblib', | ||
|
|
||
| # IGAKIT - not on PyPI | ||
| 'igakit @ https://github.com/dalcinl/igakit/archive/refs/heads/master.zip' | ||
| ] | ||
|
|
||
| [project.optional-dependencies] | ||
|
|
@@ -73,13 +70,10 @@ Repository = "https://github.com/pyccel/psydac.git" | |
| psydac-mesh = "psydac.cmd.mesh:main" | ||
| psydac-accelerate = "psydac.cmd.accelerate:main" | ||
|
|
||
| [tool.setuptools.packages.find] | ||
| include = ["psydac*"] | ||
| exclude = ["*__psydac__*"] | ||
| namespaces = false | ||
|
|
||
| [tool.setuptools.package-data] | ||
| "*" = ["*.txt", "**/tests/data/*.png"] | ||
| [tool.meson-python.args] | ||
| setup=['-Ddefault_library=static'] | ||
| dist=['--include-subprojects'] | ||
| install=['--only=python-modules'] | ||
|
|
||
| [tool.coverage.run] | ||
| branch = true | ||
|
|
||
Submodule igakit
updated
from 000000 to 8f8a64
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this line to ship without bundling igakit