sqlite-scanner 0.1.0__py3-none-win_amd64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"""Go binary packaged as Python wheel."""
|
|
2
|
+
|
|
3
|
+
import os
|
|
4
|
+
import stat
|
|
5
|
+
import subprocess
|
|
6
|
+
import sys
|
|
7
|
+
|
|
8
|
+
__version__ = "0.1.0"
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def get_binary_path():
|
|
12
|
+
"""Return the path to the bundled binary."""
|
|
13
|
+
return os.path.join(os.path.dirname(__file__), "bin", "sqlite-scanner.exe")
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def main():
|
|
17
|
+
"""Execute the bundled binary."""
|
|
18
|
+
binary = get_binary_path()
|
|
19
|
+
|
|
20
|
+
# Ensure binary is executable on Unix
|
|
21
|
+
if sys.platform != "win32":
|
|
22
|
+
current_mode = os.stat(binary).st_mode
|
|
23
|
+
if not (current_mode & stat.S_IXUSR):
|
|
24
|
+
os.chmod(binary, current_mode | stat.S_IXUSR | stat.S_IXGRP | stat.S_IXOTH)
|
|
25
|
+
|
|
26
|
+
if sys.platform == "win32":
|
|
27
|
+
# On Windows, use subprocess to properly handle signals
|
|
28
|
+
sys.exit(subprocess.call([binary] + sys.argv[1:]))
|
|
29
|
+
else:
|
|
30
|
+
# On Unix, exec replaces the process
|
|
31
|
+
os.execvp(binary, [binary] + sys.argv[1:])
|
|
Binary file
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
sqlite_scanner/__init__.py,sha256=3cJSm6bNOwECAVUu5s4Do_pEK-KvbdLGwCCE-S9JieE,872
|
|
2
|
+
sqlite_scanner/__main__.py,sha256=IvTjTYhvVO6h9Jpa45i-FfzjcKcJy1jwkAZY_CkgibQ,26
|
|
3
|
+
sqlite_scanner/bin/sqlite-scanner.exe,sha256=mk8LQ7m74K6ZaNcMJbyC4w4fyaxq4bt5aSLWput5qn8,2239488
|
|
4
|
+
sqlite_scanner-0.1.0.dist-info/METADATA,sha256=zTj4aga1ra2Gsw3TAjiJcP4FV6yGz5C8gMh5ut6oUOs,126
|
|
5
|
+
sqlite_scanner-0.1.0.dist-info/WHEEL,sha256=0sPxpmRKEXT8GcR93ZvdoGx2ZPyFZ51zM-uCrZygDzM,95
|
|
6
|
+
sqlite_scanner-0.1.0.dist-info/entry_points.txt,sha256=VEDuc4SNPyYZ1pNLH21X8VptjOpYan-TJ3_YW_Hyd-8,55
|
|
7
|
+
sqlite_scanner-0.1.0.dist-info/RECORD,,
|