@formaggio-software/rhtop-windows-amd64 0.0.0-stage → 0.0.6
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.
- package/package.json +16 -4
- package/payload/LICENSE.txt +95 -0
- package/payload/NOTICE +14 -0
- package/payload/THIRD_PARTY_NOTICES/altgraph-0.17.5.dist-info/LICENSE +18 -0
- package/payload/THIRD_PARTY_NOTICES/altgraph-0.17.5.dist-info/METADATA +307 -0
- package/payload/THIRD_PARTY_NOTICES/annotated_types-0.8.0.dist-info/METADATA +295 -0
- package/payload/THIRD_PARTY_NOTICES/annotated_types-0.8.0.dist-info/licenses/LICENSE +21 -0
- package/payload/THIRD_PARTY_NOTICES/anyio-4.16.0.dist-info/METADATA +108 -0
- package/payload/THIRD_PARTY_NOTICES/anyio-4.16.0.dist-info/licenses/LICENSE +20 -0
- package/payload/THIRD_PARTY_NOTICES/attrs-26.1.0.dist-info/METADATA +199 -0
- package/payload/THIRD_PARTY_NOTICES/attrs-26.1.0.dist-info/licenses/LICENSE +21 -0
- package/payload/THIRD_PARTY_NOTICES/backports.tarfile-1.2.0.dist-info/LICENSE +17 -0
- package/payload/THIRD_PARTY_NOTICES/backports.tarfile-1.2.0.dist-info/METADATA +46 -0
- package/payload/THIRD_PARTY_NOTICES/build-1.6.1.dist-info/METADATA +142 -0
- package/payload/THIRD_PARTY_NOTICES/build-1.6.1.dist-info/licenses/LICENSE +20 -0
- package/payload/THIRD_PARTY_NOTICES/cffi-2.1.1.dist-info/METADATA +67 -0
- package/payload/THIRD_PARTY_NOTICES/cffi-2.1.1.dist-info/licenses/LICENSE +23 -0
- package/payload/THIRD_PARTY_NOTICES/click-8.5.1.dist-info/METADATA +83 -0
- package/payload/THIRD_PARTY_NOTICES/click-8.5.1.dist-info/licenses/LICENSE.txt +28 -0
- package/payload/THIRD_PARTY_NOTICES/colorama-0.4.6.dist-info/METADATA +441 -0
- package/payload/THIRD_PARTY_NOTICES/colorama-0.4.6.dist-info/licenses/LICENSE.txt +27 -0
- package/payload/THIRD_PARTY_NOTICES/cryptography-50.0.2.dist-info/METADATA +111 -0
- package/payload/THIRD_PARTY_NOTICES/cryptography-50.0.2.dist-info/licenses/LICENSE +3 -0
- package/payload/THIRD_PARTY_NOTICES/cryptography-50.0.2.dist-info/licenses/LICENSE.APACHE +202 -0
- package/payload/THIRD_PARTY_NOTICES/cryptography-50.0.2.dist-info/licenses/LICENSE.BSD +27 -0
- package/payload/THIRD_PARTY_NOTICES/h11-0.16.0.dist-info/METADATA +202 -0
- package/payload/THIRD_PARTY_NOTICES/h11-0.16.0.dist-info/licenses/LICENSE.txt +22 -0
- package/payload/THIRD_PARTY_NOTICES/hatchling-1.33.0.dist-info/METADATA +81 -0
- package/payload/THIRD_PARTY_NOTICES/hatchling-1.33.0.dist-info/licenses/LICENSE.txt +9 -0
- package/payload/THIRD_PARTY_NOTICES/httpcore2-2.16.2.dist-info/METADATA +798 -0
- package/payload/THIRD_PARTY_NOTICES/httpcore2-2.16.2.dist-info/licenses/LICENSE.md +28 -0
- package/payload/THIRD_PARTY_NOTICES/httpx2-2.16.2.dist-info/METADATA +227 -0
- package/payload/THIRD_PARTY_NOTICES/httpx2-2.16.2.dist-info/licenses/LICENSE.md +13 -0
- package/payload/THIRD_PARTY_NOTICES/idna-3.20.dist-info/METADATA +176 -0
- package/payload/THIRD_PARTY_NOTICES/idna-3.20.dist-info/licenses/LICENSE.md +31 -0
- package/payload/THIRD_PARTY_NOTICES/importlib_metadata-10.2.0.dist-info/METADATA +131 -0
- package/payload/THIRD_PARTY_NOTICES/importlib_metadata-10.2.0.dist-info/licenses/LICENSE +73 -0
- package/payload/THIRD_PARTY_NOTICES/iniconfig-2.3.1.dist-info/METADATA +84 -0
- package/payload/THIRD_PARTY_NOTICES/iniconfig-2.3.1.dist-info/licenses/LICENSE +21 -0
- package/payload/THIRD_PARTY_NOTICES/jaraco.classes-3.4.0.dist-info/LICENSE +17 -0
- package/payload/THIRD_PARTY_NOTICES/jaraco.classes-3.4.0.dist-info/METADATA +60 -0
- package/payload/THIRD_PARTY_NOTICES/jaraco_context-6.1.2.dist-info/METADATA +81 -0
- package/payload/THIRD_PARTY_NOTICES/jaraco_context-6.1.2.dist-info/licenses/LICENSE +18 -0
- package/payload/THIRD_PARTY_NOTICES/jaraco_functools-4.6.0.dist-info/METADATA +68 -0
- package/payload/THIRD_PARTY_NOTICES/jaraco_functools-4.6.0.dist-info/licenses/LICENSE +18 -0
- package/payload/THIRD_PARTY_NOTICES/jsonschema-4.26.0.dist-info/METADATA +170 -0
- package/payload/THIRD_PARTY_NOTICES/jsonschema-4.26.0.dist-info/licenses/COPYING +19 -0
- package/payload/THIRD_PARTY_NOTICES/jsonschema_specifications-2025.9.1.dist-info/METADATA +54 -0
- package/payload/THIRD_PARTY_NOTICES/jsonschema_specifications-2025.9.1.dist-info/licenses/COPYING +19 -0
- package/payload/THIRD_PARTY_NOTICES/keyring-25.7.0.dist-info/METADATA +554 -0
- package/payload/THIRD_PARTY_NOTICES/keyring-25.7.0.dist-info/licenses/LICENSE +18 -0
- package/payload/THIRD_PARTY_NOTICES/lazy_importer-0.1.0.dist-info/METADATA +174 -0
- package/payload/THIRD_PARTY_NOTICES/lazy_importer-0.1.0.dist-info/licenses/LICENSE +202 -0
- package/payload/THIRD_PARTY_NOTICES/linkify_it_py-2.2.0.dist-info/METADATA +262 -0
- package/payload/THIRD_PARTY_NOTICES/linkify_it_py-2.2.0.dist-info/licenses/LICENSE +48 -0
- package/payload/THIRD_PARTY_NOTICES/markdown_it_py-4.3.0.dist-info/METADATA +237 -0
- package/payload/THIRD_PARTY_NOTICES/markdown_it_py-4.3.0.dist-info/licenses/LICENSE +21 -0
- package/payload/THIRD_PARTY_NOTICES/markdown_it_py-4.3.0.dist-info/licenses/LICENSE.markdown-it +22 -0
- package/payload/THIRD_PARTY_NOTICES/mcp-2.3.0.dist-info/METADATA +172 -0
- package/payload/THIRD_PARTY_NOTICES/mcp-2.3.0.dist-info/licenses/LICENSE +21 -0
- package/payload/THIRD_PARTY_NOTICES/mcp_types-2.3.0.dist-info/METADATA +43 -0
- package/payload/THIRD_PARTY_NOTICES/mcp_types-2.3.0.dist-info/licenses/LICENSE +21 -0
- package/payload/THIRD_PARTY_NOTICES/mdit_py_plugins-0.7.0.dist-info/METADATA +60 -0
- package/payload/THIRD_PARTY_NOTICES/mdit_py_plugins-0.7.0.dist-info/licenses/LICENSE +21 -0
- package/payload/THIRD_PARTY_NOTICES/mdurl-0.1.2.dist-info/LICENSE +46 -0
- package/payload/THIRD_PARTY_NOTICES/mdurl-0.1.2.dist-info/METADATA +32 -0
- package/payload/THIRD_PARTY_NOTICES/more_itertools-11.2.1.dist-info/METADATA +302 -0
- package/payload/THIRD_PARTY_NOTICES/more_itertools-11.2.1.dist-info/licenses/LICENSE +19 -0
- package/payload/THIRD_PARTY_NOTICES/opentelemetry_api-1.45.2.dist-info/METADATA +43 -0
- package/payload/THIRD_PARTY_NOTICES/opentelemetry_api-1.45.2.dist-info/licenses/LICENSE +201 -0
- package/payload/THIRD_PARTY_NOTICES/packaging-26.3.dist-info/METADATA +112 -0
- package/payload/THIRD_PARTY_NOTICES/packaging-26.3.dist-info/licenses/LICENSE +3 -0
- package/payload/THIRD_PARTY_NOTICES/packaging-26.3.dist-info/licenses/LICENSE.APACHE +177 -0
- package/payload/THIRD_PARTY_NOTICES/packaging-26.3.dist-info/licenses/LICENSE.BSD +23 -0
- package/payload/THIRD_PARTY_NOTICES/pathspec-1.1.1.dist-info/METADATA +392 -0
- package/payload/THIRD_PARTY_NOTICES/pathspec-1.1.1.dist-info/licenses/LICENSE +373 -0
- package/payload/THIRD_PARTY_NOTICES/pefile-2024.8.26.dist-info/LICENSE +21 -0
- package/payload/THIRD_PARTY_NOTICES/pefile-2024.8.26.dist-info/METADATA +34 -0
- package/payload/THIRD_PARTY_NOTICES/pip-23.2.1.dist-info/LICENSE.txt +20 -0
- package/payload/THIRD_PARTY_NOTICES/pip-23.2.1.dist-info/METADATA +90 -0
- package/payload/THIRD_PARTY_NOTICES/platformdirs-4.14.7.dist-info/METADATA +114 -0
- package/payload/THIRD_PARTY_NOTICES/platformdirs-4.14.7.dist-info/licenses/LICENSE +21 -0
- package/payload/THIRD_PARTY_NOTICES/pluggy-1.7.0.dist-info/METADATA +152 -0
- package/payload/THIRD_PARTY_NOTICES/pluggy-1.7.0.dist-info/licenses/LICENSE +21 -0
- package/payload/THIRD_PARTY_NOTICES/pycparser-3.12.dist-info/METADATA +286 -0
- package/payload/THIRD_PARTY_NOTICES/pycparser-3.12.dist-info/licenses/LICENSE +27 -0
- package/payload/THIRD_PARTY_NOTICES/pydantic-2.14.3.dist-info/METADATA +1646 -0
- package/payload/THIRD_PARTY_NOTICES/pydantic-2.14.3.dist-info/licenses/LICENSE +21 -0
- package/payload/THIRD_PARTY_NOTICES/pydantic_core-2.50.4.dist-info/METADATA +172 -0
- package/payload/THIRD_PARTY_NOTICES/pydantic_core-2.50.4.dist-info/licenses/LICENSE +21 -0
- package/payload/THIRD_PARTY_NOTICES/pygments-2.21.0.dist-info/METADATA +58 -0
- package/payload/THIRD_PARTY_NOTICES/pygments-2.21.0.dist-info/licenses/AUTHORS +296 -0
- package/payload/THIRD_PARTY_NOTICES/pygments-2.21.0.dist-info/licenses/LICENSE +25 -0
- package/payload/THIRD_PARTY_NOTICES/pyinstaller-6.22.3.dist-info/METADATA +213 -0
- package/payload/THIRD_PARTY_NOTICES/pyinstaller-6.22.3.dist-info/licenses/COPYING.txt +648 -0
- package/payload/THIRD_PARTY_NOTICES/pyinstaller_hooks_contrib-2026.10.dist-info/METADATA +373 -0
- package/payload/THIRD_PARTY_NOTICES/pyinstaller_hooks_contrib-2026.10.dist-info/licenses/LICENSE +521 -0
- package/payload/THIRD_PARTY_NOTICES/pyjwt-2.15.1.dist-info/METADATA +94 -0
- package/payload/THIRD_PARTY_NOTICES/pyjwt-2.15.1.dist-info/licenses/AUTHORS.rst +7 -0
- package/payload/THIRD_PARTY_NOTICES/pyjwt-2.15.1.dist-info/licenses/LICENSE +21 -0
- package/payload/THIRD_PARTY_NOTICES/pyproject_hooks-1.3.3.dist-info/METADATA +27 -0
- package/payload/THIRD_PARTY_NOTICES/pyproject_hooks-1.3.3.dist-info/licenses/LICENSE +21 -0
- package/payload/THIRD_PARTY_NOTICES/pytest-9.2.0.dist-info/METADATA +217 -0
- package/payload/THIRD_PARTY_NOTICES/pytest-9.2.0.dist-info/licenses/LICENSE +21 -0
- package/payload/THIRD_PARTY_NOTICES/pytest_asyncio-1.5.0.dist-info/METADATA +100 -0
- package/payload/THIRD_PARTY_NOTICES/pytest_asyncio-1.5.0.dist-info/licenses/LICENSE +201 -0
- package/payload/THIRD_PARTY_NOTICES/python_multipart-0.0.34.dist-info/METADATA +179 -0
- package/payload/THIRD_PARTY_NOTICES/python_multipart-0.0.34.dist-info/licenses/LICENSE.txt +202 -0
- package/payload/THIRD_PARTY_NOTICES/pywin32-312.dist-info/METADATA +261 -0
- package/payload/THIRD_PARTY_NOTICES/pywin32-312.dist-info/licenses/adodbapi/license.txt +505 -0
- package/payload/THIRD_PARTY_NOTICES/pywin32-312.dist-info/licenses/com/License.txt +30 -0
- package/payload/THIRD_PARTY_NOTICES/pywin32-312.dist-info/licenses/com/win32comext/mapi/src/MAPIStubLibrary/LICENSE +21 -0
- package/payload/THIRD_PARTY_NOTICES/pywin32-312.dist-info/licenses/isapi/README.txt +7 -0
- package/payload/THIRD_PARTY_NOTICES/pywin32-312.dist-info/licenses/pythonwin/License.txt +30 -0
- package/payload/THIRD_PARTY_NOTICES/pywin32-312.dist-info/licenses/pythonwin/Scintilla/License.txt +20 -0
- package/payload/THIRD_PARTY_NOTICES/pywin32-312.dist-info/licenses/pythonwin/pywin/idle/LICENSE.txt +246 -0
- package/payload/THIRD_PARTY_NOTICES/pywin32-312.dist-info/licenses/win32/License.txt +30 -0
- package/payload/THIRD_PARTY_NOTICES/pywin32_ctypes-0.2.3.dist-info/LICENSE.txt +28 -0
- package/payload/THIRD_PARTY_NOTICES/pywin32_ctypes-0.2.3.dist-info/METADATA +134 -0
- package/payload/THIRD_PARTY_NOTICES/pywinpty-3.1.2.dist-info/METADATA +162 -0
- package/payload/THIRD_PARTY_NOTICES/pywinpty-3.1.2.dist-info/licenses/LICENSE.txt +21 -0
- package/payload/THIRD_PARTY_NOTICES/pyyaml-6.0.3.dist-info/METADATA +59 -0
- package/payload/THIRD_PARTY_NOTICES/pyyaml-6.0.3.dist-info/licenses/LICENSE +20 -0
- package/payload/THIRD_PARTY_NOTICES/referencing-0.37.0.dist-info/METADATA +64 -0
- package/payload/THIRD_PARTY_NOTICES/referencing-0.37.0.dist-info/licenses/COPYING +19 -0
- package/payload/THIRD_PARTY_NOTICES/rich-15.0.0.dist-info/METADATA +479 -0
- package/payload/THIRD_PARTY_NOTICES/rich-15.0.0.dist-info/licenses/LICENSE +19 -0
- package/payload/THIRD_PARTY_NOTICES/rpds_py-2026.9.1.dist-info/METADATA +99 -0
- package/payload/THIRD_PARTY_NOTICES/rpds_py-2026.9.1.dist-info/licenses/LICENSE +19 -0
- package/payload/THIRD_PARTY_NOTICES/ruff-0.17.5.dist-info/METADATA +484 -0
- package/payload/THIRD_PARTY_NOTICES/ruff-0.17.5.dist-info/licenses/LICENSE +430 -0
- package/payload/THIRD_PARTY_NOTICES/setuptools-65.5.0.dist-info/LICENSE +19 -0
- package/payload/THIRD_PARTY_NOTICES/setuptools-65.5.0.dist-info/METADATA +144 -0
- package/payload/THIRD_PARTY_NOTICES/sse_starlette-3.7.0.dist-info/METADATA +493 -0
- package/payload/THIRD_PARTY_NOTICES/sse_starlette-3.7.0.dist-info/licenses/AUTHORS +10 -0
- package/payload/THIRD_PARTY_NOTICES/sse_starlette-3.7.0.dist-info/licenses/LICENSE +27 -0
- package/payload/THIRD_PARTY_NOTICES/starlette-1.10.0.dist-info/METADATA +181 -0
- package/payload/THIRD_PARTY_NOTICES/starlette-1.10.0.dist-info/licenses/LICENSE.md +27 -0
- package/payload/THIRD_PARTY_NOTICES/textual-6.12.0.dist-info/LICENSE +21 -0
- package/payload/THIRD_PARTY_NOTICES/textual-6.12.0.dist-info/METADATA +265 -0
- package/payload/THIRD_PARTY_NOTICES/tomlkit-0.15.2.dist-info/METADATA +93 -0
- package/payload/THIRD_PARTY_NOTICES/tomlkit-0.15.2.dist-info/licenses/LICENSE +20 -0
- package/payload/THIRD_PARTY_NOTICES/trove_classifiers-2026.9.21.13.dist-info/METADATA +82 -0
- package/payload/THIRD_PARTY_NOTICES/trove_classifiers-2026.9.21.13.dist-info/licenses/LICENSE +201 -0
- package/payload/THIRD_PARTY_NOTICES/truststore-0.10.5.dist-info/METADATA +110 -0
- package/payload/THIRD_PARTY_NOTICES/truststore-0.10.5.dist-info/licenses/LICENSE +21 -0
- package/payload/THIRD_PARTY_NOTICES/typing_extensions-4.16.0.dist-info/METADATA +73 -0
- package/payload/THIRD_PARTY_NOTICES/typing_extensions-4.16.0.dist-info/licenses/LICENSE +279 -0
- package/payload/THIRD_PARTY_NOTICES/typing_inspection-0.4.5.dist-info/METADATA +49 -0
- package/payload/THIRD_PARTY_NOTICES/typing_inspection-0.4.5.dist-info/licenses/LICENSE +21 -0
- package/payload/THIRD_PARTY_NOTICES/uvicorn-0.54.0.dist-info/METADATA +189 -0
- package/payload/THIRD_PARTY_NOTICES/uvicorn-0.54.0.dist-info/licenses/LICENSE.md +27 -0
- package/payload/THIRD_PARTY_NOTICES/zipp-4.1.2.dist-info/METADATA +108 -0
- package/payload/THIRD_PARTY_NOTICES/zipp-4.1.2.dist-info/licenses/LICENSE +18 -0
- package/payload/rhtop.exe +0 -0
- package/README.md +0 -3
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: pluggy
|
|
3
|
+
Version: 1.7.0
|
|
4
|
+
Summary: plugin and hook calling mechanisms for python
|
|
5
|
+
Author: Holger Krekel
|
|
6
|
+
Maintainer-email: pytest core team <core@pytest.org>
|
|
7
|
+
License: MIT
|
|
8
|
+
Project-URL: Homepage, https://github.com/pytest-dev/pluggy
|
|
9
|
+
Project-URL: Documentation, https://pluggy.readthedocs.io/
|
|
10
|
+
Project-URL: Changelog, https://pluggy.readthedocs.io/en/latest/changelog.html
|
|
11
|
+
Project-URL: Repository, https://github.com/pytest-dev/pluggy
|
|
12
|
+
Project-URL: Issues, https://github.com/pytest-dev/pluggy/issues
|
|
13
|
+
Project-URL: Funding, https://tidelift.com/subscription/pkg/pypi-pluggy
|
|
14
|
+
Classifier: Development Status :: 6 - Mature
|
|
15
|
+
Classifier: Intended Audience :: Developers
|
|
16
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
17
|
+
Classifier: Operating System :: POSIX
|
|
18
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
19
|
+
Classifier: Operating System :: MacOS :: MacOS X
|
|
20
|
+
Classifier: Topic :: Software Development :: Testing
|
|
21
|
+
Classifier: Topic :: Software Development :: Libraries
|
|
22
|
+
Classifier: Topic :: Utilities
|
|
23
|
+
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
24
|
+
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
|
25
|
+
Classifier: Programming Language :: Python :: 3
|
|
26
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
27
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
28
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
29
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
30
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
31
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
32
|
+
Requires-Python: >=3.10
|
|
33
|
+
Description-Content-Type: text/x-rst
|
|
34
|
+
License-File: LICENSE
|
|
35
|
+
Dynamic: license-file
|
|
36
|
+
|
|
37
|
+
====================================================
|
|
38
|
+
pluggy - A minimalist production ready plugin system
|
|
39
|
+
====================================================
|
|
40
|
+
|
|
41
|
+
|pypi| |conda-forge| |versions| |github-actions| |gitter| |black| |codecov|
|
|
42
|
+
|
|
43
|
+
This is the core framework used by the `pytest`_, `tox`_, and `devpi`_ projects.
|
|
44
|
+
|
|
45
|
+
Please `read the docs`_ to learn more!
|
|
46
|
+
|
|
47
|
+
A definitive example
|
|
48
|
+
====================
|
|
49
|
+
.. code-block:: python
|
|
50
|
+
|
|
51
|
+
import pluggy
|
|
52
|
+
|
|
53
|
+
hookspec = pluggy.HookspecMarker("myproject")
|
|
54
|
+
hookimpl = pluggy.HookimplMarker("myproject")
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
class MySpec:
|
|
58
|
+
"""A hook specification namespace."""
|
|
59
|
+
|
|
60
|
+
@hookspec
|
|
61
|
+
def myhook(self, arg1, arg2):
|
|
62
|
+
"""My special little hook that you can customize."""
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
class Plugin_1:
|
|
66
|
+
"""A hook implementation namespace."""
|
|
67
|
+
|
|
68
|
+
@hookimpl
|
|
69
|
+
def myhook(self, arg1, arg2):
|
|
70
|
+
print("inside Plugin_1.myhook()")
|
|
71
|
+
return arg1 + arg2
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
class Plugin_2:
|
|
75
|
+
"""A 2nd hook implementation namespace."""
|
|
76
|
+
|
|
77
|
+
@hookimpl
|
|
78
|
+
def myhook(self, arg1, arg2):
|
|
79
|
+
print("inside Plugin_2.myhook()")
|
|
80
|
+
return arg1 - arg2
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
# create a manager and add the spec
|
|
84
|
+
pm = pluggy.PluginManager("myproject")
|
|
85
|
+
pm.add_hookspecs(MySpec)
|
|
86
|
+
|
|
87
|
+
# register plugins
|
|
88
|
+
pm.register(Plugin_1())
|
|
89
|
+
pm.register(Plugin_2())
|
|
90
|
+
|
|
91
|
+
# call our ``myhook`` hook
|
|
92
|
+
results = pm.hook.myhook(arg1=1, arg2=2)
|
|
93
|
+
print(results)
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
Running this directly gets us::
|
|
97
|
+
|
|
98
|
+
$ python docs/examples/toy-example.py
|
|
99
|
+
inside Plugin_2.myhook()
|
|
100
|
+
inside Plugin_1.myhook()
|
|
101
|
+
[-1, 3]
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
.. badges
|
|
105
|
+
|
|
106
|
+
.. |pypi| image:: https://img.shields.io/pypi/v/pluggy.svg
|
|
107
|
+
:target: https://pypi.org/pypi/pluggy
|
|
108
|
+
|
|
109
|
+
.. |versions| image:: https://img.shields.io/pypi/pyversions/pluggy.svg
|
|
110
|
+
:target: https://pypi.org/pypi/pluggy
|
|
111
|
+
|
|
112
|
+
.. |github-actions| image:: https://github.com/pytest-dev/pluggy/workflows/test/badge.svg
|
|
113
|
+
:target: https://github.com/pytest-dev/pluggy/actions
|
|
114
|
+
|
|
115
|
+
.. |conda-forge| image:: https://img.shields.io/conda/vn/conda-forge/pluggy.svg
|
|
116
|
+
:target: https://anaconda.org/conda-forge/pytest
|
|
117
|
+
|
|
118
|
+
.. |gitter| image:: https://badges.gitter.im/pytest-dev/pluggy.svg
|
|
119
|
+
:alt: Join the chat at https://gitter.im/pytest-dev/pluggy
|
|
120
|
+
:target: https://gitter.im/pytest-dev/pluggy?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
|
|
121
|
+
|
|
122
|
+
.. |black| image:: https://img.shields.io/badge/code%20style-black-000000.svg
|
|
123
|
+
:target: https://github.com/psf/black
|
|
124
|
+
|
|
125
|
+
.. |codecov| image:: https://codecov.io/gh/pytest-dev/pluggy/branch/main/graph/badge.svg
|
|
126
|
+
:target: https://codecov.io/gh/pytest-dev/pluggy
|
|
127
|
+
:alt: Code coverage Status
|
|
128
|
+
|
|
129
|
+
.. links
|
|
130
|
+
.. _pytest:
|
|
131
|
+
https://pytest.org
|
|
132
|
+
.. _tox:
|
|
133
|
+
https://tox.wiki/
|
|
134
|
+
.. _devpi:
|
|
135
|
+
https://doc.devpi.net
|
|
136
|
+
.. _read the docs:
|
|
137
|
+
https://pluggy.readthedocs.io/en/latest/
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
Support pluggy
|
|
141
|
+
--------------
|
|
142
|
+
|
|
143
|
+
`Open Collective`_ is an online funding platform for open and transparent communities.
|
|
144
|
+
It provides tools to raise money and share your finances in full transparency.
|
|
145
|
+
|
|
146
|
+
It is the platform of choice for individuals and companies that want to make one-time or
|
|
147
|
+
monthly donations directly to the project.
|
|
148
|
+
|
|
149
|
+
``pluggy`` is part of the ``pytest-dev`` project, see more details in the `pytest collective`_.
|
|
150
|
+
|
|
151
|
+
.. _Open Collective: https://opencollective.com
|
|
152
|
+
.. _pytest collective: https://opencollective.com/pytest
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2015 holger krekel (rather uses bitbucket/hpk42)
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: pycparser
|
|
3
|
+
Version: 3.12
|
|
4
|
+
Summary: C parser in Python
|
|
5
|
+
Author-email: Eli Bendersky <eliben@gmail.com>
|
|
6
|
+
Maintainer-email: Eli Bendersky <eliben@gmail.com>
|
|
7
|
+
License-Expression: BSD-3-Clause
|
|
8
|
+
Project-URL: Homepage, https://github.com/eliben/pycparser
|
|
9
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.15
|
|
16
|
+
Requires-Python: >=3.11
|
|
17
|
+
Description-Content-Type: text/x-rst
|
|
18
|
+
License-File: LICENSE
|
|
19
|
+
Dynamic: license-file
|
|
20
|
+
|
|
21
|
+
=========
|
|
22
|
+
pycparser
|
|
23
|
+
=========
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
.. image:: https://github.com/eliben/pycparser/workflows/pycparser-tests/badge.svg
|
|
27
|
+
:align: center
|
|
28
|
+
:target: https://github.com/eliben/pycparser/actions
|
|
29
|
+
|
|
30
|
+
----
|
|
31
|
+
|
|
32
|
+
.. contents::
|
|
33
|
+
:backlinks: none
|
|
34
|
+
|
|
35
|
+
.. sectnum::
|
|
36
|
+
|
|
37
|
+
Introduction
|
|
38
|
+
============
|
|
39
|
+
|
|
40
|
+
What is pycparser?
|
|
41
|
+
------------------
|
|
42
|
+
|
|
43
|
+
**pycparser** is a parser for the C language, written in pure Python. It is a
|
|
44
|
+
module designed to be easily integrated into applications that need to parse
|
|
45
|
+
C source code.
|
|
46
|
+
|
|
47
|
+
What is it good for?
|
|
48
|
+
--------------------
|
|
49
|
+
|
|
50
|
+
Anything that needs C code to be parsed. The following are some uses for
|
|
51
|
+
**pycparser**, taken from real user reports:
|
|
52
|
+
|
|
53
|
+
* C code obfuscator
|
|
54
|
+
* Front-end for various specialized C compilers
|
|
55
|
+
* Static code checker
|
|
56
|
+
* Automatic unit-test discovery
|
|
57
|
+
* Adding specialized extensions to the C language
|
|
58
|
+
|
|
59
|
+
One of the most popular uses of **pycparser** is in the `cffi
|
|
60
|
+
<https://cffi.readthedocs.io/en/latest/>`_ library, which uses it to parse the
|
|
61
|
+
declarations of C functions and types in order to auto-generate FFIs.
|
|
62
|
+
|
|
63
|
+
**pycparser** is unique in the sense that it's written in pure Python - a very
|
|
64
|
+
high level language that's easy to experiment with and tweak. To people familiar
|
|
65
|
+
with Lex and Yacc, **pycparser**'s code will be simple to understand. It also
|
|
66
|
+
has no external dependencies (except for a Python interpreter), making it very
|
|
67
|
+
simple to install and deploy.
|
|
68
|
+
|
|
69
|
+
Which version of C does pycparser support?
|
|
70
|
+
------------------------------------------
|
|
71
|
+
|
|
72
|
+
**pycparser** aims to support the full C11 language, including earlier
|
|
73
|
+
revisions like C99.
|
|
74
|
+
|
|
75
|
+
C23 support is conditional on a ``dialect="c23"`` setting, since this revision
|
|
76
|
+
introduces new keywords like ``bool`` that would conflict with existing C code
|
|
77
|
+
if not handled properly.
|
|
78
|
+
|
|
79
|
+
**pycparser** supports very few GCC extensions, but it's fairly easy to set
|
|
80
|
+
things up so that it parses code with a lot of GCC-isms successfully. See the
|
|
81
|
+
`FAQ <https://github.com/eliben/pycparser/wiki/FAQ>`_ for more details.
|
|
82
|
+
|
|
83
|
+
What grammar does pycparser follow?
|
|
84
|
+
-----------------------------------
|
|
85
|
+
|
|
86
|
+
**pycparser** very closely follows the C grammar provided in Annex A of the C99
|
|
87
|
+
standard (ISO/IEC 9899).
|
|
88
|
+
|
|
89
|
+
How is pycparser licensed?
|
|
90
|
+
--------------------------
|
|
91
|
+
|
|
92
|
+
`BSD license <https://github.com/eliben/pycparser/blob/main/LICENSE>`_.
|
|
93
|
+
|
|
94
|
+
Contact details
|
|
95
|
+
---------------
|
|
96
|
+
|
|
97
|
+
For reporting problems with **pycparser** or submitting feature requests, please
|
|
98
|
+
open an `issue <https://github.com/eliben/pycparser/issues>`_, or submit a
|
|
99
|
+
pull request.
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
Installing
|
|
103
|
+
==========
|
|
104
|
+
|
|
105
|
+
Prerequisites
|
|
106
|
+
-------------
|
|
107
|
+
|
|
108
|
+
**pycparser** is being tested with modern versions of Python on
|
|
109
|
+
Linux, macOS and Windows. See `the CI dashboard <https://github.com/eliben/pycparser/actions/workflows/ci.yml>`__
|
|
110
|
+
for details.
|
|
111
|
+
|
|
112
|
+
**pycparser** has no external dependencies.
|
|
113
|
+
|
|
114
|
+
Installation process
|
|
115
|
+
--------------------
|
|
116
|
+
|
|
117
|
+
The recommended way to install **pycparser** is with ``pip``::
|
|
118
|
+
|
|
119
|
+
> pip install pycparser
|
|
120
|
+
|
|
121
|
+
Using
|
|
122
|
+
=====
|
|
123
|
+
|
|
124
|
+
Interaction with the C preprocessor
|
|
125
|
+
-----------------------------------
|
|
126
|
+
|
|
127
|
+
In order to be compilable, C code must be preprocessed by the C preprocessor -
|
|
128
|
+
``cpp``. A compatible ``cpp`` handles preprocessing directives like ``#include`` and
|
|
129
|
+
``#define``, removes comments, and performs other minor tasks that prepare the C
|
|
130
|
+
code for compilation.
|
|
131
|
+
|
|
132
|
+
For all but the most trivial snippets of C code **pycparser**, like a C
|
|
133
|
+
compiler, must receive preprocessed C code in order to function correctly. If
|
|
134
|
+
you import the top-level ``parse_file`` function from the **pycparser** package,
|
|
135
|
+
it will interact with ``cpp`` for you, as long as it's in your PATH, or you
|
|
136
|
+
provide a path to it.
|
|
137
|
+
|
|
138
|
+
Note also that you can use ``gcc -E`` or ``clang -E`` instead of ``cpp``. See
|
|
139
|
+
the ``using_gcc_E_libc.py`` example for more details. Windows users can download
|
|
140
|
+
and install a binary build of Clang for Windows `from this website
|
|
141
|
+
<http://llvm.org/releases/download.html>`_.
|
|
142
|
+
|
|
143
|
+
What about the standard C library headers?
|
|
144
|
+
------------------------------------------
|
|
145
|
+
|
|
146
|
+
C code almost always ``#include``\s various header files from the standard C
|
|
147
|
+
library, like ``stdio.h``. While (with some effort) **pycparser** can be made to
|
|
148
|
+
parse the standard headers from any C compiler, it's much simpler to use the
|
|
149
|
+
provided "fake" standard includes for C11 in ``utils/fake_libc_include``. These
|
|
150
|
+
are standard C header files that contain only the bare necessities to allow
|
|
151
|
+
valid parsing of the files that use them. As a bonus, since they're minimal, it
|
|
152
|
+
can significantly improve the performance of parsing large C files.
|
|
153
|
+
|
|
154
|
+
The key point to understand here is that **pycparser** doesn't really care about
|
|
155
|
+
the semantics of types. It only needs to know whether some token encountered in
|
|
156
|
+
the source is a previously defined type. This is essential in order to be able
|
|
157
|
+
to parse C correctly.
|
|
158
|
+
|
|
159
|
+
See `this blog post
|
|
160
|
+
<https://eli.thegreenplace.net/2015/on-parsing-c-type-declarations-and-fake-headers>`_
|
|
161
|
+
for more details.
|
|
162
|
+
|
|
163
|
+
Note that the fake headers are not included in the ``pip`` package nor installed
|
|
164
|
+
via the package build (`#224 <https://github.com/eliben/pycparser/issues/224>`_).
|
|
165
|
+
|
|
166
|
+
Basic usage
|
|
167
|
+
-----------
|
|
168
|
+
|
|
169
|
+
Take a look at the |examples|_ directory of the distribution for a few examples
|
|
170
|
+
of using **pycparser**. These should be enough to get you started. Please note
|
|
171
|
+
that most realistic C code samples would require running the C preprocessor
|
|
172
|
+
before passing the code to **pycparser**; see the previous sections for more
|
|
173
|
+
details.
|
|
174
|
+
|
|
175
|
+
For example, to parse C23 source with a preprocessor that supports ``-std=c23``::
|
|
176
|
+
|
|
177
|
+
from pycparser import CParser, parse_file
|
|
178
|
+
|
|
179
|
+
ast = parse_file(
|
|
180
|
+
"example.c",
|
|
181
|
+
use_cpp=True,
|
|
182
|
+
cpp_args=["-std=c23"],
|
|
183
|
+
parser=CParser(dialect="c23"),
|
|
184
|
+
)
|
|
185
|
+
|
|
186
|
+
The parser's dialect does not configure the external preprocessor; select its
|
|
187
|
+
language mode separately through ``cpp_args``.
|
|
188
|
+
|
|
189
|
+
.. |examples| replace:: ``examples``
|
|
190
|
+
.. _examples: examples
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
Advanced usage
|
|
194
|
+
--------------
|
|
195
|
+
|
|
196
|
+
The public interface of **pycparser** is well documented with comments in
|
|
197
|
+
``pycparser/c_parser.py``. For a detailed overview of the various AST nodes
|
|
198
|
+
created by the parser, see ``pycparser/_c_ast.cfg``.
|
|
199
|
+
|
|
200
|
+
The root node is a ``FileAST``, whose ``ext`` attribute is a list of top-level
|
|
201
|
+
declarations and function definitions. Explore nodes through their named fields,
|
|
202
|
+
and use ``show()`` on a subtree to inspect just that part of the AST::
|
|
203
|
+
|
|
204
|
+
from pycparser import CParser
|
|
205
|
+
|
|
206
|
+
ast = CParser().parse("int x; int f(void) { return x; }")
|
|
207
|
+
print(len(ast.ext)) # 2
|
|
208
|
+
func = ast.ext[1]
|
|
209
|
+
func.body.show()
|
|
210
|
+
|
|
211
|
+
For generic exploration, call ``children()`` to get a tuple of ``(field_name,
|
|
212
|
+
child_node)`` pairs for the immediate children. The tuple supports length and
|
|
213
|
+
indexing directly::
|
|
214
|
+
|
|
215
|
+
children = func.children()
|
|
216
|
+
print(len(children)) # 2: decl and body
|
|
217
|
+
name, child = children[0]
|
|
218
|
+
print(name) # decl
|
|
219
|
+
child.show()
|
|
220
|
+
|
|
221
|
+
Iterating over a node directly (``for child in node``) yields just the child
|
|
222
|
+
nodes, without their names. For a guided walkthrough, see
|
|
223
|
+
`examples/explore_ast.py <examples/explore_ast.py>`_; for recursive traversal,
|
|
224
|
+
see the ``NodeVisitor`` example in `examples/func_defs.py <examples/func_defs.py>`_.
|
|
225
|
+
|
|
226
|
+
There's also a `FAQ available here <https://github.com/eliben/pycparser/wiki/FAQ>`_.
|
|
227
|
+
In any case, you can always drop me an `email <eliben@gmail.com>`_ for help.
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
Modifying
|
|
231
|
+
=========
|
|
232
|
+
|
|
233
|
+
There are a few points to keep in mind when modifying **pycparser**:
|
|
234
|
+
|
|
235
|
+
* The code for **pycparser**'s AST nodes is automatically generated from a
|
|
236
|
+
configuration file - ``_c_ast.cfg``, by ``_ast_gen.py``. If you modify the AST
|
|
237
|
+
configuration or the generator, run ``make regen-ast`` from the repository
|
|
238
|
+
root to re-generate ``pycparser/c_ast.py`` and run ``make format``.
|
|
239
|
+
* Read the docstring in the constructor of the ``CParser`` class for details
|
|
240
|
+
on configuration and compatibility arguments.
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
Package contents
|
|
244
|
+
================
|
|
245
|
+
|
|
246
|
+
Once you unzip the ``pycparser`` package, you'll see the following files and
|
|
247
|
+
directories:
|
|
248
|
+
|
|
249
|
+
README.rst:
|
|
250
|
+
This README file.
|
|
251
|
+
|
|
252
|
+
LICENSE:
|
|
253
|
+
The pycparser license
|
|
254
|
+
|
|
255
|
+
setup.py:
|
|
256
|
+
Legacy installation script (build metadata lives in ``pyproject.toml``).
|
|
257
|
+
|
|
258
|
+
pyproject.toml:
|
|
259
|
+
Package metadata and build configuration.
|
|
260
|
+
|
|
261
|
+
examples/:
|
|
262
|
+
A directory with some examples of using **pycparser**
|
|
263
|
+
|
|
264
|
+
pycparser/:
|
|
265
|
+
The **pycparser** module source code.
|
|
266
|
+
|
|
267
|
+
tests/:
|
|
268
|
+
Unit tests.
|
|
269
|
+
|
|
270
|
+
utils/fake_libc_include:
|
|
271
|
+
Minimal standard C library include files that should allow to parse any C code.
|
|
272
|
+
Note that these headers now include C11 code, so they may not work when the
|
|
273
|
+
preprocessor is configured to an earlier C standard (like ``-std=c99``).
|
|
274
|
+
|
|
275
|
+
utils/internal/:
|
|
276
|
+
Internal utilities for my own use. You probably don't need them.
|
|
277
|
+
|
|
278
|
+
|
|
279
|
+
Contributors
|
|
280
|
+
============
|
|
281
|
+
|
|
282
|
+
Some people have contributed to **pycparser** by opening issues on bugs they've
|
|
283
|
+
found and/or submitting patches. The list of contributors is in the CONTRIBUTORS
|
|
284
|
+
file in the source distribution. After **pycparser** moved to Github I stopped
|
|
285
|
+
updating this list because Github does a much better job at tracking
|
|
286
|
+
contributions.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
pycparser -- A C parser in Python
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2008-2027, Eli Bendersky
|
|
4
|
+
All rights reserved.
|
|
5
|
+
|
|
6
|
+
Redistribution and use in source and binary forms, with or without modification,
|
|
7
|
+
are permitted provided that the following conditions are met:
|
|
8
|
+
|
|
9
|
+
* Redistributions of source code must retain the above copyright notice, this
|
|
10
|
+
list of conditions and the following disclaimer.
|
|
11
|
+
* Redistributions in binary form must reproduce the above copyright notice,
|
|
12
|
+
this list of conditions and the following disclaimer in the documentation
|
|
13
|
+
and/or other materials provided with the distribution.
|
|
14
|
+
* Neither the name of the copyright holder nor the names of its contributors may
|
|
15
|
+
be used to endorse or promote products derived from this software without
|
|
16
|
+
specific prior written permission.
|
|
17
|
+
|
|
18
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
19
|
+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
20
|
+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
21
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
|
22
|
+
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
23
|
+
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
|
24
|
+
GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
25
|
+
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
26
|
+
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
|
27
|
+
OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|