From cba874abfddc11abfa84d8f57e5a7238227c38a5 Mon Sep 17 00:00:00 2001 From: Daniele Nicolodi Date: Mon, 21 Oct 2024 19:53:29 +0200 Subject: [PATCH 1/3] DOC: do not show version number --- docs/conf.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index bca8ed0a..dd9db920 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -7,18 +7,14 @@ import time import sys -sys.path.insert(0, os.path.abspath('..')) -import mesonpy - _build_time = int(os.environ.get('SOURCE_DATE_EPOCH', time.time())) _build_date = datetime.datetime.fromtimestamp(_build_time, tz=datetime.timezone.utc) project = 'meson-python' -version = release = mesonpy.__version__ copyright = f'2021\N{EN DASH}{_build_date.year} The meson-python developers' html_theme = 'furo' -html_title = f'meson-python {version}' +html_title = f'meson-python' extensions = [ 'sphinx_copybutton', From 2f98198c43f84baba04fd7bf9b1b797d34747a45 Mon Sep 17 00:00:00 2001 From: Daniele Nicolodi Date: Mon, 21 Oct 2024 19:55:41 +0200 Subject: [PATCH 2/3] MAINT: keep version number only in pyproject.toml mesonpy is not supposed to be used as a library, thus having the version number in the __version__ attribute is not that useful. Keeping the version number in only one place makes it impossible to fail to keep the version number in sync. Having the version number in pyproject.toml along the other metadata is the most obvious thing. --- RELEASE.rst | 2 +- meson.build | 2 +- mesonpy/__init__.py | 3 --- pyproject.toml | 5 +---- 4 files changed, 3 insertions(+), 9 deletions(-) diff --git a/RELEASE.rst b/RELEASE.rst index 67963e3b..fa70c32d 100644 --- a/RELEASE.rst +++ b/RELEASE.rst @@ -19,7 +19,7 @@ After that is done, you may release the project by following these steps: #. Create the release commit - #. Bump the versions in ``meson.build`` and ``mesonpy/__init__.py``. + #. Bump the versions in ``pyproject.toml``. #. Create ``CHANGELOG.rst`` section for the new release and fill it. #. The commit message should read: ``REL: set version to X.Y.Z`` diff --git a/meson.build b/meson.build index 827e0316..e48cdb4e 100644 --- a/meson.build +++ b/meson.build @@ -2,7 +2,7 @@ # # SPDX-License-Identifier: MIT -project('meson-python', version: '0.18.0.dev0') +project('meson-python') py = import('python').find_installation() diff --git a/mesonpy/__init__.py b/mesonpy/__init__.py index b0ed1eac..92ac0dbe 100644 --- a/mesonpy/__init__.py +++ b/mesonpy/__init__.py @@ -65,9 +65,6 @@ MesonArgs = Mapping[MesonArgsKeys, List[str]] -__version__ = '0.18.0.dev0' - - _NINJA_REQUIRED_VERSION = '1.8.2' _MESON_REQUIRED_VERSION = '0.63.3' # keep in sync with the version requirement in pyproject.toml diff --git a/pyproject.toml b/pyproject.toml index eaa4380e..6121d888 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,6 +15,7 @@ requires = [ [project] name = 'meson-python' +version = '0.18.0.dev0' description = 'Meson Python build backend (PEP 517)' readme = 'README.rst' requires-python = '>= 3.7' @@ -40,10 +41,6 @@ dependencies = [ 'tomli >= 1.0.0; python_version < "3.11"', ] -dynamic = [ - 'version', -] - [project.optional-dependencies] test = [ 'build', From 0d521aa4fe9e94df62308d2dcfc7ab9fa86009b0 Mon Sep 17 00:00:00 2001 From: Daniele Nicolodi Date: Mon, 21 Oct 2024 20:05:34 +0200 Subject: [PATCH 3/3] DOC: publish documentation at every push to the main branch --- .github/workflows/docs.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index b5ba6044..02070ea0 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -6,8 +6,12 @@ name: docs on: push: - tags: - - '[0-9]+.[0-9]+.[0-9]+' + branches: + - main + paths: + - docs/** + - CHANGELOG.rst + - README.md pull_request: branches: - main @@ -16,10 +20,6 @@ on: - docs/** - CHANGELOG.rst - README.md - workflow_dispatch: - inputs: - tag: - required: true jobs: @@ -46,6 +46,6 @@ jobs: environment: name: github-pages runs-on: ubuntu-latest - if: ${{ github.event_name == 'workflow_dispatch' || github.ref_type == 'tag' }} + if: ${{ github.ref == 'refs/heads/main' }} steps: - uses: actions/deploy-pages@v4