Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assorted cleanups around recording the version number #691

Merged
merged 3 commits into from
Oct 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -16,10 +20,6 @@ on:
- docs/**
- CHANGELOG.rst
- README.md
workflow_dispatch:
inputs:
tag:
required: true

jobs:

Expand All @@ -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
2 changes: 1 addition & 1 deletion RELEASE.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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``

Expand Down
6 changes: 1 addition & 5 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: MIT

project('meson-python', version: '0.18.0.dev0')
project('meson-python')

py = import('python').find_installation()

Expand Down
3 changes: 0 additions & 3 deletions mesonpy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
5 changes: 1 addition & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -40,10 +41,6 @@ dependencies = [
'tomli >= 1.0.0; python_version < "3.11"',
]

dynamic = [
'version',
]

[project.optional-dependencies]
test = [
'build',
Expand Down
Loading