File: remove-versioningit.patch

package info (click to toggle)
python-isal 1.7.2-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 3,796 kB
  • sloc: python: 3,190; ansic: 2,952; makefile: 17
file content (34 lines) | stat: -rw-r--r-- 1,018 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,5 +1,5 @@
 [build-system]
-requires = ["setuptools>=64", "versioningit>=1.1.0"]
+requires = ["setuptools>=64"]
 build-backend = "setuptools.build_meta"
 
 [tool.versioningit.vcs]
--- a/setup.py
+++ b/setup.py
@@ -18,7 +18,12 @@
 from setuptools import Extension, find_packages, setup
 from setuptools.command.build_ext import build_ext
 
-import versioningit
+def _get_version():
+    version = subprocess.check_output(['dpkg-parsechangelog', '-SVersion'],
+                                   text=True).split('-')[0]
+    with open('src/isal/_version.py', 'w') as fd:
+        fd.write('__version__ = "%s"' % version)
+
 
 ISA_L_SOURCE = os.path.join("src", "isal", "isa-l")
 
@@ -138,7 +143,7 @@
 
 setup(
     name="isal",
-    version=versioningit.get_version(),
+    version=_get_version(),
     description="Faster zlib and gzip compatible compression and "
                 "decompression by providing python bindings for the ISA-L "
                 "library.",