omcore-mypyc 0.0.42__tar.gz

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.
Files changed (139) hide show
  1. omcore_mypyc-0.0.42/LICENSE +21 -0
  2. omcore_mypyc-0.0.42/MANIFEST.in +7 -0
  3. omcore_mypyc-0.0.42/PKG-INFO +209 -0
  4. omcore_mypyc-0.0.42/README.md +189 -0
  5. omcore_mypyc-0.0.42/omcore/__about__.py +202 -0
  6. omcore_mypyc-0.0.42/omcore/__init__.py +3 -0
  7. omcore_mypyc-0.0.42/omcore/c3.py +200 -0
  8. omcore_mypyc-0.0.42/omcore/cached.py +19 -0
  9. omcore_mypyc-0.0.42/omcore/check.py +356 -0
  10. omcore_mypyc-0.0.42/omcore/contextual.py +42 -0
  11. omcore_mypyc-0.0.42/omcore/datetimes.py +76 -0
  12. omcore_mypyc-0.0.42/omcore/lang/__init__.py +719 -0
  13. omcore_mypyc-0.0.42/omcore/lang/asyncs.py +97 -0
  14. omcore_mypyc-0.0.42/omcore/lang/attrstorage.py +234 -0
  15. omcore_mypyc-0.0.42/omcore/lang/cached/__init__.py +0 -0
  16. omcore_mypyc-0.0.42/omcore/lang/cached/function.py +1354 -0
  17. omcore_mypyc-0.0.42/omcore/lang/cached/property.py +116 -0
  18. omcore_mypyc-0.0.42/omcore/lang/casing.py +336 -0
  19. omcore_mypyc-0.0.42/omcore/lang/cells.py +99 -0
  20. omcore_mypyc-0.0.42/omcore/lang/classes/__init__.py +0 -0
  21. omcore_mypyc-0.0.42/omcore/lang/classes/abstract.py +71 -0
  22. omcore_mypyc-0.0.42/omcore/lang/classes/bindable.py +42 -0
  23. omcore_mypyc-0.0.42/omcore/lang/classes/intersections.py +70 -0
  24. omcore_mypyc-0.0.42/omcore/lang/classes/mro.py +281 -0
  25. omcore_mypyc-0.0.42/omcore/lang/classes/namespaces.py +133 -0
  26. omcore_mypyc-0.0.42/omcore/lang/classes/protocols.py +26 -0
  27. omcore_mypyc-0.0.42/omcore/lang/classes/restrict.py +209 -0
  28. omcore_mypyc-0.0.42/omcore/lang/classes/simple.py +132 -0
  29. omcore_mypyc-0.0.42/omcore/lang/classes/virtual.py +132 -0
  30. omcore_mypyc-0.0.42/omcore/lang/clsdct.py +80 -0
  31. omcore_mypyc-0.0.42/omcore/lang/collections.py +120 -0
  32. omcore_mypyc-0.0.42/omcore/lang/comparison.py +111 -0
  33. omcore_mypyc-0.0.42/omcore/lang/contextmanagers.py +446 -0
  34. omcore_mypyc-0.0.42/omcore/lang/datetimes.py +26 -0
  35. omcore_mypyc-0.0.42/omcore/lang/descriptors.py +273 -0
  36. omcore_mypyc-0.0.42/omcore/lang/enums.py +8 -0
  37. omcore_mypyc-0.0.42/omcore/lang/errors.py +2 -0
  38. omcore_mypyc-0.0.42/omcore/lang/functions.py +367 -0
  39. omcore_mypyc-0.0.42/omcore/lang/generators.py +237 -0
  40. omcore_mypyc-0.0.42/omcore/lang/imports/__init__.py +0 -0
  41. omcore_mypyc-0.0.42/omcore/lang/imports/capture.py +902 -0
  42. omcore_mypyc-0.0.42/omcore/lang/imports/conditional.py +33 -0
  43. omcore_mypyc-0.0.42/omcore/lang/imports/lazy.py +41 -0
  44. omcore_mypyc-0.0.42/omcore/lang/imports/proxy.py +561 -0
  45. omcore_mypyc-0.0.42/omcore/lang/imports/resolving.py +89 -0
  46. omcore_mypyc-0.0.42/omcore/lang/imports/traversal.py +104 -0
  47. omcore_mypyc-0.0.42/omcore/lang/iterables.py +256 -0
  48. omcore_mypyc-0.0.42/omcore/lang/lazyglobals.py +101 -0
  49. omcore_mypyc-0.0.42/omcore/lang/maybes.py +9 -0
  50. omcore_mypyc-0.0.42/omcore/lang/objects.py +309 -0
  51. omcore_mypyc-0.0.42/omcore/lang/outcomes.py +308 -0
  52. omcore_mypyc-0.0.42/omcore/lang/overrides.py +118 -0
  53. omcore_mypyc-0.0.42/omcore/lang/params.py +295 -0
  54. omcore_mypyc-0.0.42/omcore/lang/recursion.py +109 -0
  55. omcore_mypyc-0.0.42/omcore/lang/resolving.py +147 -0
  56. omcore_mypyc-0.0.42/omcore/lang/resources.py +110 -0
  57. omcore_mypyc-0.0.42/omcore/lang/sequences.py +179 -0
  58. omcore_mypyc-0.0.42/omcore/lang/statics.py +48 -0
  59. omcore_mypyc-0.0.42/omcore/lang/strings.py +141 -0
  60. omcore_mypyc-0.0.42/omcore/lang/sys.py +19 -0
  61. omcore_mypyc-0.0.42/omcore/lang/typing.py +215 -0
  62. omcore_mypyc-0.0.42/omcore/lang/unicode.py +97 -0
  63. omcore_mypyc-0.0.42/omcore/lang/units.py +406 -0
  64. omcore_mypyc-0.0.42/omcore/libc.py +551 -0
  65. omcore_mypyc-0.0.42/omcore/lite/__init__.py +5 -0
  66. omcore_mypyc-0.0.42/omcore/lite/abstract.py +149 -0
  67. omcore_mypyc-0.0.42/omcore/lite/args.py +63 -0
  68. omcore_mypyc-0.0.42/omcore/lite/asyncs.py +146 -0
  69. omcore_mypyc-0.0.42/omcore/lite/attrops.py +415 -0
  70. omcore_mypyc-0.0.42/omcore/lite/bytes.py +59 -0
  71. omcore_mypyc-0.0.42/omcore/lite/cached.py +118 -0
  72. omcore_mypyc-0.0.42/omcore/lite/check.py +591 -0
  73. omcore_mypyc-0.0.42/omcore/lite/configs.py +38 -0
  74. omcore_mypyc-0.0.42/omcore/lite/contextmanagers.py +207 -0
  75. omcore_mypyc-0.0.42/omcore/lite/contextual.py +327 -0
  76. omcore_mypyc-0.0.42/omcore/lite/dataclasses.py +298 -0
  77. omcore_mypyc-0.0.42/omcore/lite/imports.py +47 -0
  78. omcore_mypyc-0.0.42/omcore/lite/inject.py +1056 -0
  79. omcore_mypyc-0.0.42/omcore/lite/injectinspect.py +100 -0
  80. omcore_mypyc-0.0.42/omcore/lite/io.py +12 -0
  81. omcore_mypyc-0.0.42/omcore/lite/json.py +97 -0
  82. omcore_mypyc-0.0.42/omcore/lite/marshal.py +846 -0
  83. omcore_mypyc-0.0.42/omcore/lite/maybes.py +225 -0
  84. omcore_mypyc-0.0.42/omcore/lite/namespaces.py +9 -0
  85. omcore_mypyc-0.0.42/omcore/lite/objects.py +81 -0
  86. omcore_mypyc-0.0.42/omcore/lite/pycharm.py +54 -0
  87. omcore_mypyc-0.0.42/omcore/lite/reflect.py +94 -0
  88. omcore_mypyc-0.0.42/omcore/lite/resources.py +8 -0
  89. omcore_mypyc-0.0.42/omcore/lite/runtime.py +20 -0
  90. omcore_mypyc-0.0.42/omcore/lite/secrets.py +40 -0
  91. omcore_mypyc-0.0.42/omcore/lite/strings.py +90 -0
  92. omcore_mypyc-0.0.42/omcore/lite/timeouts.py +234 -0
  93. omcore_mypyc-0.0.42/omcore/lite/timing.py +11 -0
  94. omcore_mypyc-0.0.42/omcore/lite/typemaps.py +150 -0
  95. omcore_mypyc-0.0.42/omcore/lite/types.py +9 -0
  96. omcore_mypyc-0.0.42/omcore/lite/typing.py +118 -0
  97. omcore_mypyc-0.0.42/omcore/lite/wrappers.py +23 -0
  98. omcore_mypyc-0.0.42/omcore/metadata.py +362 -0
  99. omcore_mypyc-0.0.42/omcore/re.py +62 -0
  100. omcore_mypyc-0.0.42/omcore/reflect/__init__.py +231 -0
  101. omcore_mypyc-0.0.42/omcore/reflect/_mirror.py +1574 -0
  102. omcore_mypyc-0.0.42/omcore/reflect/annotations.py +279 -0
  103. omcore_mypyc-0.0.42/omcore/reflect/core/__init__.py +0 -0
  104. omcore_mypyc-0.0.42/omcore/reflect/core/_mypycshim.py +17 -0
  105. omcore_mypyc-0.0.42/omcore/reflect/core/compat.py +17 -0
  106. omcore_mypyc-0.0.42/omcore/reflect/core/constraints.py +635 -0
  107. omcore_mypyc-0.0.42/omcore/reflect/core/copytype.py +43 -0
  108. omcore_mypyc-0.0.42/omcore/reflect/core/expandtype.py +112 -0
  109. omcore_mypyc-0.0.42/omcore/reflect/core/join.py +299 -0
  110. omcore_mypyc-0.0.42/omcore/reflect/core/meet.py +349 -0
  111. omcore_mypyc-0.0.42/omcore/reflect/core/solve.py +169 -0
  112. omcore_mypyc-0.0.42/omcore/reflect/core/strconv.py +251 -0
  113. omcore_mypyc-0.0.42/omcore/reflect/core/substitute.py +35 -0
  114. omcore_mypyc-0.0.42/omcore/reflect/core/subtypes.py +1129 -0
  115. omcore_mypyc-0.0.42/omcore/reflect/core/symbols.py +202 -0
  116. omcore_mypyc-0.0.42/omcore/reflect/core/typekeys.py +1348 -0
  117. omcore_mypyc-0.0.42/omcore/reflect/core/typeops.py +431 -0
  118. omcore_mypyc-0.0.42/omcore/reflect/core/types.py +1364 -0
  119. omcore_mypyc-0.0.42/omcore/reflect/core/typetraverser.py +157 -0
  120. omcore_mypyc-0.0.42/omcore/reflect/core/typevisitor.py +657 -0
  121. omcore_mypyc-0.0.42/omcore/reflect/dataclasses.py +125 -0
  122. omcore_mypyc-0.0.42/omcore/reflect/errors.py +50 -0
  123. omcore_mypyc-0.0.42/omcore/reflect/globals.py +76 -0
  124. omcore_mypyc-0.0.42/omcore/reflect/internals.py +26 -0
  125. omcore_mypyc-0.0.42/omcore/reflect/known.py +390 -0
  126. omcore_mypyc-0.0.42/omcore/reflect/members.py +309 -0
  127. omcore_mypyc-0.0.42/omcore/reflect/mirror.py +72 -0
  128. omcore_mypyc-0.0.42/omcore/reflect/namedtuples.py +123 -0
  129. omcore_mypyc-0.0.42/omcore/reflect/ops.py +78 -0
  130. omcore_mypyc-0.0.42/omcore/runmodule.py +31 -0
  131. omcore_mypyc-0.0.42/omcore/shlex.py +16 -0
  132. omcore_mypyc-0.0.42/omcore_mypyc.egg-info/PKG-INFO +209 -0
  133. omcore_mypyc-0.0.42/omcore_mypyc.egg-info/SOURCES.txt +137 -0
  134. omcore_mypyc-0.0.42/omcore_mypyc.egg-info/dependency_links.txt +1 -0
  135. omcore_mypyc-0.0.42/omcore_mypyc.egg-info/requires.txt +2 -0
  136. omcore_mypyc-0.0.42/omcore_mypyc.egg-info/top_level.txt +2 -0
  137. omcore_mypyc-0.0.42/pyproject.toml +47 -0
  138. omcore_mypyc-0.0.42/setup.cfg +4 -0
  139. omcore_mypyc-0.0.42/setup.py +28 -0
@@ -0,0 +1,21 @@
1
+ Copyright 2023- wrmsr
2
+
3
+ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
4
+ following conditions are met:
5
+
6
+ 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following
7
+ disclaimer.
8
+
9
+ 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following
10
+ disclaimer in the documentation and/or other materials provided with the distribution.
11
+
12
+ 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products
13
+ derived from this software without specific prior written permission.
14
+
15
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
16
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
17
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
18
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
19
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
20
+ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
21
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,7 @@
1
+ recursive-include omcore/lang *.py
2
+ recursive-include omcore/lite *.py
3
+ recursive-include omcore/reflect/core *.py
4
+ include omcore/*.py
5
+ include omcore/reflect/*.py
6
+ recursive-exclude **/tests *.py
7
+ global-exclude **/conftest.py
@@ -0,0 +1,209 @@
1
+ Metadata-Version: 2.4
2
+ Name: omcore-mypyc
3
+ Version: 0.0.42
4
+ Summary: omcore
5
+ Author: wrmsr
6
+ License-Expression: BSD-3-Clause
7
+ Project-URL: source, https://github.com/wrmsr/om
8
+ Classifier: Intended Audience :: Developers
9
+ Classifier: Operating System :: OS Independent
10
+ Classifier: Operating System :: POSIX
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Programming Language :: Python :: 3.14
13
+ Classifier: Programming Language :: Python :: 3.15
14
+ Requires-Python: >=3.14
15
+ Description-Content-Type: text/markdown
16
+ License-File: LICENSE
17
+ Requires-Dist: omcore==0.0.42
18
+ Requires-Dist: librt
19
+ Dynamic: license-file
20
+
21
+ # Overview
22
+
23
+ Core utilities and foundational code. It's relatively large but completely self-contained, and has **no required
24
+ dependencies of any kind**.
25
+
26
+ # Notable packages
27
+
28
+ - **[lang](https://github.com/wrmsr/om/blob/master/omcore/lang)** - The standard library of this standard library.
29
+ Usually imported as a whole (`from omcore import lang`), it contains an array of general purpose utilities used
30
+ practically everywhere. It is kept relatively lightweight: its heaviest import is stdlib dataclasses and its
31
+ transitives. Some of its contents include:
32
+
33
+ - **[cached](https://github.com/wrmsr/om/blob/master/omcore/lang/cached)** - The standard `cached_function` /
34
+ `cached_property` tools, which are more capable than
35
+ [`functools.lru_cache`](https://docs.python.org/3/library/functools.html#functools.lru_cache).
36
+ - **[imports](https://github.com/wrmsr/om/blob/master/omcore/lang/imports.py)** - Import tools like:
37
+ - `proxy_import` - For late-loaded imports.
38
+ - `proxy_init` - For late-loaded module globals.
39
+ - `auto_proxy_init` - For automatic late-loaded package exports.
40
+ - **[classes](https://github.com/wrmsr/om/blob/master/omcore/lang/classes)** - Class tools and bases, such as
41
+ `Abstract` (which checks at subclass definition not instantiation), `Sealed` / `PackageSealed`, and `Final`.
42
+ - **[maybes](https://github.com/wrmsr/om/blob/master/omcore/lite/maybes.py)** - A simple, nestable formalization of
43
+ the presence or absence of an object, as in [many](https://en.cppreference.com/w/cpp/utility/optional)
44
+ [other](https://docs.oracle.com/javase/8/docs/api/java/util/Optional.html)
45
+ [languages](https://doc.rust-lang.org/std/option/).
46
+
47
+ - **[bootstrap](https://github.com/wrmsr/om/blob/master/omcore/bootstrap)** - A centralized, configurable, all-in-one
48
+ collection of various process-initialization minutiae like resource limiting, profiling, remote debugging, log
49
+ configuration, environment variables, et cetera. Usable as a context manager or via its
50
+ [cli](https://github.com/wrmsr/om/blob/master/omcore/bootstrap/main.py).
51
+
52
+ - **[collections](https://github.com/wrmsr/om/blob/master/omcore/collections)** - A handful of collection utilities and
53
+ simple implementations, including:
54
+
55
+ - **[cache](https://github.com/wrmsr/om/blob/master/omcore/collections/cache)** - A configurable LRU / LFU cache with
56
+ options like ttl and max size / weight.
57
+ - **[hasheq](https://github.com/wrmsr/om/blob/master/omcore/collections/hasheq.py)** - A dict taking an external
58
+ `__hash__` / `__eq__` implementation.
59
+ - **[identity](https://github.com/wrmsr/om/blob/master/omcore/collections/identity.py)** - Identity-keyed collections.
60
+ - **[sorted](https://github.com/wrmsr/om/blob/master/omcore/collections/sorted)** - Interfaces for value-sorted
61
+ collections and key-sorted mappings, and a simple but correct skiplist-backed implementation.
62
+ - **[persistent](https://github.com/wrmsr/om/blob/master/omcore/collections/persistent)** - Interfaces for
63
+ [persistent](https://en.wikipedia.org/wiki/Persistent_data_structure) maps, and a simple but correct treap-backed
64
+ implementation.
65
+
66
+ - **[dataclasses](https://github.com/wrmsr/om/blob/master/omcore/dataclasses)** - A fully-compatible reimplementation of
67
+ stdlib [dataclasses](https://docs.python.org/3/library/dataclasses.html) with numerous enhancements and additional
68
+ features. The [full stdlib test suite](https://github.com/wrmsr/om/blob/master/omcore/dataclasses/tests/cpython) is
69
+ run against it ensuring compatibility - they *are* dataclasses. Current enhancements include:
70
+
71
+ - Simple field coercion and validation.
72
+ - Any number of `@dc.init` or `@dc.validate` methods, not just a central `__post_init__`.
73
+ - Optional generic type parameter substitution in generated `__init__` methods, enabling accurate reflection.
74
+ - An optional [metaclass](https://github.com/wrmsr/om/blob/master/omcore/dataclasses/metaclass) which removes the need
75
+ for re-decorating subclasses (with support for inheritance of dataclass parameters like `frozen`), and some basic
76
+ [base classes](https://github.com/wrmsr/om/blob/master/omcore/dataclasses/metaclass/bases.py).
77
+ - Support for ahead-of-time / build-time code generation, significantly reducing import times.
78
+
79
+ The stdlib-equivalent api is exported in such a way as to appear to be direct aliases for the stdlib api itself,
80
+ simplifying tool support.
81
+
82
+ - **[dispatch](https://github.com/wrmsr/om/blob/master/omcore/dispatch)** - A beefed-up version of
83
+ [functools.singledispatch](https://docs.python.org/3/library/functools.html#functools.singledispatch), most notably
84
+ supporting MRO-honoring method impl dispatch.
85
+
86
+ - **[formats](https://github.com/wrmsr/om/blob/master/omcore/formats)** - Tools for various data formats, including:
87
+
88
+ - **[json](https://github.com/wrmsr/om/blob/master/omcore/formats/json)** - Tools for json, including abstraction over
89
+ various backends and a self-contained streaming / incremental parser.
90
+ - **[json5](https://github.com/wrmsr/om/blob/master/omcore/formats/json5)** - A self-contained and tested
91
+ [Json5](https://json5.org/) parser.
92
+ - **[toml](https://github.com/wrmsr/om/blob/master/omcore/formats/toml)** - Toml tools, including a [lite](#lite-code)
93
+ version of the stdlib parser (for use in older pythons).
94
+ - **[goyaml](https://github.com/wrmsr/om/blob/master/omcore/formats/yaml/goyaml)** - A **manual**, near-direct,
95
+ 'lite'-compatible translation of [go-yaml](https://github.com/goccy/go-yaml/).
96
+
97
+ https://github.com/goccy/go-yaml/tree/8dd51ebb7f36f616b85f7b0e54539afa4341f22a
98
+
99
+ - **[http](https://github.com/wrmsr/om/blob/master/omcore/http)** - HTTP code, including:
100
+
101
+ - **[clients](https://github.com/wrmsr/om/blob/master/omcore/http/clients)** - An abstraction over HTTP clients, with
102
+ urllib and httpx implementations.
103
+
104
+ - **[inject](https://github.com/wrmsr/om/blob/master/omcore/inject)** - A [guice](https://github.com/google/guice)-style
105
+ dependency injector.
106
+
107
+ - **[io](https://github.com/wrmsr/om/blob/master/omcore/io)** - IO tools, including:
108
+
109
+ - **[compress](https://github.com/wrmsr/om/blob/master/omcore/io/compress)** - Abstraction over various compression
110
+ schemes, with particular attention to incremental operation. For example it includes [an incremental reformulation
111
+ of stdlib's gzip](https://github.com/wrmsr/om/blob/master/omcore/io/compress/gzip.py).
112
+ - **[fdio](https://github.com/wrmsr/om/blob/master/omcore/io/fdio)** - An implementation of classic
113
+ [selector](https://docs.python.org/3/library/selectors.html)-style IO dispatch, akin to the deprecated
114
+ [asyncore](https://docs.python.org/3.11/library/asyncore.html). While more modern asyncio style code is generally
115
+ preferred, it nearly always involves [background
116
+ threads](https://github.com/python/cpython/blob/95d9dea1c4ed1b1de80074b74301cee0b38d5541/Lib/asyncio/uni
117
+ x_events.py#L1349) making it [unsuitable for forking processes](https://rachelbythebay.com/w/2011/06/07/forked/).
118
+
119
+ - **[jmespath](https://github.com/wrmsr/om/blob/master/omcore/specs/jmespath)** - A vendoring of [jmespath community
120
+ edition](https://github.com/jmespath-community/python-jmespath), modernized and adapted to this codebase.
121
+
122
+ - **[marshal](https://github.com/wrmsr/om/blob/master/omcore/marshal)** - A
123
+ [jackson](https://github.com/FasterXML/jackson)-style serde system.
124
+
125
+ - **[manifests](https://github.com/wrmsr/om/blob/master/omcore/manifests)** - A system for sharing lightweight metadata
126
+ within / across codebases.
127
+
128
+ - **[reflect](https://github.com/wrmsr/om/blob/master/omcore/reflect)** - Reflection utilities, including primarily a
129
+ formalization of stdlib type annotations for use at runtime, decoupled from stdlib impl detail. Keeping this working
130
+ is notoriously difficult across python versions (one of the primary reasons for only supporting 3.14+).
131
+
132
+ - **[sql](https://github.com/wrmsr/om/blob/master/omcore/sql)** - A collection of SQL utilities, including:
133
+
134
+ - **[api](https://github.com/wrmsr/om/blob/master/omcore/sql/api)** - An abstracted api for SQL interaction, with
135
+ support for dbapi compatible drivers (and a SQLAlchemy adapter).
136
+ - **[queries](https://github.com/wrmsr/om/blob/master/omcore/sql/queries)** - A SQL query builder with a fluent
137
+ interface.
138
+ - **[alchemy](https://github.com/wrmsr/om/blob/master/omcore/sql/alchemy)** - SQLAlchemy utilities. The codebase has
139
+ moved away from SQLAlchemy in favor of its own internal SQL api, but it will likely still remain as an optional dep
140
+ for the api adapter.
141
+
142
+ - **[testing](https://github.com/wrmsr/om/blob/master/omcore/testing)** - Test - primarily pytest - helpers, including:
143
+
144
+ - **['harness'](https://github.com/wrmsr/om/blob/master/omcore/testing/pytest/inject/harness.py)** - An all-in-one
145
+ fixture marrying it to the codebase's dependency injector.
146
+ - **[plugins/async](https://github.com/wrmsr/om/blob/master/omcore/testing/pytest/plugins/asyncs)** - An in-house
147
+ async-backend abstraction plugin, capable of handling all of asyncio / trio / trio-asyncio /
148
+ *any-future-event-loop-impl* without having multiple fighting plugins (*[I know, I know](https://xkcd.com/927/)*).
149
+ - **[plugins](https://github.com/wrmsr/om/blob/master/omcore/testing/pytest/plugins)** - Various other plugins.
150
+
151
+ - **[typedvalues](https://github.com/wrmsr/om/blob/master/omcore/typedvalues)** - A little toolkit around 'boxed'
152
+ values, whose 'box' types convey more information than the bare values themselves. A rebellion against kwargs / env
153
+ vars / giant config objects: instead of `foo(bar=1, baz=2)`, you do `foo(Bar(1), Baz(2))`.
154
+
155
+ - **[lite](https://github.com/wrmsr/om/blob/master/omcore/lite)** - The standard library of 'lite' code. This is the
156
+ only package beneath `lang`, and parts of it are re-exported by it for deduplication. On top of miscellaneous
157
+ utilities it contains a handful of independent, self-contained, significantly simplified 'lite' equivalents of some
158
+ major core packages:
159
+
160
+ - **[lite/inject.py](https://github.com/wrmsr/om/blob/master/omcore/lite/inject.py)** - The lite injector, which is
161
+ more conservative with features and reflection than the core injector. The codebase's
162
+ [MiniGuice](https://github.com/google/guice/commit/70248eafa90cd70a68b293763e53f6aec656e73c).
163
+ - **[lite/marshal.py](https://github.com/wrmsr/om/blob/master/omcore/lite/marshal.py)** - The lite marshalling system,
164
+ which is a classic canned setup of simple type-specific 2-method classes and limited generic handling.
165
+
166
+ # Lite code
167
+
168
+ A subset of this codebase is written in a 'lite' style (non-'lite' code is referred to as *standard* code). While
169
+ standard code is written for python 3.14+, 'lite' code is written for 3.8+, and is written in a style conducive to
170
+ [amalgamation](https://github.com/wrmsr/om/blob/master/omdev#amalgamation) in which multiple python source files are
171
+ stitched together into one single self-contained python script.
172
+
173
+ Code written in this style has notable differences from standard code, including (but not limited to):
174
+
175
+ - No name mangling is done in amalgamation, which means (among other things) that code must be written expecting to be
176
+ all dumped into the same giant namespace. Where a standard class might be
177
+ [`omcore.inject.keys.Key`](https://github.com/wrmsr/om/blob/master/omcore/inject/keys.py), a lite equivalent might be
178
+ [`omcore.lite.inject.InjectorKey`](https://github.com/wrmsr/om/blob/master/omcore/lite/inject.py).
179
+ - All internal imports `import` each individual item out of modules rather than importing the modules and referencing
180
+ their contents. Where standard code would `from .. import x; x.y`, lite code would `from ..x import y; y`. As a result
181
+ there are frequently 'api' non-instantiated namespace classes serving the purpose of modules - just handy bags of
182
+ stuff with shortened names.
183
+ - As lite code is tested in 3.8+ but core code requires 3.14+, packages containing lite code can't import anything
184
+ standard in their (and their ancestors') `__init__.py`'s. Furthermore, `__init__.py` files are omitted outright in
185
+ amalgamation, so they effectively must be empty in any package containing any lite code. As a result there are
186
+ frequently [`all.py`](https://github.com/wrmsr/om/blob/master/omcore/configs/all.py) files in mixed-lite packages
187
+ which serve the purpose of `__init__.py` for standard usage - where importing standard packages from standard code
188
+ would be done via `from .. import lang`, importing mixed-lite packages from standard code would be done via `from
189
+ ..configs import all as cfgs`.
190
+
191
+ # Dependencies
192
+
193
+ This library has no required dependencies of any kind, but there are some optional integrations - see
194
+ [`__about__.py`](https://github.com/wrmsr/om/blob/master/omcore/__about__.py) for a full list, but some specific
195
+ examples are:
196
+
197
+ - **asttokens / executing** - For getting runtime source representations of function call arguments, an optional
198
+ capability of [check](https://github.com/wrmsr/om/blob/master/omcore/check.py).
199
+ - **pytest** - What is used for all standard testing - as lite code has no dependencies of any kind its testing uses
200
+ stdlib's [unittest](https://docs.python.org/3/library/unittest.html).
201
+ - **anyio** - While lite code must use only asyncio, some async standard code sometimes is written to anyio.
202
+ - **sqlalchemy** - The codebase has migrated away from SQLAlchemy in favor of the internal api but it retains it as an
203
+ optional dep to support adapting the internal api to it.
204
+
205
+ Additionally, some catchall dep categories include:
206
+
207
+ - **compression** - Various preferred compression backends like lz4, python-snappy, and brotli.
208
+ - **formats** - Various preferred data format backends like orjson/ujson, pyyaml, cbor2, and cloudpickle.
209
+ - **sql drivers** - Various preferred and tested sql drivers.
@@ -0,0 +1,189 @@
1
+ # Overview
2
+
3
+ Core utilities and foundational code. It's relatively large but completely self-contained, and has **no required
4
+ dependencies of any kind**.
5
+
6
+ # Notable packages
7
+
8
+ - **[lang](https://github.com/wrmsr/om/blob/master/omcore/lang)** - The standard library of this standard library.
9
+ Usually imported as a whole (`from omcore import lang`), it contains an array of general purpose utilities used
10
+ practically everywhere. It is kept relatively lightweight: its heaviest import is stdlib dataclasses and its
11
+ transitives. Some of its contents include:
12
+
13
+ - **[cached](https://github.com/wrmsr/om/blob/master/omcore/lang/cached)** - The standard `cached_function` /
14
+ `cached_property` tools, which are more capable than
15
+ [`functools.lru_cache`](https://docs.python.org/3/library/functools.html#functools.lru_cache).
16
+ - **[imports](https://github.com/wrmsr/om/blob/master/omcore/lang/imports.py)** - Import tools like:
17
+ - `proxy_import` - For late-loaded imports.
18
+ - `proxy_init` - For late-loaded module globals.
19
+ - `auto_proxy_init` - For automatic late-loaded package exports.
20
+ - **[classes](https://github.com/wrmsr/om/blob/master/omcore/lang/classes)** - Class tools and bases, such as
21
+ `Abstract` (which checks at subclass definition not instantiation), `Sealed` / `PackageSealed`, and `Final`.
22
+ - **[maybes](https://github.com/wrmsr/om/blob/master/omcore/lite/maybes.py)** - A simple, nestable formalization of
23
+ the presence or absence of an object, as in [many](https://en.cppreference.com/w/cpp/utility/optional)
24
+ [other](https://docs.oracle.com/javase/8/docs/api/java/util/Optional.html)
25
+ [languages](https://doc.rust-lang.org/std/option/).
26
+
27
+ - **[bootstrap](https://github.com/wrmsr/om/blob/master/omcore/bootstrap)** - A centralized, configurable, all-in-one
28
+ collection of various process-initialization minutiae like resource limiting, profiling, remote debugging, log
29
+ configuration, environment variables, et cetera. Usable as a context manager or via its
30
+ [cli](https://github.com/wrmsr/om/blob/master/omcore/bootstrap/main.py).
31
+
32
+ - **[collections](https://github.com/wrmsr/om/blob/master/omcore/collections)** - A handful of collection utilities and
33
+ simple implementations, including:
34
+
35
+ - **[cache](https://github.com/wrmsr/om/blob/master/omcore/collections/cache)** - A configurable LRU / LFU cache with
36
+ options like ttl and max size / weight.
37
+ - **[hasheq](https://github.com/wrmsr/om/blob/master/omcore/collections/hasheq.py)** - A dict taking an external
38
+ `__hash__` / `__eq__` implementation.
39
+ - **[identity](https://github.com/wrmsr/om/blob/master/omcore/collections/identity.py)** - Identity-keyed collections.
40
+ - **[sorted](https://github.com/wrmsr/om/blob/master/omcore/collections/sorted)** - Interfaces for value-sorted
41
+ collections and key-sorted mappings, and a simple but correct skiplist-backed implementation.
42
+ - **[persistent](https://github.com/wrmsr/om/blob/master/omcore/collections/persistent)** - Interfaces for
43
+ [persistent](https://en.wikipedia.org/wiki/Persistent_data_structure) maps, and a simple but correct treap-backed
44
+ implementation.
45
+
46
+ - **[dataclasses](https://github.com/wrmsr/om/blob/master/omcore/dataclasses)** - A fully-compatible reimplementation of
47
+ stdlib [dataclasses](https://docs.python.org/3/library/dataclasses.html) with numerous enhancements and additional
48
+ features. The [full stdlib test suite](https://github.com/wrmsr/om/blob/master/omcore/dataclasses/tests/cpython) is
49
+ run against it ensuring compatibility - they *are* dataclasses. Current enhancements include:
50
+
51
+ - Simple field coercion and validation.
52
+ - Any number of `@dc.init` or `@dc.validate` methods, not just a central `__post_init__`.
53
+ - Optional generic type parameter substitution in generated `__init__` methods, enabling accurate reflection.
54
+ - An optional [metaclass](https://github.com/wrmsr/om/blob/master/omcore/dataclasses/metaclass) which removes the need
55
+ for re-decorating subclasses (with support for inheritance of dataclass parameters like `frozen`), and some basic
56
+ [base classes](https://github.com/wrmsr/om/blob/master/omcore/dataclasses/metaclass/bases.py).
57
+ - Support for ahead-of-time / build-time code generation, significantly reducing import times.
58
+
59
+ The stdlib-equivalent api is exported in such a way as to appear to be direct aliases for the stdlib api itself,
60
+ simplifying tool support.
61
+
62
+ - **[dispatch](https://github.com/wrmsr/om/blob/master/omcore/dispatch)** - A beefed-up version of
63
+ [functools.singledispatch](https://docs.python.org/3/library/functools.html#functools.singledispatch), most notably
64
+ supporting MRO-honoring method impl dispatch.
65
+
66
+ - **[formats](https://github.com/wrmsr/om/blob/master/omcore/formats)** - Tools for various data formats, including:
67
+
68
+ - **[json](https://github.com/wrmsr/om/blob/master/omcore/formats/json)** - Tools for json, including abstraction over
69
+ various backends and a self-contained streaming / incremental parser.
70
+ - **[json5](https://github.com/wrmsr/om/blob/master/omcore/formats/json5)** - A self-contained and tested
71
+ [Json5](https://json5.org/) parser.
72
+ - **[toml](https://github.com/wrmsr/om/blob/master/omcore/formats/toml)** - Toml tools, including a [lite](#lite-code)
73
+ version of the stdlib parser (for use in older pythons).
74
+ - **[goyaml](https://github.com/wrmsr/om/blob/master/omcore/formats/yaml/goyaml)** - A **manual**, near-direct,
75
+ 'lite'-compatible translation of [go-yaml](https://github.com/goccy/go-yaml/).
76
+
77
+ https://github.com/goccy/go-yaml/tree/8dd51ebb7f36f616b85f7b0e54539afa4341f22a
78
+
79
+ - **[http](https://github.com/wrmsr/om/blob/master/omcore/http)** - HTTP code, including:
80
+
81
+ - **[clients](https://github.com/wrmsr/om/blob/master/omcore/http/clients)** - An abstraction over HTTP clients, with
82
+ urllib and httpx implementations.
83
+
84
+ - **[inject](https://github.com/wrmsr/om/blob/master/omcore/inject)** - A [guice](https://github.com/google/guice)-style
85
+ dependency injector.
86
+
87
+ - **[io](https://github.com/wrmsr/om/blob/master/omcore/io)** - IO tools, including:
88
+
89
+ - **[compress](https://github.com/wrmsr/om/blob/master/omcore/io/compress)** - Abstraction over various compression
90
+ schemes, with particular attention to incremental operation. For example it includes [an incremental reformulation
91
+ of stdlib's gzip](https://github.com/wrmsr/om/blob/master/omcore/io/compress/gzip.py).
92
+ - **[fdio](https://github.com/wrmsr/om/blob/master/omcore/io/fdio)** - An implementation of classic
93
+ [selector](https://docs.python.org/3/library/selectors.html)-style IO dispatch, akin to the deprecated
94
+ [asyncore](https://docs.python.org/3.11/library/asyncore.html). While more modern asyncio style code is generally
95
+ preferred, it nearly always involves [background
96
+ threads](https://github.com/python/cpython/blob/95d9dea1c4ed1b1de80074b74301cee0b38d5541/Lib/asyncio/uni
97
+ x_events.py#L1349) making it [unsuitable for forking processes](https://rachelbythebay.com/w/2011/06/07/forked/).
98
+
99
+ - **[jmespath](https://github.com/wrmsr/om/blob/master/omcore/specs/jmespath)** - A vendoring of [jmespath community
100
+ edition](https://github.com/jmespath-community/python-jmespath), modernized and adapted to this codebase.
101
+
102
+ - **[marshal](https://github.com/wrmsr/om/blob/master/omcore/marshal)** - A
103
+ [jackson](https://github.com/FasterXML/jackson)-style serde system.
104
+
105
+ - **[manifests](https://github.com/wrmsr/om/blob/master/omcore/manifests)** - A system for sharing lightweight metadata
106
+ within / across codebases.
107
+
108
+ - **[reflect](https://github.com/wrmsr/om/blob/master/omcore/reflect)** - Reflection utilities, including primarily a
109
+ formalization of stdlib type annotations for use at runtime, decoupled from stdlib impl detail. Keeping this working
110
+ is notoriously difficult across python versions (one of the primary reasons for only supporting 3.14+).
111
+
112
+ - **[sql](https://github.com/wrmsr/om/blob/master/omcore/sql)** - A collection of SQL utilities, including:
113
+
114
+ - **[api](https://github.com/wrmsr/om/blob/master/omcore/sql/api)** - An abstracted api for SQL interaction, with
115
+ support for dbapi compatible drivers (and a SQLAlchemy adapter).
116
+ - **[queries](https://github.com/wrmsr/om/blob/master/omcore/sql/queries)** - A SQL query builder with a fluent
117
+ interface.
118
+ - **[alchemy](https://github.com/wrmsr/om/blob/master/omcore/sql/alchemy)** - SQLAlchemy utilities. The codebase has
119
+ moved away from SQLAlchemy in favor of its own internal SQL api, but it will likely still remain as an optional dep
120
+ for the api adapter.
121
+
122
+ - **[testing](https://github.com/wrmsr/om/blob/master/omcore/testing)** - Test - primarily pytest - helpers, including:
123
+
124
+ - **['harness'](https://github.com/wrmsr/om/blob/master/omcore/testing/pytest/inject/harness.py)** - An all-in-one
125
+ fixture marrying it to the codebase's dependency injector.
126
+ - **[plugins/async](https://github.com/wrmsr/om/blob/master/omcore/testing/pytest/plugins/asyncs)** - An in-house
127
+ async-backend abstraction plugin, capable of handling all of asyncio / trio / trio-asyncio /
128
+ *any-future-event-loop-impl* without having multiple fighting plugins (*[I know, I know](https://xkcd.com/927/)*).
129
+ - **[plugins](https://github.com/wrmsr/om/blob/master/omcore/testing/pytest/plugins)** - Various other plugins.
130
+
131
+ - **[typedvalues](https://github.com/wrmsr/om/blob/master/omcore/typedvalues)** - A little toolkit around 'boxed'
132
+ values, whose 'box' types convey more information than the bare values themselves. A rebellion against kwargs / env
133
+ vars / giant config objects: instead of `foo(bar=1, baz=2)`, you do `foo(Bar(1), Baz(2))`.
134
+
135
+ - **[lite](https://github.com/wrmsr/om/blob/master/omcore/lite)** - The standard library of 'lite' code. This is the
136
+ only package beneath `lang`, and parts of it are re-exported by it for deduplication. On top of miscellaneous
137
+ utilities it contains a handful of independent, self-contained, significantly simplified 'lite' equivalents of some
138
+ major core packages:
139
+
140
+ - **[lite/inject.py](https://github.com/wrmsr/om/blob/master/omcore/lite/inject.py)** - The lite injector, which is
141
+ more conservative with features and reflection than the core injector. The codebase's
142
+ [MiniGuice](https://github.com/google/guice/commit/70248eafa90cd70a68b293763e53f6aec656e73c).
143
+ - **[lite/marshal.py](https://github.com/wrmsr/om/blob/master/omcore/lite/marshal.py)** - The lite marshalling system,
144
+ which is a classic canned setup of simple type-specific 2-method classes and limited generic handling.
145
+
146
+ # Lite code
147
+
148
+ A subset of this codebase is written in a 'lite' style (non-'lite' code is referred to as *standard* code). While
149
+ standard code is written for python 3.14+, 'lite' code is written for 3.8+, and is written in a style conducive to
150
+ [amalgamation](https://github.com/wrmsr/om/blob/master/omdev#amalgamation) in which multiple python source files are
151
+ stitched together into one single self-contained python script.
152
+
153
+ Code written in this style has notable differences from standard code, including (but not limited to):
154
+
155
+ - No name mangling is done in amalgamation, which means (among other things) that code must be written expecting to be
156
+ all dumped into the same giant namespace. Where a standard class might be
157
+ [`omcore.inject.keys.Key`](https://github.com/wrmsr/om/blob/master/omcore/inject/keys.py), a lite equivalent might be
158
+ [`omcore.lite.inject.InjectorKey`](https://github.com/wrmsr/om/blob/master/omcore/lite/inject.py).
159
+ - All internal imports `import` each individual item out of modules rather than importing the modules and referencing
160
+ their contents. Where standard code would `from .. import x; x.y`, lite code would `from ..x import y; y`. As a result
161
+ there are frequently 'api' non-instantiated namespace classes serving the purpose of modules - just handy bags of
162
+ stuff with shortened names.
163
+ - As lite code is tested in 3.8+ but core code requires 3.14+, packages containing lite code can't import anything
164
+ standard in their (and their ancestors') `__init__.py`'s. Furthermore, `__init__.py` files are omitted outright in
165
+ amalgamation, so they effectively must be empty in any package containing any lite code. As a result there are
166
+ frequently [`all.py`](https://github.com/wrmsr/om/blob/master/omcore/configs/all.py) files in mixed-lite packages
167
+ which serve the purpose of `__init__.py` for standard usage - where importing standard packages from standard code
168
+ would be done via `from .. import lang`, importing mixed-lite packages from standard code would be done via `from
169
+ ..configs import all as cfgs`.
170
+
171
+ # Dependencies
172
+
173
+ This library has no required dependencies of any kind, but there are some optional integrations - see
174
+ [`__about__.py`](https://github.com/wrmsr/om/blob/master/omcore/__about__.py) for a full list, but some specific
175
+ examples are:
176
+
177
+ - **asttokens / executing** - For getting runtime source representations of function call arguments, an optional
178
+ capability of [check](https://github.com/wrmsr/om/blob/master/omcore/check.py).
179
+ - **pytest** - What is used for all standard testing - as lite code has no dependencies of any kind its testing uses
180
+ stdlib's [unittest](https://docs.python.org/3/library/unittest.html).
181
+ - **anyio** - While lite code must use only asyncio, some async standard code sometimes is written to anyio.
182
+ - **sqlalchemy** - The codebase has migrated away from SQLAlchemy in favor of the internal api but it retains it as an
183
+ optional dep to support adapting the internal api to it.
184
+
185
+ Additionally, some catchall dep categories include:
186
+
187
+ - **compression** - Various preferred compression backends like lz4, python-snappy, and brotli.
188
+ - **formats** - Various preferred data format backends like orjson/ujson, pyyaml, cbor2, and cloudpickle.
189
+ - **sql drivers** - Various preferred and tested sql drivers.
@@ -0,0 +1,202 @@
1
+ __version__ = '0.0.42'
2
+ __revision__ = '57873a26b65d0e7b2ba3934bc9897a84b4b137f8'
3
+
4
+
5
+ #
6
+
7
+
8
+ class ProjectBase:
9
+ name: str | None = None
10
+ authors = [{'name': 'wrmsr'}]
11
+ urls = {'source': 'https://github.com/wrmsr/om'}
12
+ license = 'BSD-3-Clause'
13
+ readme = 'README.md'
14
+ requires_python = '>=3.14'
15
+
16
+ version = __version__
17
+
18
+ classifiers = [
19
+ 'Intended Audience :: Developers',
20
+
21
+ 'Operating System :: OS Independent',
22
+ 'Operating System :: POSIX',
23
+
24
+ 'Programming Language :: Python :: 3',
25
+ 'Programming Language :: Python :: 3.14',
26
+ 'Programming Language :: Python :: 3.15',
27
+ ]
28
+
29
+
30
+ class Project(ProjectBase):
31
+ name = 'omcore'
32
+ description = 'omcore'
33
+
34
+ #
35
+
36
+ optional_dependencies = {
37
+ 'async': [
38
+ 'anyio ~= 4.14',
39
+ 'sniffio ~= 1.3',
40
+
41
+ 'trio ~= 0.33',
42
+ 'trio-asyncio ~= 0.15',
43
+ ],
44
+
45
+ 'compress': [
46
+ 'lz4 ~= 4.4',
47
+
48
+ 'python-snappy ~= 0.7',
49
+
50
+ 'brotli ~= 1.2',
51
+ ],
52
+
53
+ 'diag': [
54
+ 'asttokens ~= 3.0',
55
+ 'executing ~= 2.2',
56
+
57
+ 'psutil ~= 7.2',
58
+
59
+ 'memray ~= 1.20',
60
+ ],
61
+
62
+ 'formats': [
63
+ 'orjson ~= 3.11',
64
+ 'ujson ~= 5.13',
65
+
66
+ 'pyyaml ~= 6.0',
67
+
68
+ 'cbor2 ~= 6.1',
69
+
70
+ 'cloudpickle ~= 3.1',
71
+ ],
72
+
73
+ 'http': [
74
+ 'httpx[http2] ~= 0.28',
75
+ ],
76
+
77
+ 'mypy': [
78
+ 'mypy ~= 2.3',
79
+ ],
80
+
81
+ 'secrets': [
82
+ 'cryptography ~= 50.0',
83
+ ],
84
+
85
+ 'sqlalchemy': [
86
+ 'sqlalchemy[asyncio] ~= 2.0',
87
+ ],
88
+
89
+ 'sqldrivers': [
90
+ 'pg8000 ~= 1.31',
91
+ 'psycopg2 ~= 2.9',
92
+ 'psycopg ~= 3.3',
93
+
94
+ 'pymysql ~= 1.2',
95
+ 'mysql-connector-python ~= 26.7',
96
+ 'mysqlclient ~= 2.2',
97
+
98
+ 'snowflake-connector-python ~= 4.7',
99
+
100
+ 'aiomysql ~= 0.3',
101
+ 'aiosqlite ~= 0.22',
102
+ 'asyncpg ~= 0.31',
103
+
104
+ 'apsw ~= 3.53',
105
+
106
+ 'sqlean.py ~= 3.50',
107
+
108
+ 'duckdb ~= 1.5',
109
+ ],
110
+
111
+ 'templates': [
112
+ 'markupsafe ~= 3.0',
113
+
114
+ 'jinja2 ~= 3.1',
115
+ ],
116
+
117
+ 'testing': [
118
+ 'pytest ~= 9.1',
119
+ ],
120
+ }
121
+
122
+ #
123
+
124
+ _plus_dependencies = [
125
+ 'asttokens',
126
+ 'executing',
127
+
128
+ 'orjson',
129
+ 'pyyaml',
130
+ ]
131
+
132
+ _dependency_specs_by_name = (lambda od: { # noqa
133
+ s.split()[0]: s
134
+ for l in od.values() for s in l
135
+ })(optional_dependencies)
136
+
137
+ optional_dependencies['plus'] = (lambda ds, pd: [ # noqa
138
+ ds[n] for n in pd
139
+ ])(_dependency_specs_by_name, _plus_dependencies)
140
+
141
+ #
142
+
143
+ entry_points = {
144
+ 'omcore.manifests': {name: name},
145
+ }
146
+
147
+
148
+ #
149
+
150
+
151
+ class SetuptoolsBase:
152
+ cext = False
153
+ mypyc = False
154
+ rs = False
155
+
156
+ manifest_in = [
157
+ 'global-exclude **/conftest.py',
158
+ ]
159
+
160
+ find_packages = {
161
+ 'exclude': [
162
+ '*.tests',
163
+ '*.tests.*',
164
+ ],
165
+ }
166
+
167
+ package_data = {
168
+ '*': [
169
+ '*.c',
170
+ '*.cc',
171
+ '*.cu',
172
+ '*.h',
173
+ '*.hh',
174
+
175
+ '*.abnf',
176
+ '*.g4',
177
+
178
+ '.om-manifests.json',
179
+
180
+ 'py.typed',
181
+
182
+ '*.md',
183
+
184
+ 'README',
185
+ 'README.rst',
186
+
187
+ 'LICENSE',
188
+ 'LICENSE.txt',
189
+
190
+ 'AUTHORS',
191
+ ],
192
+ }
193
+
194
+
195
+ class Setuptools(SetuptoolsBase):
196
+ cext = True
197
+ mypyc = True
198
+
199
+ find_packages = {
200
+ 'include': [Project.name, f'{Project.name}.*'],
201
+ 'exclude': [*SetuptoolsBase.find_packages['exclude']],
202
+ }
@@ -0,0 +1,3 @@
1
+ # While the library as a whole only supports modern python, the 'lite' package is importable and usable down to python
2
+ # 3.8. As a result this file needs to be kept basically empty as anything it would otherwise do would likely involve
3
+ # non-lite code.