git-annex 10.20250520b4__py3-none-macosx_14_0_arm64.whl → 10.20250520b5__py3-none-macosx_14_0_arm64.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.
git_annex/__init__.py CHANGED
@@ -1,5 +1,5 @@
1
+ import os
1
2
  import os.path as op
2
- import subprocess
3
3
  import sys
4
4
 
5
5
 
@@ -10,27 +10,29 @@ def cli():
10
10
  with the package, but using the `argv` list (including a potentially
11
11
  different executable name) pass to the script itself.
12
12
 
13
- It relies on the `executable` argument of `subprocess.run()` to achieve
14
- this.
13
+ On Unix-like systems, it `exec`s the binary, replacing the current process.
14
+ Windows does not support `exec`, so in that case, it relies on the
15
+ `executable` argument of `subprocess.run()` to achieve this.
15
16
 
16
17
  This approach provides alternative means for git-annex's installation
17
18
  method with symlinks pointing to a single binary, and works on platforms
18
19
  without symlink support, and also in packages that cannot represent
19
20
  symlinks.
20
21
  """
21
- exe_dir = op.dirname(__file__)
22
- exe = op.join(
23
- exe_dir,
24
- op.basename(sys.argv[0]),
25
- )
26
- args = [exe] + sys.argv[1:]
22
+ exe = op.join(op.dirname(__file__), 'git-annex')
23
+ if sys.platform.startswith('win'):
24
+ exec_subproc(f'{exe}.exe', sys.argv)
25
+ else:
26
+ os.execv(exe, sys.argv)
27
+
28
+
29
+ def exec_subproc(executable, argv):
30
+ import subprocess
31
+
27
32
  try:
28
33
  subprocess.run(
29
- args,
30
- executable=op.join(
31
- exe_dir,
32
- f'git-annex{".exe" if sys.platform.startswith("win") else ""}',
33
- ),
34
+ argv,
35
+ executable=executable,
34
36
  shell=False,
35
37
  check=True,
36
38
  )
git_annex/git-annex CHANGED
Binary file
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: git-annex
3
- Version: 10.20250520b4
3
+ Version: 10.20250520b5
4
4
  Summary: manage files with git, without checking their contents into git
5
5
  Project-URL: Homepage, https://git-annex.branchable.com/
6
6
  Project-URL: Documentation, https://git-annex.branchable.com/git-annex
@@ -0,0 +1,7 @@
1
+ git_annex/__init__.py,sha256=QJUr0uno8kddk_D2rsvDM7dYgiDL7ZubRikRtih9nYY,1574
2
+ git_annex/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
+ git_annex/git-annex,sha256=GKMlDglgFW_CrZEQoenBVaqrmBzVNIGbM0JX-TvzYuQ,168165656
4
+ git_annex-10.20250520b5.dist-info/METADATA,sha256=wDv2QohZ5KLTcCbK9xYcIbj-ASQWAJOdd-R4BrWxW4Q,4879
5
+ git_annex-10.20250520b5.dist-info/WHEEL,sha256=eaSKqWH-ZPKgFrHaSRkMfjdnqk5GaqaF1YPM6h_26sY,102
6
+ git_annex-10.20250520b5.dist-info/entry_points.txt,sha256=BI1LqRvI7ETq6hOuPgaT9O9cmmHJwYS3SthvRoNS43s,146
7
+ git_annex-10.20250520b5.dist-info/RECORD,,
@@ -1,7 +0,0 @@
1
- git_annex/__init__.py,sha256=n9tUYvSlfPGVXj7L860y9YnDDnfhnCLPuAysEuxKihk,1472
2
- git_annex/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
- git_annex/git-annex,sha256=6ztA9yAfkRcjkB0gFQCItFZhwL2kVIzxbpvlW_L9ZFU,168165432
4
- git_annex-10.20250520b4.dist-info/METADATA,sha256=1gvH4C8pHXzUxvN0R1CXRrJ4uM_bgSLV2Z080VGdJ4Q,4879
5
- git_annex-10.20250520b4.dist-info/WHEEL,sha256=eaSKqWH-ZPKgFrHaSRkMfjdnqk5GaqaF1YPM6h_26sY,102
6
- git_annex-10.20250520b4.dist-info/entry_points.txt,sha256=BI1LqRvI7ETq6hOuPgaT9O9cmmHJwYS3SthvRoNS43s,146
7
- git_annex-10.20250520b4.dist-info/RECORD,,