From 96c30b065b82907350e61730d5f7b18741fe00f3 Mon Sep 17 00:00:00 2001 From: Joel Davies Date: Tue, 17 Jan 2023 12:27:01 +0000 Subject: [PATCH 1/3] Add minimal pyproject.toml --- pyproject.toml | 6 ++++++ setup.py | 8 +++++--- 2 files changed, 11 insertions(+), 3 deletions(-) create mode 100644 pyproject.toml diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..f8d8975 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,6 @@ +[build-system] +requires = [ + "setuptools", + "wheel" +] +build-backend = "setuptools.build_meta" \ No newline at end of file diff --git a/setup.py b/setup.py index 9003cc0..8c1d41a 100644 --- a/setup.py +++ b/setup.py @@ -1,8 +1,6 @@ import pathlib from setuptools import setup, find_packages -from pymuonsuite import __version__ - this_dir = pathlib.Path(__file__).parent readme_text = (this_dir / "README.md").read_text() @@ -25,9 +23,13 @@ os.path.join("data/dftb_pars/", "*"), ] + version = {} + with open("pymuonsuite/__init__.py", encoding="utf-8") as fp: + exec(fp.read(), version) # pylint: disable=exec-used + setup( name="PyMuonSuite", - version=__version__, + version=version["__version__"], description=("A suite of utilities for muon spectroscopy"), long_description=readme_text, long_description_content_type="text/markdown", From 8d4d7b424c05e0caa8f76eab920bd0e546fc394d Mon Sep 17 00:00:00 2001 From: Joel Davies Date: Tue, 17 Jan 2023 12:29:59 +0000 Subject: [PATCH 2/3] Add build action --- .github/workflows/build.yaml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/build.yaml diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 0000000..46e36db --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,24 @@ +name: Build pip wheels + +on: + push: + branches: + - main + - add-build-action-#75 + +jobs: + build_wheels: + name: Build wheels on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest] + steps: + - uses: actions/checkout@v3 + - name: Build source distribution and wheel + run: | + python -m pip install build + python -m build + - uses: actions/upload-artifact@v3 + with: + path: dist/* \ No newline at end of file From 2e2ca87c758e6f316258c415add0deb421e0fd01 Mon Sep 17 00:00:00 2001 From: Joel Davies Date: Tue, 17 Jan 2023 12:41:41 +0000 Subject: [PATCH 3/3] Remove branch as trigger after testing --- .github/workflows/build.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 46e36db..e6598c3 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -4,7 +4,6 @@ on: push: branches: - main - - add-build-action-#75 jobs: build_wheels: