python-platformdirs/0001-fix-pkg-version.patch

32 lines
707 B
Diff
Raw Normal View History

2022-06-02 02:50:21 +00:00
From 8737b8d1f7727fa145fd858425e6552692a3b753 Mon Sep 17 00:00:00 2001
From: yuqi <yuqi@isrc.iscas.ac.cn>
Date: Mon, 30 May 2022 12:37:51 +0000
2022-04-27 11:04:27 +08:00
Subject: [PATCH] fix pkg version
---
setup.py | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/setup.py b/setup.py
2022-06-02 02:50:21 +00:00
index a03590f..468a2f1 100644
2022-04-27 11:04:27 +08:00
--- a/setup.py
+++ b/setup.py
2022-06-02 02:50:21 +00:00
@@ -1,5 +1,13 @@
from __future__ import annotations
2022-04-27 11:04:27 +08:00
+import io
+import re
+
2022-06-02 02:50:21 +00:00
2022-04-27 11:04:27 +08:00
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,
+ )
--
2022-06-02 02:50:21 +00:00
2.33.0
2022-04-27 11:04:27 +08:00