File: no-get-distribution

package info (click to toggle)
pglast 5.0~dev0%2B1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 4,872 kB
  • sloc: python: 12,256; sql: 2,151; makefile: 134
file content (17 lines) | stat: -rw-r--r-- 644 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Remove get_distribution() since it needs the package installed and breaks the coverage test at built time

--- a/pglast/__main__.py
+++ b/pglast/__main__.py
@@ -54,11 +54,9 @@ def workhorse(args):
 
 def main(options=None):
     from argparse import ArgumentParser
-    from pkg_resources import get_distribution
     from .parser import get_postgresql_version
 
-    version = '%s, with PostgreSQL %s parser' % (
-        get_distribution('pglast').version,
+    version = 'with PostgreSQL %s parser' % (
         '.'.join(str(p) for p in get_postgresql_version()))
 
     parser = ArgumentParser(description="PostgreSQL language prettifier")