From 22c999af644ce488c4e3332cc597c9c97c9a84c0 Mon Sep 17 00:00:00 2001
From: Marcel Loose <loose@astron.nl>
Date: Wed, 23 Nov 2022 16:17:27 +0100
Subject: [PATCH] Integrate setuptools_scm

Integrated automatic version information generation using `setuptools_scm` in `pyproject.toml` file.
Since the example package doesn't contain any source files, it's currently a bit hard to test if versioning works correctly.
---
 .gitignore     |  3 +++
 pyproject.toml | 14 ++++++++++++--
 2 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/.gitignore b/.gitignore
index 4af2633..ac8dd20 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,6 +6,9 @@ dist/*
 coverage.xml
 htmlcov/*
 
+# Setuptools SCM
+map/_version.py
+
 # IDE configuration
 .vscode
 .idea
diff --git a/pyproject.toml b/pyproject.toml
index 3588ce5..f2bcff2 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,3 +1,13 @@
 [build-system]
-requires = ['setuptools>=42', 'wheel']
-build-backend = 'setuptools.build_meta'
+requires = [
+    "setuptools>=45",
+    "setuptools_scm[toml]>=6.2",
+    "wheel"
+]
+build-backend = "setuptools.build_meta"
+
+[tool.setuptools_scm]
+write_to = "map/_version.py"
+
+[tool.pylint]
+ignore = "_version.py"
-- 
GitLab