cwrap 1.6.7__py3-none-any.whl → 1.6.10__py3-none-any.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.
cwrap/basecenum.py CHANGED
@@ -152,9 +152,9 @@ class BaseCEnum(metaclass=MetaCWrap):
152
152
  return None
153
153
 
154
154
  def __assertOtherIsSameType(self, other):
155
- assert isinstance(
156
- other, self.__class__
157
- ), f"Can only operate on enums of same type: {self.__class__.__name__} =! {other.__class__.__name__}"
155
+ assert isinstance(other, self.__class__), (
156
+ f"Can only operate on enums of same type: {self.__class__.__name__} != {other.__class__.__name__}"
157
+ )
158
158
 
159
159
  @classmethod
160
160
  def populateEnum(cls, library, enum_provider_function):
cwrap/prototype.py CHANGED
@@ -37,7 +37,7 @@ class CStringHelper:
37
37
  def from_param(cls, value):
38
38
  if value is None:
39
39
  return None
40
- elif isinstance(value, (bytes, ctypes.Array)):
40
+ elif isinstance(value, (bytes | ctypes.Array)):
41
41
  return value
42
42
  else:
43
43
  e = value.encode()
cwrap/version.py CHANGED
@@ -1,16 +1,34 @@
1
- # file generated by setuptools_scm
1
+ # file generated by setuptools-scm
2
2
  # don't change, don't track in version control
3
+
4
+ __all__ = [
5
+ "__version__",
6
+ "__version_tuple__",
7
+ "version",
8
+ "version_tuple",
9
+ "__commit_id__",
10
+ "commit_id",
11
+ ]
12
+
3
13
  TYPE_CHECKING = False
4
14
  if TYPE_CHECKING:
5
- from typing import Tuple, Union
15
+ from typing import Tuple
16
+ from typing import Union
17
+
6
18
  VERSION_TUPLE = Tuple[Union[int, str], ...]
19
+ COMMIT_ID = Union[str, None]
7
20
  else:
8
21
  VERSION_TUPLE = object
22
+ COMMIT_ID = object
9
23
 
10
24
  version: str
11
25
  __version__: str
12
26
  __version_tuple__: VERSION_TUPLE
13
27
  version_tuple: VERSION_TUPLE
28
+ commit_id: COMMIT_ID
29
+ __commit_id__: COMMIT_ID
30
+
31
+ __version__ = version = '1.6.10'
32
+ __version_tuple__ = version_tuple = (1, 6, 10)
14
33
 
15
- __version__ = version = '1.6.7'
16
- __version_tuple__ = version_tuple = (1, 6, 7)
34
+ __commit_id__ = commit_id = None
@@ -1,12 +1,11 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: cwrap
3
- Version: 1.6.7
3
+ Version: 1.6.10
4
4
  Summary: cwrap - ctypes blanket
5
- Home-page: https://github.com/Statoil/cwrap
6
- Author: Statoil ASA
7
- Author-email: fg_gpl@statoil.com
5
+ Author-email: Equinor ASA <fg_sib-scout@equinor.com>
8
6
  License: GPL-3.0
9
- Platform: any
7
+ Project-URL: Repository, https://github.com/equinor/cwrap
8
+ Platform: all
10
9
  Classifier: Development Status :: 5 - Production/Stable
11
10
  Classifier: Environment :: Other Environment
12
11
  Classifier: Intended Audience :: Developers
@@ -14,23 +13,34 @@ Classifier: Intended Audience :: Science/Research
14
13
  Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
15
14
  Classifier: Natural Language :: English
16
15
  Classifier: Programming Language :: Python
17
- Classifier: Programming Language :: Python :: 3.8
18
- Classifier: Programming Language :: Python :: 3.9
19
16
  Classifier: Programming Language :: Python :: 3.10
20
17
  Classifier: Programming Language :: Python :: 3.11
21
18
  Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Programming Language :: Python :: 3.13
22
20
  Classifier: Topic :: Software Development :: Libraries
23
21
  Classifier: Topic :: Utilities
22
+ Requires-Python: >=3.10
23
+ Description-Content-Type: text/markdown
24
24
  License-File: LICENSE
25
+ Dynamic: license-file
25
26
 
27
+ # cwrap
26
28
 
27
- =======
28
- cwrap
29
- =======
29
+ cwrap is a Python wrapper around C code, building upon ctypes.
30
30
 
31
- Introduction
32
- ------------
31
+ # Examples
33
32
 
34
- Cwrap is a meta library using ctypes to quickly load and call C functions from
35
- Python. It's primarily desgined to be practicaul and useful for the ecl
36
- library https://github.com/statoil/libecl, but isn't tied to it.
33
+ See `examples/`
34
+
35
+ # Installing
36
+ ```
37
+ pip install cwrap
38
+ ```
39
+
40
+ # Running tests
41
+ Clone this repo and cd into it, then:
42
+
43
+ ```
44
+ pip install -r requirements.txt
45
+ python -m pytest -sv tests
46
+ ```
@@ -0,0 +1,14 @@
1
+ cwrap/__init__.py,sha256=jaZFUAG-rgT5RBJURcR_PCzGFmudtoAMaITTho0QIoY,1935
2
+ cwrap/basecclass.py,sha256=MtJQddSMegJ3TJ13rZM40_WV6DBnIVtdeIilbk7yLuI,4804
3
+ cwrap/basecenum.py,sha256=63af5ZpjcxoGdczot6vbF7Uyu3sma1jg8yXXD43h8qU,5121
4
+ cwrap/basecvalue.py,sha256=Idg2EnyVuRD6Eh8xjcXVuiGsqpjakKnq8hSwjczrAA8,2102
5
+ cwrap/cfile.py,sha256=vkVpZZ_BsM6etqnLja7XNbBR9bBSGxTYR7VhhC1qCJs,3233
6
+ cwrap/clib.py,sha256=E94IqKHOoGozwbrPFe38XCretUzPr5MEdTK0tg5_VKI,3591
7
+ cwrap/metacwrap.py,sha256=hZkY1piH7R8dahydIxIHd8RQjkKm9gqHGtUKsQhqpaE,2017
8
+ cwrap/prototype.py,sha256=GvoBt5i8gPT55Ovo5EHcWL_Z49trItSpIGVlXGMIUmM,9229
9
+ cwrap/version.py,sha256=PZMt5jKn3D6z4skUyTfnLDhZZLqS6rOyBibbj_BcKgE,706
10
+ cwrap-1.6.10.dist-info/licenses/LICENSE,sha256=KdZLnTl6Qk0PT7wUW8ugRdviqwxU5wjE26sku5sicOU,674
11
+ cwrap-1.6.10.dist-info/METADATA,sha256=OnqGKdxE2YBJRUmy03NXTHFCwU_If62wVDfqMmZ_KAw,1252
12
+ cwrap-1.6.10.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
13
+ cwrap-1.6.10.dist-info/top_level.txt,sha256=CUjoCmJmjoO-LFc7eRvSm7AHuFbYgwHhkQ6Al-x6sTk,6
14
+ cwrap-1.6.10.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.43.0)
2
+ Generator: setuptools (80.9.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,14 +0,0 @@
1
- cwrap/__init__.py,sha256=jaZFUAG-rgT5RBJURcR_PCzGFmudtoAMaITTho0QIoY,1935
2
- cwrap/basecclass.py,sha256=MtJQddSMegJ3TJ13rZM40_WV6DBnIVtdeIilbk7yLuI,4804
3
- cwrap/basecenum.py,sha256=2Q8LsFZWMQRCuqcvkIZWczKctNCg40eaQAp8lCFoRCo,5119
4
- cwrap/basecvalue.py,sha256=Idg2EnyVuRD6Eh8xjcXVuiGsqpjakKnq8hSwjczrAA8,2102
5
- cwrap/cfile.py,sha256=vkVpZZ_BsM6etqnLja7XNbBR9bBSGxTYR7VhhC1qCJs,3233
6
- cwrap/clib.py,sha256=E94IqKHOoGozwbrPFe38XCretUzPr5MEdTK0tg5_VKI,3591
7
- cwrap/metacwrap.py,sha256=hZkY1piH7R8dahydIxIHd8RQjkKm9gqHGtUKsQhqpaE,2017
8
- cwrap/prototype.py,sha256=Djzv6KO91VZjp-X8VOXDpEFwq1qNSBxkMnUZZv01EBg,9228
9
- cwrap/version.py,sha256=UBH9kvxesdE0svvcKwHfK8rz5bJUzNXPBHo7APqVEfk,411
10
- cwrap-1.6.7.dist-info/LICENSE,sha256=KdZLnTl6Qk0PT7wUW8ugRdviqwxU5wjE26sku5sicOU,674
11
- cwrap-1.6.7.dist-info/METADATA,sha256=YlKh1653mezcM30tOrxPf6amaGscK0ql9UFx4oxYv9w,1203
12
- cwrap-1.6.7.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
13
- cwrap-1.6.7.dist-info/top_level.txt,sha256=CUjoCmJmjoO-LFc7eRvSm7AHuFbYgwHhkQ6Al-x6sTk,6
14
- cwrap-1.6.7.dist-info/RECORD,,