git-annex 10.20250520b4__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 ADDED
@@ -0,0 +1,47 @@
1
+ import os.path as op
2
+ import subprocess
3
+ import sys
4
+
5
+
6
+ def cli():
7
+ """Emulate a symlink to a binary.
8
+
9
+ This script essentially calls the `git-annex` binary that is shipped
10
+ with the package, but using the `argv` list (including a potentially
11
+ different executable name) pass to the script itself.
12
+
13
+ It relies on the `executable` argument of `subprocess.run()` to achieve
14
+ this.
15
+
16
+ This approach provides alternative means for git-annex's installation
17
+ method with symlinks pointing to a single binary, and works on platforms
18
+ without symlink support, and also in packages that cannot represent
19
+ symlinks.
20
+ """
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:]
27
+ try:
28
+ subprocess.run(
29
+ args,
30
+ executable=op.join(
31
+ exe_dir,
32
+ f'git-annex{".exe" if sys.platform.startswith("win") else ""}',
33
+ ),
34
+ shell=False,
35
+ check=True,
36
+ )
37
+ # try flush here to trigger a BrokenPipeError
38
+ # within the try-except block so we can handle it
39
+ # (happens if the calling process closed stdout
40
+ # already)
41
+ sys.stdout.flush()
42
+ except BrokenPipeError:
43
+ # setting it to None prevents Python from trying to
44
+ # flush again
45
+ sys.stdout = None
46
+ except subprocess.CalledProcessError as e:
47
+ sys.exit(e.returncode)
git_annex/git-annex ADDED
Binary file
git_annex/py.typed ADDED
File without changes
@@ -0,0 +1,127 @@
1
+ Metadata-Version: 2.4
2
+ Name: git-annex
3
+ Version: 10.20250520b4
4
+ Summary: manage files with git, without checking their contents into git
5
+ Project-URL: Homepage, https://git-annex.branchable.com/
6
+ Project-URL: Documentation, https://git-annex.branchable.com/git-annex
7
+ Project-URL: Issues, https://git-annex.branchable.com/bugs
8
+ Project-URL: Source, http://source.git-annex.branchable.com/?p=source.git
9
+ Project-URL: Changelog, http://source.git-annex.branchable.com/?p=source.git;a=blob;f=CHANGELOG;hb=HEAD
10
+ Author-email: Joey Hess <id@joeyh.name>
11
+ Maintainer-email: Michael Hanke <mih@ngln.eu>
12
+ License-Expression: AGPL-3.0-or-later
13
+ Keywords: data logistics,git,version control
14
+ Classifier: Development Status :: 6 - Mature
15
+ Classifier: Environment :: Console
16
+ Classifier: Intended Audience :: Developers
17
+ Classifier: Intended Audience :: End Users/Desktop
18
+ Classifier: Intended Audience :: Information Technology
19
+ Classifier: Intended Audience :: Science/Research
20
+ Classifier: License :: DFSG approved
21
+ Classifier: License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)
22
+ Classifier: Natural Language :: English
23
+ Classifier: Operating System :: MacOS
24
+ Classifier: Operating System :: Microsoft :: Windows
25
+ Classifier: Operating System :: POSIX :: Linux
26
+ Classifier: Programming Language :: Haskell
27
+ Classifier: Topic :: Software Development :: Version Control
28
+ Classifier: Topic :: Software Development :: Version Control :: Git
29
+ Classifier: Topic :: System :: Archiving :: Backup
30
+ Classifier: Topic :: System :: Archiving :: Mirroring
31
+ Classifier: Topic :: System :: Archiving :: Packaging
32
+ Classifier: Topic :: Utilities
33
+ Requires-Python: >=3.9
34
+ Description-Content-Type: text/markdown
35
+
36
+ # Python wheel package for git-annex
37
+
38
+ ## Why?
39
+
40
+ [Git-annex](https://git-annex.branchable.com/) is written in Haskell and plenty
41
+ of [installation methods](https://git-annex.branchable.com/install/) are
42
+ available. However, for deploying git-annex as a dependency of a Python
43
+ library/application, like [DataLad](https://datalad.org) or
44
+ [AnnexRemote](https://github.com/Lykos153/AnnexRemote), system packages
45
+ are a lot less flexible than Python's virtual environments, and other methods
46
+ are more complex and fragile.
47
+
48
+ With git-annex being available from PyPi, versioned dependencies and deployment
49
+ in application-specific environments are possible via standard means of Python
50
+ packaging.
51
+
52
+ ## Caveats
53
+
54
+ A standard git-annex deployment is (primarily) a single binary (`git-annex`),
55
+ and a bunch of symlinks that make this one binary fulfilled multiple roles
56
+ (`git-annex-shell`, `git-remote-annex`, etc.). A Python wheel, however, is a
57
+ ZIP file container with no support for symlinks, and also no support for
58
+ "post-install" scripts.
59
+
60
+ In order to square this circle, the git-annex binary is wrapped via regular
61
+ Python entrypoint scripts that handle calling git-annex as necessary. This
62
+ delivers a cross-platform compatible wheel, but at a start-up cost (~30ms vs
63
+ ~11ms on my laptop).
64
+
65
+ ## Installation
66
+
67
+ Get the package from [PyPi](https://pypi.org/project/git-annex/), and install like
68
+ any other package from PyPi.
69
+
70
+ [uv](https://docs.astral.sh/uv/) users can deploy git-annex in a dedicated virtual
71
+ environment via the one-liner:
72
+
73
+ ```
74
+ uv tool install git-annex
75
+ ```
76
+
77
+ ## git-annex build configuration
78
+
79
+ Git-annex is built with libmagic support, but without the git-annex assistant.
80
+ The primary purpose of this package is to provide git-annex (as a dependency),
81
+ installed in a virtual environment. Users of the git-annex assistant application
82
+ likely install git-annex via any of its platform packages.
83
+
84
+ ## Platform notes
85
+
86
+ ### Linux
87
+
88
+ The `manylinux` wheel is self-contained and includes copies of all libraries.
89
+ It only depends on the declared GLIBC versions.
90
+ The `magic.mgc` database is not included, and is assumed to be available on
91
+ the target system. Install it separately, if needed (e.g., `libmagic-mgc`
92
+ package).
93
+
94
+ ### Windows
95
+
96
+ The wheel is self-contained and includes a copy of libmagic and the `magic.mgc` database.
97
+
98
+ ### Mac
99
+
100
+ Git-annex is built with libmagic support, but the library is not included and needs
101
+ to be deployed separately.
102
+
103
+
104
+ ## Developer information
105
+
106
+ ### Sources
107
+
108
+ The sources for this package are available at
109
+ https://github.com/psychoinformatics-de/git-annex-wheel
110
+
111
+ The repository tracks the git-annex sources as a Git submodule.
112
+
113
+ ### Issues
114
+
115
+ For issues related to the Python wheel packaging of git-annex, please
116
+ use the tracker at https://github.com/psychoinformatics-de/git-annex-wheel/issues
117
+
118
+ ### How to update for a new git-annex release?
119
+
120
+ Advance the submodule `./git-annex` to the new release tag.
121
+
122
+ Now adjust the package version in `pyproject.toml` accordingly. This version
123
+ must follow the [rules for Python
124
+ packages](https://packaging.python.org/en/latest/discussions/versioning/).
125
+
126
+ The included (GitHub) action workflows will build a corresponding wheel
127
+ and upload it to PyPi.
@@ -0,0 +1,7 @@
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,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.27.0
3
+ Root-Is-Purelib: false
4
+ Tag: py3-none-macosx_14_0_arm64
@@ -0,0 +1,5 @@
1
+ [console_scripts]
2
+ git-annex = git_annex:cli
3
+ git-annex-shell = git_annex:cli
4
+ git-remote-annex = git_annex:cli
5
+ git-remote-tor-annex = git_annex:cli