cwrap 1.6.7__py3-none-any.whl → 1.6.9__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
@@ -12,5 +12,5 @@ __version__: str
12
12
  __version_tuple__: VERSION_TUPLE
13
13
  version_tuple: VERSION_TUPLE
14
14
 
15
- __version__ = version = '1.6.7'
16
- __version_tuple__ = version_tuple = (1, 6, 7)
15
+ __version__ = version = '1.6.9'
16
+ __version_tuple__ = version_tuple = (1, 6, 9)
@@ -1,12 +1,11 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: cwrap
3
- Version: 1.6.7
3
+ Version: 1.6.9
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,33 @@ 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
25
 
26
+ # cwrap
26
27
 
27
- =======
28
- cwrap
29
- =======
28
+ cwrap is a Python wrapper around C code, building upon ctypes.
30
29
 
31
- Introduction
32
- ------------
30
+ # Examples
33
31
 
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.
32
+ See `examples/`
33
+
34
+ # Installing
35
+ ```
36
+ pip install cwrap
37
+ ```
38
+
39
+ # Running tests
40
+ Clone this repo and cd into it, then:
41
+
42
+ ```
43
+ pip install -r requirements.txt
44
+ python -m pytest -sv tests
45
+ ```
@@ -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=H4tpGbuK5q1tqtuUh1Nr2Buwsz8VycRrcpqeBxyquBg,411
10
+ cwrap-1.6.9.dist-info/LICENSE,sha256=KdZLnTl6Qk0PT7wUW8ugRdviqwxU5wjE26sku5sicOU,674
11
+ cwrap-1.6.9.dist-info/METADATA,sha256=FlPng_1FsJoQ0pfazQw5z9p2P_JOG4sFMYdfUNnfbGI,1229
12
+ cwrap-1.6.9.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
13
+ cwrap-1.6.9.dist-info/top_level.txt,sha256=CUjoCmJmjoO-LFc7eRvSm7AHuFbYgwHhkQ6Al-x6sTk,6
14
+ cwrap-1.6.9.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.43.0)
2
+ Generator: setuptools (75.8.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,,
File without changes