-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[build] add auto pypi package build & bump ver to 3.2.1
- Loading branch information
1 parent
0719f7b
commit a545b9d
Showing
8 changed files
with
190 additions
and
2 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,65 @@ | ||
name: PyPI | ||
|
||
on: | ||
push: | ||
tags: | ||
- '[0-9]+.[0-9]+.[0-9]+' | ||
- '[0-9]+.[0-9]+.[0-9]+rc[0-9]+' | ||
|
||
jobs: | ||
build: | ||
name: Build distribution 📦 | ||
runs-on: ubuntu-latest | ||
container: # we have to provide a working triqs installation to make the cmake step work | ||
image: flatironinstitute/triqs:latest | ||
options: --user root | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.x" | ||
- name: Install pypa/build | ||
run: >- | ||
python3 -m | ||
pip install | ||
build toml | ||
--user | ||
- name: prepare python distribution | ||
run: | | ||
git config --global --add safe.directory ${GITHUB_WORKSPACE} | ||
cmake -S . -B build/ | ||
cp build/packaging/pypi/* ./ | ||
mv build/python/triqs_hubbardI/version.py ./python/triqs_hubbardI/version.py | ||
rm ./python/triqs_hubbardI/version.py.in | ||
- name: Build a binary wheel and a source tarball | ||
run: python3 -m build | ||
- name: Store the distribution packages | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: python-package-distributions | ||
path: dist/ | ||
|
||
publish-to-pypi: | ||
name: Publish PyPI 🐍 | ||
needs: | ||
- build | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: pypi | ||
url: https://pypi.org/p/hubbardI | ||
permissions: | ||
id-token: write # IMPORTANT: mandatory for trusted publishing | ||
|
||
steps: | ||
- name: Download all the dists | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: python-package-distributions | ||
path: dist/ | ||
- name: Publish distribution 📦 to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
skip-existing: true # skip if version name package already exists on pypi | ||
|
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,9 @@ | ||
# Configure the version of packaging files | ||
configure_file(conda/meta.yaml.in conda/meta.yaml) | ||
configure_file(conda/build.sh conda/build.sh COPYONLY) | ||
configure_file(conda/conda_build_config.yaml conda/conda_build_config.yaml COPYONLY) | ||
configure_file(pypi/MANIFEST.in pypi/MANIFEST.in COPYONLY) | ||
configure_file(pypi/pyproject.toml.in pypi/pyproject.toml) | ||
configure_file(TRIQS-hubbardI-foss-2021b.eb.in TRIQS-hubbardI-foss-2021b.eb) | ||
|
||
|
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,58 @@ | ||
easyblock = 'CMakeMake' | ||
|
||
name = 'TRIQS-hubbardI' | ||
version = '@PROJECT_VERSION@' | ||
|
||
homepage = 'https://triqs.github.io/hubbardI/' | ||
description = """ | ||
Hubbard-I impurity solver based on the TRIQS library | ||
""" | ||
|
||
docurls = ['https://triqs.github.io/hubbardI/%(version_major_minor)s.x/'] | ||
software_license = 'LicenseGPLv3' | ||
|
||
toolchain = {'name': 'foss', 'version': '2021b'} | ||
toolchainopts = {'pic': True, 'usempi': True} | ||
|
||
source_urls = ['https://github.com/TRIQS/hubbardI/releases/download/%(version)s/'] | ||
sources = ['hubbardI-%(version)s.tar.gz'] | ||
checksums = ['PUT HERE THE SHA256 OF THE RELEASE TARBALL'] | ||
|
||
dependencies = [ | ||
('Python', '3.9.6'), | ||
('SciPy-bundle', '2021.10'), | ||
('Boost', '1.77.0'), | ||
('Clang', '13.0.1'), | ||
('Clang-Python-bindings', '13.0.1'), | ||
('GMP', '6.2.1'), | ||
('HDF5', '1.10.7'), | ||
('Mako', '1.1.4'), | ||
('TRIQS', '3.2.0'), | ||
('NFFT', '3.5.2') | ||
] | ||
|
||
builddependencies = [ | ||
('CMake', '3.22.1') | ||
] | ||
|
||
separate_build_dir = True | ||
|
||
runtest = 'test' | ||
|
||
sanity_check_paths = { | ||
'dirs': ['lib', 'share', | ||
'lib/python%(pyshortver)s/site-packages/triqs_hubbardI'], | ||
} | ||
|
||
sanity_check_commands = ["python -c 'import triqs_hubbardI'"] | ||
|
||
modextrapaths = { | ||
'PYTHONPATH': 'lib/python%(pyshortver)s/site-packages/triqs_hubbardI', | ||
'CMAKE_PREFIX_PATH': 'lib/cmake/hubbardI', | ||
} | ||
modextravars = { | ||
'HUBBARDI_ROOT': '%(installdir)s', | ||
'HUBBARDI_VERSION': '%(version)s', | ||
} | ||
|
||
moduleclass = 'phys' |
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,4 +1,4 @@ | ||
{% set version = "3.1.0" %} | ||
{% set version = "@PROJECT_VERSION@" %} | ||
|
||
package: | ||
name: hubbardI | ||
|
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,13 @@ | ||
prune test | ||
prune .git | ||
prune .github | ||
prune doc | ||
prune share | ||
prune Docker | ||
prune deps | ||
prune packaging | ||
prune paper | ||
prune bin | ||
prune build | ||
|
||
global-exclude .clang-format .clang-tidy .dockerignore .gitignore CMakeLists.txt Jenkinsfile |
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,35 @@ | ||
[build-system] | ||
requires = ["setuptools"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[tool.setuptools.packages.find] | ||
where = ["python"] | ||
|
||
[project] | ||
name = "hubbardI" | ||
version = "@PROJECT_VERSION@" | ||
authors = [ | ||
{ name="TRIQS", email="[email protected]" } | ||
] | ||
description = "Hubbard-I impurity solver based on the TRIQS library" | ||
readme = "README.md" | ||
keywords = ["triqs", "hhubbard-I", "impurity solver", "dmft"] | ||
requires-python = ">=3.7" | ||
classifiers = [ | ||
"Programming Language :: Python :: 3", | ||
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)", | ||
"Operating System :: OS Independent", | ||
] | ||
dependencies = [ | ||
"numpy", | ||
"scipy" | ||
] | ||
|
||
[project.urls] | ||
"Homepage" = "https://triqs.github.io/hartree_fock" | ||
"Bug Tracker" = "https://github.com/triqs/hartree_fock/issues" | ||
|
||
# in case you want an executable hook of your app | ||
# [project.scripts] | ||
# solid_dmft = "solid_dmft.main:main" | ||
|