Skip to content

Commit 08b4045

Browse files
committed
[build] finalize pypi publishing workflow
1 parent cccbf97 commit 08b4045

File tree

4 files changed

+58
-13
lines changed

4 files changed

+58
-13
lines changed

.github/workflows/publish-to-pypi.yml

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@ name: Publish to PyPI
22

33
on:
44
push:
5-
tags:
6-
- '[0-9]+.[0-9]+.[0-9]+'
7-
- '[0-9]+.[0-9]+.[0-9]+rc[0-9]+'
5+
branches: [ unstable]
6+
# tags:
7+
# - '[0-9]+.[0-9]+.[0-9]+'
8+
# - '[0-9]+.[0-9]+.[0-9]+rc[0-9]+'
89

910
jobs:
1011
build:
@@ -15,19 +16,12 @@ jobs:
1516

1617
steps:
1718
- uses: actions/checkout@v4
18-
- name: Set up Python
19-
uses: actions/setup-python@v4
20-
with:
21-
python-version: "3.x"
2219
- name: Install pypa/build
23-
run: >-
24-
python3 -m
25-
pip install
26-
build toml
27-
--user
20+
run: |
21+
pip3 install --user build toml --break-system-packages
2822
- name: prepare python distribution
2923
run: |
30-
mkdir build && cd build
24+
mkdir build && cd build
3125
cmake ../
3226
cp packaging/pypi/* ../
3327
mv python/triqs_maxent/version.py ../python/triqs_maxent/version.py

packaging/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
configure_file(conda/meta.yaml.in conda/meta.yaml)
33
configure_file(conda/build.sh conda/build.sh COPYONLY)
44
configure_file(conda/conda_build_config.yaml conda/conda_build_config.yaml COPYONLY)
5+
configure_file(pypi/MANIFEST.in pypi/MANIFEST.in COPYONLY)
6+
configure_file(pypi/pyproject.toml.in pypi/pyproject.toml)
57
configure_file(TRIQS-triqs_maxent-foss-2021b.eb.in TRIQS-triqs_maxent-foss-2021b.eb)
68

79

packaging/pypi/MANIFEST.in

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
prune test
2+
prune .git
3+
prune .github
4+
prune doc
5+
prune share
6+
prune Docker
7+
prune deps
8+
prune packaging
9+
prune paper
10+
prune bin
11+
prune build
12+
13+
global-exclude .clang-format .clang-tidy .dockerignore .gitignore CMakeLists.txt Jenkinsfile

packaging/pypi/pyproject.toml.in

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
[build-system]
2+
requires = ["setuptools"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[tool.setuptools.packages.find]
6+
where = ["python"]
7+
8+
[project]
9+
name = "triqs_maxent"
10+
version = "@PROJECT_VERSION@"
11+
authors = [
12+
{ name="TRIQS", email="triqs@flatironinstitute.org" }
13+
]
14+
description = "TRIQS application providing a modular Maximum Entropy progra to perform analytic continuation based on the TRIQS library (triqs.github.io)"
15+
readme = "README.md"
16+
keywords = ["triqs", "analytic-continuation", "maximum-entropy"]
17+
requires-python = ">=3.7"
18+
classifiers = [
19+
"Programming Language :: Python :: 3",
20+
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
21+
"Operating System :: OS Independent",
22+
]
23+
dependencies = [
24+
"numpy",
25+
"scipy",
26+
"matplotlib"
27+
]
28+
29+
[project.urls]
30+
"Homepage" = "https://triqs.github.io/maxent"
31+
"Bug Tracker" = "https://github.com/triqs/maxent/issues"
32+
33+
# in case you want an executable hook of your app
34+
# [project.scripts]
35+
# solid_dmft = "solid_dmft.main:main"
36+

0 commit comments

Comments
 (0)