Skip to content

Commit 77d8c90

Browse files
authored
Remove setuptools-scm again (#549)
* Use dynamic version * Remove changes to workflow * Use checkout v4 * Use checkout v4 * Restore version in apispec
1 parent f60c482 commit 77d8c90

File tree

7 files changed

+25
-15
lines changed

7 files changed

+25
-15
lines changed

.github/workflows/image.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ jobs:
1616
steps:
1717
- name: checkout code
1818
uses: actions/checkout@v4
19-
with:
20-
fetch-depth: 0
2119
- name: Set up QEMU
2220
uses: docker/setup-qemu-action@v1
2321
- name: Set up Docker Buildx
@@ -34,14 +32,12 @@ jobs:
3432
- name: tag and push devel image
3533
run: |
3634
docker build --push \
37-
--build-arg BUILDKIT_CONTEXT_KEEP_GIT_DIR=1 \
3835
--tag dmstraub/gramps-webapi:latest-devel \
3936
--platform linux/amd64,linux/arm/v7,linux/arm64 .
4037
- name: tag and push release image
4138
if: github.event_name == 'release'
4239
run: |
4340
docker build --push \
44-
--build-arg BUILDKIT_CONTEXT_KEEP_GIT_DIR=1 \
4541
--tag dmstraub/gramps-webapi:${{ github.event.release.tag_name }} \
4642
--tag dmstraub/gramps-webapi:latest \
4743
--platform linux/amd64,linux/arm/v7,linux/arm64 .

.github/workflows/pypi.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
python-version: [3.9]
1313

1414
steps:
15-
- uses: actions/checkout@v2
15+
- uses: actions/checkout@v4
1616
- name: Set up Python ${{ matrix.python-version }}
1717
uses: actions/setup-python@v2
1818
with:

.github/workflows/swagger.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: Checkout
13-
uses: actions/checkout@v2
13+
uses: actions/checkout@v4
1414
- name: move
1515
run: mv gramps_webapi/data/apispec.yaml apispec.yaml
1616
- name: Generate Swagger UI

.gitignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,3 @@ dmypy.json
144144

145145
# Pyre type checker
146146
.pyre/
147-
148-
# Generated by setuptools_scm, should be ignored by VCS
149-
gramps_webapi/_version.py

gramps_webapi/_version.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#
2+
# Gramps Web API - A RESTful API for the Gramps genealogy program
3+
#
4+
# Copyright (C) 2024 David Straub
5+
#
6+
# This program is free software; you can redistribute it and/or modify
7+
# it under the terms of the GNU Affero General Public License as published by
8+
# the Free Software Foundation; either version 3 of the License, or
9+
# (at your option) any later version.
10+
#
11+
# This program is distributed in the hope that it will be useful,
12+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
# GNU Affero General Public License for more details.
15+
#
16+
# You should have received a copy of the GNU Affero General Public License
17+
# along with this program. If not, see <https://www.gnu.org/licenses/>.
18+
#
19+
20+
__version__ = "2.4.2"

gramps_webapi/data/apispec.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
swagger: "2.0"
22
info:
33
title: "Gramps Web API"
4+
version: "2.4.2"
45
description: >
56
The Gramps Web API is a REST API that provides access to family tree databases generated and maintained with Gramps, a popular Open Source genealogical research software package.
67

pyproject.toml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,19 +46,15 @@ dependencies = [
4646
homepage = "https://github.com/gramps-project/gramps-web-api"
4747
repository = "https://github.com/gramps-project/gramps-web-api"
4848

49-
5049
[build-system]
5150
requires = ["setuptools>=64.0", "setuptools_scm[toml]>=6.2", "wheel"]
5251
build-backend = "setuptools.build_meta"
5352

5453
[tool.isort]
5554
profile = "black"
5655

57-
[tool.setuptools_scm]
58-
# NOTE: Using a version file avoids some overhead
59-
#
60-
# This file is explicitly ignored by version control.
61-
write_to = "gramps_webapi/_version.py"
56+
[tool.setuptools.dynamic]
57+
version = {attr = "gramps_webapi.__version__"}
6258

6359
[tool.setuptools.packages.find]
6460
include = ["gramps_webapi", "gramps_webapi.*"]

0 commit comments

Comments
 (0)