diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index b5ba60447..02070ea06 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 diff --git a/RELEASE.rst b/RELEASE.rst index 67963e3b0..fa70c32d7 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/docs/conf.py b/docs/conf.py index bca8ed0a1..dd9db9203 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', diff --git a/meson.build b/meson.build index 827e03166..e48cdb4ee 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 b0ed1eac6..92ac0dbeb 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 eaa4380e4..6121d8888 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',