python-alpm 0.3.0__cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.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.
alpm/py.typed ADDED
File without changes
alpm/type_aliases.py ADDED
@@ -0,0 +1,139 @@
1
+ """Type aliases for various submodules of the alpm package."""
2
+
3
+ from typing import TypeAlias, Union, Any
4
+
5
+ from alpm.alpm_types import (
6
+ Blake2b512Checksum,
7
+ Md5Checksum,
8
+ Sha1Checksum,
9
+ Sha224Checksum,
10
+ Sha256Checksum,
11
+ Sha384Checksum,
12
+ Sha512Checksum,
13
+ Crc32CksumChecksum,
14
+ SkippableBlake2b512Checksum,
15
+ SkippableMd5Checksum,
16
+ SkippableSha1Checksum,
17
+ SkippableSha224Checksum,
18
+ SkippableSha256Checksum,
19
+ SkippableSha384Checksum,
20
+ SkippableSha512Checksum,
21
+ SkippableCrc32CksumChecksum,
22
+ OpenPGPKeyId,
23
+ OpenPGPv4Fingerprint,
24
+ BuildEnvironmentOption,
25
+ PackageOption,
26
+ PackageVersion,
27
+ SonameV1,
28
+ PackageRelation,
29
+ BzrInfo,
30
+ FossilInfo,
31
+ GitInfo,
32
+ HgInfo,
33
+ SvnInfo,
34
+ KnownArchitecture,
35
+ UnknownArchitecture,
36
+ )
37
+
38
+ from alpm.alpm_srcinfo import SourceInfoV1
39
+
40
+ Checksum: TypeAlias = Union[
41
+ Blake2b512Checksum,
42
+ Md5Checksum,
43
+ Sha1Checksum,
44
+ Sha224Checksum,
45
+ Sha256Checksum,
46
+ Sha384Checksum,
47
+ Sha512Checksum,
48
+ Crc32CksumChecksum,
49
+ ]
50
+ """A checksum using a supported algorithm"""
51
+
52
+ SkippableChecksum: TypeAlias = Union[
53
+ SkippableBlake2b512Checksum,
54
+ SkippableMd5Checksum,
55
+ SkippableSha1Checksum,
56
+ SkippableSha224Checksum,
57
+ SkippableSha256Checksum,
58
+ SkippableSha384Checksum,
59
+ SkippableSha512Checksum,
60
+ SkippableCrc32CksumChecksum,
61
+ ]
62
+ """ A skippable checksum using a supported algorithm.
63
+
64
+ Strings representing checksums are used to verify the integrity of files.
65
+ If the "SKIP" keyword is found, the integrity check is skipped.
66
+ """
67
+
68
+ OpenPGPIdentifier: TypeAlias = Union[
69
+ OpenPGPKeyId,
70
+ OpenPGPv4Fingerprint,
71
+ ]
72
+ """An OpenPGP key identifier.
73
+
74
+ The OpenPGPIdentifier type represents a valid OpenPGP identifier, which can be either
75
+ an OpenPGP Key ID or an OpenPGP v4 fingerprint.
76
+ """
77
+
78
+ MakepkgOption: TypeAlias = Union[
79
+ BuildEnvironmentOption,
80
+ PackageOption,
81
+ ]
82
+ """Either PackageOption or BuildEnvironmentOption.
83
+
84
+ This is necessary for metadata files such as SRCINFO or PKGBUILD package scripts that
85
+ don't differentiate between the different types and scopes of options.
86
+ """
87
+
88
+ VersionOrSoname: TypeAlias = Union[
89
+ PackageVersion,
90
+ str,
91
+ ]
92
+ """Either a PackageVersion or a string representing a shared object name."""
93
+
94
+
95
+ RelationOrSoname: TypeAlias = Union[
96
+ SonameV1,
97
+ PackageRelation,
98
+ ]
99
+ """Either a SonameV1 or a PackageRelation."""
100
+
101
+ SystemArchitecture: TypeAlias = Union[KnownArchitecture, UnknownArchitecture]
102
+ """A specific system architecture.
103
+
104
+ Either KnownArchitecture or UnknownArchitecture.
105
+ """
106
+
107
+ SourceInfo: TypeAlias = Union[SourceInfoV1, Any]
108
+ """The representation of SRCINFO data.
109
+
110
+ Tracks all available versions of the file format.
111
+
112
+ This union includes Any to allow for future extensions without breaking changes.
113
+ """
114
+
115
+ VcsInfo: TypeAlias = Union[
116
+ BzrInfo,
117
+ FossilInfo,
118
+ GitInfo,
119
+ HgInfo,
120
+ SvnInfo,
121
+ ]
122
+ """Information on Version Control Systems (VCS) using a URL.
123
+
124
+ Several different VCS systems can be used in the context of a SourceUrl.
125
+ Each system supports addressing different types of objects and may optionally require
126
+ signature verification for those objects.
127
+ """
128
+
129
+ __all__ = [
130
+ "Checksum",
131
+ "SkippableChecksum",
132
+ "OpenPGPIdentifier",
133
+ "MakepkgOption",
134
+ "VersionOrSoname",
135
+ "RelationOrSoname",
136
+ "SystemArchitecture",
137
+ "SourceInfo",
138
+ "VcsInfo",
139
+ ]
@@ -0,0 +1,118 @@
1
+ Metadata-Version: 2.4
2
+ Name: python-alpm
3
+ Version: 0.3.0
4
+ Classifier: Intended Audience :: Developers
5
+ Classifier: Operating System :: POSIX :: Linux
6
+ Classifier: Programming Language :: Python :: Implementation :: CPython
7
+ Classifier: Programming Language :: Python :: Implementation :: PyPy
8
+ Classifier: Programming Language :: Rust
9
+ Summary: Python bindings for the Rust-based ALPM project
10
+ Keywords: alpm,archlinux,packaging,srcinfo
11
+ Home-Page: https://alpm.archlinux.page
12
+ License-Expression: Apache-2.0 OR MIT
13
+ Requires-Python: >=3.10
14
+ Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
15
+ Project-URL: Changelog, https://alpm.archlinux.page/python-alpm/CHANGELOG.html
16
+ Project-URL: Documentation, https://alpm.archlinux.page/pdoc/
17
+ Project-URL: Homepage, https://alpm.archlinux.page/python-alpm/
18
+ Project-URL: Issues, https://gitlab.archlinux.org/archlinux/alpm/alpm/-/issues
19
+ Project-URL: Repository, https://gitlab.archlinux.org/archlinux/alpm/alpm
20
+
21
+ # python-alpm
22
+
23
+ Python bindings for the **A**rch **L**inux **P**ackage **M**anagement (ALPM) project.
24
+
25
+ We are currently awaiting decision from PyPI maintainers to allow us to publish this package under the name `alpm`.
26
+ Until then, we are using the name `python-alpm`.
27
+ You can view the support ticket [here](https://github.com/pypi/support/issues/7813).
28
+
29
+ ## Documentation
30
+
31
+ Latest documentation is available at <https://alpm.archlinux.page/pdoc>.
32
+
33
+ ## Installation
34
+
35
+ ```sh
36
+ pip install python-alpm
37
+ ```
38
+
39
+ ## Examples
40
+
41
+ ### Validating and comparing versions
42
+
43
+ ```pycon
44
+ >>> from alpm.alpm_types import PackageVersion, PackageRelease, FullVersion, SchemaVersion
45
+
46
+ >>> full_version = FullVersion(pkgver=PackageVersion('0.1.0alpha'), pkgrel=PackageRelease(minor=1))
47
+ >>> full_version
48
+ FullVersion(pkgver=PackageVersion('0.1.0alpha'), pkgrel=PackageRelease(major=0, minor=1))
49
+
50
+ >>> PackageVersion('1.0.1') > full_version.pkgver
51
+ True
52
+
53
+ >>> version_one = SchemaVersion.from_str('1.0.0')
54
+ >>> version_one
55
+ SchemaVersion(major=1, minor=0, patch=0, pre='', build='')
56
+
57
+ >>> version_one == SchemaVersion(major=1)
58
+ True
59
+
60
+ ```
61
+
62
+ ### Parsing .SRCINFO
63
+
64
+ ```pycon
65
+ >>> from alpm.alpm_srcinfo import SourceInfoV1
66
+ >>> from alpm.alpm_types import Architecture
67
+
68
+ >>> srcinfo = SourceInfoV1.from_file("../alpm-srcinfo/tests/correct/all_overrides.srcinfo")
69
+
70
+ >>> srcinfo.base
71
+ PackageBase(name='example', version=FullVersion(pkgver=PackageVersion('0.1.0'), pkgrel=PackageRelease(major=1), epoch=1))
72
+
73
+ >>> srcinfo.base.architectures
74
+ Architectures([Architecture('x86_64'), Architecture('aarch64')])
75
+
76
+ >>> srcinfo.packages
77
+ [Package(name='example')]
78
+
79
+ >>> srcinfo.packages_for_architecture(Architecture('aarch64'))
80
+ [MergedPackage(architecture=Architecture('aarch64'), name='example', version=FullVersion(pkgver=PackageVersion('0.1.0'), pkgrel=PackageRelease(major=1), epoch=1))]
81
+
82
+ ```
83
+
84
+ ### Working with package metadata
85
+
86
+ ```pycon
87
+ >>> from alpm.alpm_srcinfo.source_info.v1.package import Package, Override
88
+ >>> from alpm.alpm_types import License
89
+
90
+ >>> pkg = Package("testpkg")
91
+
92
+ >>> pkg.description = Override("A test package")
93
+ >>> pkg.description
94
+ Override(value='A test package')
95
+
96
+ >>> pkg.licenses = Override([License("MIT"), License("custom-license")])
97
+ >>> pkg.licenses
98
+ Override(value=[License('MIT'), License('custom-license')])
99
+
100
+ >>> {str(lic): lic.is_spdx for lic in pkg.licenses.value}
101
+ {'MIT': True, 'custom-license': False}
102
+
103
+ ```
104
+
105
+ ## Contributing
106
+
107
+ Please refer to the [contribution guidelines] to learn how to contribute to this project.
108
+
109
+ ## License
110
+
111
+ This project can be used under the terms of the [Apache-2.0] or [MIT].
112
+ Contributions to this project, unless noted otherwise, are automatically licensed under the terms of both of those licenses.
113
+
114
+ <!-- Note: these paths have to be absolute in order to work on PyPI -->
115
+ [contribution guidelines]: https://gitlab.archlinux.org/archlinux/alpm/alpm/-/blob/main/CONTRIBUTING.md
116
+ [Apache-2.0]: https://gitlab.archlinux.org/archlinux/alpm/alpm/-/blob/main/LICENSES/Apache-2.0.txt
117
+ [MIT]: https://gitlab.archlinux.org/archlinux/alpm/alpm/-/blob/main/LICENSES/MIT.txt
118
+
@@ -0,0 +1,28 @@
1
+ alpm/__init__.py,sha256=VdNfeuoEmDNm8gxzuFz1B4WtO6EOZuUlHBN1yIvUReU,232
2
+ alpm/__pycache__/__init__.cpython-313.pyc,sha256=qh0kdrhGd1seA17RjZ6C5Fz-fPOUV7wEoomPMVAEPCg,423
3
+ alpm/__pycache__/alpm_types.cpython-313.pyc,sha256=pTtQot69vefGIzNGZ701fr-8T3uQoEhexblua4grtio,70380
4
+ alpm/__pycache__/type_aliases.cpython-313.pyc,sha256=MCQ3dwMt5VW34cO-EDuAe1lP13qt4oBvetPB7jshZlc,2139
5
+ alpm/_native.abi3.so,sha256=pf85tYH6VWyk3rm26QbJl9JOPtJDoZ1Vb1nYRqlSXeE,2282392
6
+ alpm/_native.pyi,sha256=qtRhGpgRq5TKWrdiHGexaJU0OhHPaZ5pIvQJrBOwgWs,135
7
+ alpm/alpm_srcinfo/__init__.pyi,sha256=uU9wwNCwTElNb4G0cnsGPYgdA4KHkz-AN_lhVk1KG1A,541
8
+ alpm/alpm_srcinfo/__pycache__/__init__.cpython-313.pyc,sha256=VG9pXptXWC-KLzS_Z5SMg6KVLu9L_MQ1drFpzGp2Aac,663
9
+ alpm/alpm_srcinfo/__pycache__/error.cpython-313.pyc,sha256=7gsaWWoDD4hqO-MQIsRgQa0hUqCjiAVfLQALJSp_RYM,592
10
+ alpm/alpm_srcinfo/__pycache__/schema.cpython-313.pyc,sha256=qG3xoeZC67-T9a6MQWcu8TWqa8-gySM1_zUp_1zl5LI,3014
11
+ alpm/alpm_srcinfo/error.pyi,sha256=6XNyfzOVKcn2W52wybJSxZ6gSus_g_PdiHaClP7JaMs,201
12
+ alpm/alpm_srcinfo/schema.pyi,sha256=Y88imZSs_MguGUSN_WX0wjiiwIQmDSpu--SfARuUCCc,1982
13
+ alpm/alpm_srcinfo/source_info/__init__.pyi,sha256=oiOX3PSzxxsusuaeDbFy4xF4SagZYO6D4v5fAGjEub4,1552
14
+ alpm/alpm_srcinfo/source_info/__pycache__/__init__.cpython-313.pyc,sha256=hgWa-UpcWqvLT8M8S05gahT5w_u3Qhy6ftSrtmM_NTY,1920
15
+ alpm/alpm_srcinfo/source_info/v1/__init__.pyi,sha256=jauHv2XtubSxCfFbtGulcshPovxYL_VMxJ6P4nN_eiA,2859
16
+ alpm/alpm_srcinfo/source_info/v1/__pycache__/__init__.cpython-313.pyc,sha256=4Y1MDNPlBXeIEo3o0l7mwUzNleUlAlAavt_UrINCI6s,4003
17
+ alpm/alpm_srcinfo/source_info/v1/__pycache__/merged.cpython-313.pyc,sha256=MPPQjf2pknGP1LJm491LOASiKMxpPbreY63a3aH6W6c,9556
18
+ alpm/alpm_srcinfo/source_info/v1/__pycache__/package.cpython-313.pyc,sha256=0ZDAwj6hS3wtayTigR02sYRi6uA4uu8e2SxULa1y9Fk,13519
19
+ alpm/alpm_srcinfo/source_info/v1/__pycache__/package_base.cpython-313.pyc,sha256=WraUhU_JAh1JfsP03HEulVLghE-ZFM3SCdwuMpWVHNg,22538
20
+ alpm/alpm_srcinfo/source_info/v1/merged.pyi,sha256=jNub3dw_m2CmFxxqdpolB5R9U4vlG2z_O7e1Px0yGbw,5796
21
+ alpm/alpm_srcinfo/source_info/v1/package.pyi,sha256=hLXAfsFw8lsL0g9EASY-Ro3SYFKht14c9JG-0LYeeCs,8672
22
+ alpm/alpm_srcinfo/source_info/v1/package_base.pyi,sha256=eddm9dKbNHu-bl3axH4ehmoVr0G6rsWSBFJWJOadn3U,14262
23
+ alpm/alpm_types.pyi,sha256=0P3jNrhx21hVLPJmIUIvfmj_9O0OA-DS897ImNinzVQ,40915
24
+ alpm/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
25
+ alpm/type_aliases.py,sha256=juZFmn9NrHVJ7WD977wcSrZPPOD4unNt393p0UbFf8Q,3341
26
+ python_alpm-0.3.0.dist-info/METADATA,sha256=r7SWDBbWrbV3AOPAtC-2KVrbksRg-9Mu2oVDNZTQYYA,4009
27
+ python_alpm-0.3.0.dist-info/WHEEL,sha256=sHl2MPySRQtLBS4t9I9tl1bAeFFBhTGABHYdwnegkVM,130
28
+ python_alpm-0.3.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: maturin (1.9.6)
3
+ Root-Is-Purelib: false
4
+ Tag: cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64