Skip to content

Commit 9702e4d

Browse files
authored
Merge pull request #21 from fortran-lang/feat/use-setuptools-scm
feat: add setuptools-scm for automatic release versioning
2 parents cbf27bc + e82f801 commit 9702e4d

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,4 @@ _skbuild/
2020

2121
.coverage
2222
coverage.xml
23+
src/fpm/_version.py

README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,14 @@ The wheels are generated for the following platforms:
2323
[`fpm`](https://github.com/fortran-lang/fpm.git),
2424
[`toml-f`](https://github.com/toml-f/toml-f.git) and
2525
[`M_CLI2`](https://github.com/urbanjost/M_CLI2.git)
26-
2. Update the version number in `pyproject.toml`
27-
3. Update the `docs/README.md` with the README file of the fpm project
28-
4. Update the paths and flags in `pyproject.toml`'s
26+
2. Update the `docs/README.md` with the README file of the fpm project
27+
3. Update the paths and flags in `pyproject.toml`'s
2928
`[tool.cibuildwheel.overrides.environment]` table for `FC` and `LDFLAGS`
3029
to match those printed by `tools/wheels/cibw_before_build_macos.sh` when
3130
run on a GitHub runner.
32-
5. Commit the changes via a pull-request to `main` and ask one of the admins
31+
4. Commit the changes via a pull-request to `main` and ask one of the admins
3332
to merge it.
34-
6. Admins: Issue a new release on GitHub with the same version number as
33+
5. Admins: Issue a new release on GitHub with the same version number as
3534
in `pyproject.toml` using the prefix `v` e.g. `v0.1.0`.
3635

3736
## Development Instructions

pyproject.toml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ requires = [
44
"scikit-build>=0.16.7",
55
"cmake>=3.20.0",
66
"ninja",
7+
"setuptools_scm>=8",
78
]
89
build-backend = "setuptools.build_meta"
910

1011
[project]
1112
name = "fpm"
12-
version = "0.10.0"
1313
license = { text = "MIT License" }
1414
authors = [{ name = "fpm maintainers" }]
1515
requires-python = ">=3.7"
@@ -27,13 +27,16 @@ classifiers = [
2727
"Topic :: Software Development :: Pre-processors",
2828
"Topic :: Utilities",
2929
]
30-
dynamic = ["entry-points", "scripts"]
30+
dynamic = ["version", "entry-points", "scripts"]
3131

3232
[project.urls]
3333
homepage = "https://fpm.fortran-lang.org"
3434
source-code = "https://github.com/fortran-lang/fpm"
3535
bug-tracker = "https://github.com/fortran-lang/fpm/issues"
3636

37+
[tool.setuptools_scm]
38+
write_to = "src/fpm/_version.py"
39+
3740
[tool.cibuildwheel]
3841
build = "cp310-*"
3942
build-verbosity = "3"

0 commit comments

Comments
 (0)