]> git.scottworley.com Git - pinch/commitdiff
Keep the version in one place
authorScott Worley <scottworley@scottworley.com>
Mon, 4 May 2026 06:06:24 +0000 (23:06 -0700)
committerScott Worley <scottworley@scottworley.com>
Mon, 4 May 2026 06:06:24 +0000 (23:06 -0700)
default.nix
setup.py
version.py [new file with mode: 0644]

index 0eac54594dd222b19d8b5123d05c7c84f54c2ca6..2db319a90c75b122a88c1de16797ad9ff51446a7 100644 (file)
@@ -48,7 +48,7 @@ pkgs.python3Packages.callPackage
     }:
     buildPythonPackage rec {
       pname = "pinch";
-      version = "3.3.3-pre";
+      version = (builtins.fromTOML (lib.fileContents ./version.py)).pinch_version;
       src = lib.cleanSource ./.;
       pyproject = true;
       build-system = [ setuptools ];
index 8dbf88fb679ec27f5594af4833f9587e871ea3c0..b2a8c6d942be1402df8acbd41a379241d2db18f8 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -1,13 +1,14 @@
 from setuptools import setup
+from version import pinch_version
 
 setup(
     name='pinch',
-    version='3.3.3-pre',
+    version=pinch_version,
     description='PIN CHannels - a replacement for `nix-channel --update`',
     author="Scott Worley",
     author_email="scottworley@scottworley.com",
     url="https://git.scottworley.com/pinch",
-    py_modules=['pinch'],
+    py_modules=['pinch', 'version'],
     license="GPL-3.0",
     entry_points={'console_scripts': ['pinch = pinch:main']},
     dependency_links=['https://scottworley.com/git/git-cache'],
diff --git a/version.py b/version.py
new file mode 100644 (file)
index 0000000..b9efbd5
--- /dev/null
@@ -0,0 +1 @@
+pinch_version = '3.3.3-pre'