From 8737b8d1f7727fa145fd858425e6552692a3b753 Mon Sep 17 00:00:00 2001 From: yuqi Date: Mon, 30 May 2022 12:37:51 +0000 Subject: [PATCH] fix pkg version --- setup.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index a03590f..468a2f1 100644 --- a/setup.py +++ b/setup.py @@ -1,5 +1,13 @@ from __future__ import annotations +import io +import re + from setuptools import setup +with io.open("src/platformdirs/version.py", "rt", encoding="utf8") as f: + version = re.search(r'''__version__ = ['"]([0-9.]+)['"]''', f.read()).group(1) -setup() +setup( + name="platformdirs", + version=version, + ) -- 2.33.0