File: version_with_pkgresources.patch

package info (click to toggle)
path.py 11.5.0-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 344 kB
  • sloc: python: 1,858; makefile: 156; sh: 4
file content (20 lines) | stat: -rw-r--r-- 443 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Author: Julien Puydt
Description: don't require another package just to find out about the version
Forwarded: no

--- a/path.py
+++ b/path.py
@@ -103,12 +103,7 @@
 U_NL_END = re.compile(r'(?:{0})$'.format(U_NEWLINE.pattern))
 
 
-try:
-    import importlib_metadata
-    __version__ = importlib_metadata.version('path.py')
-except Exception:
-    __version__ = 'unknown'
-
+__version__ = @VERSION@
 
 class TreeWalkWarning(Warning):
     pass