From: Scott Worley Date: Mon, 4 May 2026 06:06:24 +0000 (-0700) Subject: Keep the version in one place X-Git-Tag: v3.3.3~2 X-Git-Url: http://git.scottworley.com/pinch/commitdiff_plain/d99802b4a073c7d02c70205a144bca87723bf73a?ds=inline Keep the version in one place --- diff --git a/default.nix b/default.nix index 0eac545..2db319a 100644 --- a/default.nix +++ b/default.nix @@ -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 ]; diff --git a/setup.py b/setup.py index 8dbf88f..b2a8c6d 100644 --- 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 index 0000000..b9efbd5 --- /dev/null +++ b/version.py @@ -0,0 +1 @@ +pinch_version = '3.3.3-pre'