diff --git a/.github/workflows/publish-to-pypi.yml b/.github/workflows/publish-to-pypi.yml index 23acc36..65fec36 100644 --- a/.github/workflows/publish-to-pypi.yml +++ b/.github/workflows/publish-to-pypi.yml @@ -2,32 +2,27 @@ name: Publish to PyPI on: push: - tags: - - '[0-9]+.[0-9]+.[0-9]+' - - '[0-9]+.[0-9]+.[0-9]+rc[0-9]+' + branches: [ unstable] + # 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:${{github.ref_name}} + # image: flatironinstitute/triqs:${{github.ref_name}} + image: flatironinstitute/triqs:latest steps: - uses: actions/checkout@v4 - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: "3.x" - name: Install pypa/build - run: >- - python3 -m - pip install - build toml - --user + run: | + pip3 install --user build toml --break-system-packages - name: prepare python distribution run: | - mkdir build && cd build + mkdir build && cd build cmake ../ cp packaging/pypi/* ../ mv python/triqs_maxent/version.py ../python/triqs_maxent/version.py diff --git a/packaging/CMakeLists.txt b/packaging/CMakeLists.txt index 70981c2..a1fbb10 100644 --- a/packaging/CMakeLists.txt +++ b/packaging/CMakeLists.txt @@ -2,6 +2,8 @@ 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-triqs_maxent-foss-2021b.eb.in TRIQS-triqs_maxent-foss-2021b.eb) diff --git a/packaging/pypi/MANIFEST.in b/packaging/pypi/MANIFEST.in new file mode 100644 index 0000000..2cad09e --- /dev/null +++ b/packaging/pypi/MANIFEST.in @@ -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 diff --git a/packaging/pypi/pyproject.toml.in b/packaging/pypi/pyproject.toml.in new file mode 100644 index 0000000..879939f --- /dev/null +++ b/packaging/pypi/pyproject.toml.in @@ -0,0 +1,36 @@ +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" + +[tool.setuptools.packages.find] +where = ["python"] + +[project] +name = "triqs_maxent" +version = "@PROJECT_VERSION@" +authors = [ + { name="TRIQS", email="triqs@flatironinstitute.org" } +] +description = "TRIQS application providing a modular Maximum Entropy progra to perform analytic continuation based on the TRIQS library (triqs.github.io)" +readme = "README.md" +keywords = ["triqs", "analytic-continuation", "maximum-entropy"] +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", + "matplotlib" +] + +[project.urls] +"Homepage" = "https://triqs.github.io/maxent" +"Bug Tracker" = "https://github.com/triqs/maxent/issues" + +# in case you want an executable hook of your app +# [project.scripts] +# solid_dmft = "solid_dmft.main:main" +