bjdata 0.6.5__tar.gz → 0.6.6__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 (37) hide show
  1. {bjdata-0.6.5 → bjdata-0.6.6}/PKG-INFO +2 -2
  2. {bjdata-0.6.5 → bjdata-0.6.6}/README.md +1 -1
  3. {bjdata-0.6.5 → bjdata-0.6.6}/bjdata/__init__.py +1 -1
  4. {bjdata-0.6.5 → bjdata-0.6.6}/bjdata.egg-info/PKG-INFO +2 -2
  5. {bjdata-0.6.5 → bjdata-0.6.6}/bjdata.egg-info/SOURCES.txt +0 -1
  6. bjdata-0.6.6/pyproject.toml +3 -0
  7. {bjdata-0.6.5 → bjdata-0.6.6}/setup.py +1 -1
  8. {bjdata-0.6.5 → bjdata-0.6.6}/src/decoder.c +0 -1
  9. {bjdata-0.6.5 → bjdata-0.6.6}/src/encoder.c +0 -1
  10. {bjdata-0.6.5 → bjdata-0.6.6}/src/numpyapi.h +42 -0
  11. bjdata-0.6.5/pyproject.toml +0 -8
  12. bjdata-0.6.5/src/numpy_compat.h +0 -56
  13. {bjdata-0.6.5 → bjdata-0.6.6}/Binary_JData_Specification.md +0 -0
  14. {bjdata-0.6.5 → bjdata-0.6.6}/CHANGELOG +0 -0
  15. {bjdata-0.6.5 → bjdata-0.6.6}/LICENSE +0 -0
  16. {bjdata-0.6.5 → bjdata-0.6.6}/MANIFEST.in +0 -0
  17. {bjdata-0.6.5 → bjdata-0.6.6}/NOTICE +0 -0
  18. {bjdata-0.6.5 → bjdata-0.6.6}/UBJSON-Specification.md +0 -0
  19. {bjdata-0.6.5 → bjdata-0.6.6}/bjdata/__main__.py +0 -0
  20. {bjdata-0.6.5 → bjdata-0.6.6}/bjdata/compat.py +0 -0
  21. {bjdata-0.6.5 → bjdata-0.6.6}/bjdata/decoder.py +0 -0
  22. {bjdata-0.6.5 → bjdata-0.6.6}/bjdata/encoder.py +0 -0
  23. {bjdata-0.6.5 → bjdata-0.6.6}/bjdata/markers.py +0 -0
  24. {bjdata-0.6.5 → bjdata-0.6.6}/bjdata.egg-info/dependency_links.txt +0 -0
  25. {bjdata-0.6.5 → bjdata-0.6.6}/bjdata.egg-info/not-zip-safe +0 -0
  26. {bjdata-0.6.5 → bjdata-0.6.6}/bjdata.egg-info/requires.txt +0 -0
  27. {bjdata-0.6.5 → bjdata-0.6.6}/bjdata.egg-info/top_level.txt +0 -0
  28. {bjdata-0.6.5 → bjdata-0.6.6}/ez_setup.py +0 -0
  29. {bjdata-0.6.5 → bjdata-0.6.6}/setup.cfg +0 -0
  30. {bjdata-0.6.5 → bjdata-0.6.6}/src/_bjdata.c +0 -0
  31. {bjdata-0.6.5 → bjdata-0.6.6}/src/common.h +0 -0
  32. {bjdata-0.6.5 → bjdata-0.6.6}/src/decoder.h +0 -0
  33. {bjdata-0.6.5 → bjdata-0.6.6}/src/encoder.h +0 -0
  34. {bjdata-0.6.5 → bjdata-0.6.6}/src/markers.h +0 -0
  35. {bjdata-0.6.5 → bjdata-0.6.6}/src/python_funcs.c +0 -0
  36. {bjdata-0.6.5 → bjdata-0.6.6}/src/python_funcs.h +0 -0
  37. {bjdata-0.6.5 → bjdata-0.6.6}/test/test.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bjdata
3
- Version: 0.6.5
3
+ Version: 0.6.6
4
4
  Summary: Binary JData and UBJSON encoder/decoder
5
5
  Home-page: https://github.com/NeuroJSON/pybj
6
6
  Author: Qianqian Fang
@@ -58,7 +58,7 @@ Dynamic: summary
58
58
  - Copyright: (C) Qianqian Fang (2020-2026) <q.fang at neu.edu>
59
59
  - Copyright: (C) Iotic Labs Ltd. (2016-2019) <vilnis.termanis at iotic-labs.com>
60
60
  - License: Apache License, Version 2.0
61
- - Version: 0.6.5
61
+ - Version: 0.6.6
62
62
  - URL: https://pypi.org/project/bjdata/
63
63
  - Github: https://github.com/NeuroJSON/pybj
64
64
  - BJData Spec Version: [Draft 4](https://neurojson.org/bjdata/draft4)
@@ -5,7 +5,7 @@
5
5
  - Copyright: (C) Qianqian Fang (2020-2026) <q.fang at neu.edu>
6
6
  - Copyright: (C) Iotic Labs Ltd. (2016-2019) <vilnis.termanis at iotic-labs.com>
7
7
  - License: Apache License, Version 2.0
8
- - Version: 0.6.5
8
+ - Version: 0.6.6
9
9
  - URL: https://pypi.org/project/bjdata/
10
10
  - Github: https://github.com/NeuroJSON/pybj
11
11
  - BJData Spec Version: [Draft 4](https://neurojson.org/bjdata/draft4)
@@ -40,7 +40,7 @@ except ImportError: # pragma: no cover
40
40
  from .encoder import EncoderException
41
41
  from .decoder import DecoderException
42
42
 
43
- __version__ = "0.6.5"
43
+ __version__ = "0.6.6"
44
44
 
45
45
  __all__ = (
46
46
  "EXTENSION_ENABLED",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bjdata
3
- Version: 0.6.5
3
+ Version: 0.6.6
4
4
  Summary: Binary JData and UBJSON encoder/decoder
5
5
  Home-page: https://github.com/NeuroJSON/pybj
6
6
  Author: Qianqian Fang
@@ -58,7 +58,7 @@ Dynamic: summary
58
58
  - Copyright: (C) Qianqian Fang (2020-2026) <q.fang at neu.edu>
59
59
  - Copyright: (C) Iotic Labs Ltd. (2016-2019) <vilnis.termanis at iotic-labs.com>
60
60
  - License: Apache License, Version 2.0
61
- - Version: 0.6.5
61
+ - Version: 0.6.6
62
62
  - URL: https://pypi.org/project/bjdata/
63
63
  - Github: https://github.com/NeuroJSON/pybj
64
64
  - BJData Spec Version: [Draft 4](https://neurojson.org/bjdata/draft4)
@@ -27,7 +27,6 @@ src/decoder.h
27
27
  src/encoder.c
28
28
  src/encoder.h
29
29
  src/markers.h
30
- src/numpy_compat.h
31
30
  src/numpyapi.h
32
31
  src/python_funcs.c
33
32
  src/python_funcs.h
@@ -0,0 +1,3 @@
1
+ [build-system]
2
+ requires = ["setuptools>=40", "wheel", "oldest-supported-numpy"]
3
+ build-backend = "setuptools.build_meta"
@@ -85,7 +85,7 @@ COMPILE_ARGS = ["-std=c99", "-DUSE__BJDATA"]
85
85
 
86
86
  setup(
87
87
  name="bjdata",
88
- version="0.6.5",
88
+ version="0.6.6",
89
89
  description="Binary JData and UBJSON encoder/decoder",
90
90
  long_description=load_description("README.md"),
91
91
  long_description_content_type="text/markdown",
@@ -25,7 +25,6 @@
25
25
  #include "markers.h"
26
26
  #include "decoder.h"
27
27
  #include "python_funcs.h"
28
- #include "numpy_compat.h"
29
28
 
30
29
  /******************************************************************************/
31
30
 
@@ -26,7 +26,6 @@
26
26
  #include "markers.h"
27
27
  #include "encoder.h"
28
28
  #include "python_funcs.h"
29
- #include "numpy_compat.h"
30
29
 
31
30
  /******************************************************************************/
32
31
 
@@ -20,6 +20,7 @@
20
20
  #define PY_ARRAY_UNIQUE_SYMBOL bjdata_numpy_array
21
21
  #define NPY_NO_DEPRECATED_API 0
22
22
  #include <numpy/arrayobject.h>
23
+ #include <numpy/ndarraytypes.h>
23
24
 
24
25
  #if defined (__cplusplus)
25
26
  extern "C" {
@@ -86,6 +87,47 @@ extern "C" {
86
87
 
87
88
  #endif
88
89
 
90
+ #if NPY_ABI_VERSION < 0x02000000
91
+ /*
92
+ * NumPy 1.x: Direct struct member access
93
+ */
94
+ #define DESCR_ELSIZE(d) (((PyArray_Descr*)(d))->elsize)
95
+ #define DESCR_TYPE_NUM(d) (((PyArray_Descr*)(d))->type_num)
96
+ #else
97
+ /*
98
+ * NumPy 2.x: Use Python attribute access to avoid API linkage issues
99
+ * This is slightly slower but guaranteed to work.
100
+ */
101
+ static inline npy_intp _descr_elsize_compat(PyArray_Descr* d) {
102
+ npy_intp result = 0;
103
+ PyObject* val = PyObject_GetAttrString((PyObject*)d, "itemsize");
104
+
105
+ if (val) {
106
+ result = PyLong_AsSsize_t(val);
107
+ Py_DECREF(val);
108
+ }
109
+
110
+ PyErr_Clear();
111
+ return result;
112
+ }
113
+
114
+ static inline int _descr_type_num_compat(PyArray_Descr* d) {
115
+ int result = 0;
116
+ PyObject* val = PyObject_GetAttrString((PyObject*)d, "num");
117
+
118
+ if (val) {
119
+ result = (int)PyLong_AsLong(val);
120
+ Py_DECREF(val);
121
+ }
122
+
123
+ PyErr_Clear();
124
+ return result;
125
+ }
126
+
127
+ #define DESCR_ELSIZE(d) _descr_elsize_compat((PyArray_Descr*)(d))
128
+ #define DESCR_TYPE_NUM(d) _descr_type_num_compat((PyArray_Descr*)(d))
129
+ #endif
130
+
89
131
  #if defined (__cplusplus)
90
132
  }
91
133
  #endif
@@ -1,8 +0,0 @@
1
- [build-system]
2
- requires = [
3
- "setuptools>=42",
4
- "wheel",
5
- "numpy>=2.0.0rc1; python_version>='3.9'",
6
- "numpy>=1.8.0; python_version<'3.9'"
7
- ]
8
- build-backend = "setuptools.build_meta"
@@ -1,56 +0,0 @@
1
- /*
2
- * NumPy 1.x/2.x compatibility macros for PyArray_Descr access
3
- *
4
- * This version avoids using NumPy 2.x API functions by using
5
- * PyObject attribute access, which works in both versions.
6
- *
7
- * Include this AFTER Python.h and numpy headers.
8
- */
9
-
10
- #ifndef NPY_COMPAT_H
11
- #define NPY_COMPAT_H
12
-
13
- #include <numpy/ndarraytypes.h>
14
-
15
- #if NPY_ABI_VERSION < 0x02000000
16
- /*
17
- * NumPy 1.x: Direct struct member access
18
- */
19
- #define DESCR_ELSIZE(d) (((PyArray_Descr*)(d))->elsize)
20
- #define DESCR_TYPE_NUM(d) (((PyArray_Descr*)(d))->type_num)
21
- #else
22
- /*
23
- * NumPy 2.x: Use Python attribute access to avoid API linkage issues
24
- * This is slightly slower but guaranteed to work.
25
- */
26
- static inline npy_intp _descr_elsize_compat(PyArray_Descr* d) {
27
- npy_intp result = 0;
28
- PyObject* val = PyObject_GetAttrString((PyObject*)d, "itemsize");
29
-
30
- if (val) {
31
- result = PyLong_AsSsize_t(val);
32
- Py_DECREF(val);
33
- }
34
-
35
- PyErr_Clear();
36
- return result;
37
- }
38
-
39
- static inline int _descr_type_num_compat(PyArray_Descr* d) {
40
- int result = 0;
41
- PyObject* val = PyObject_GetAttrString((PyObject*)d, "num");
42
-
43
- if (val) {
44
- result = (int)PyLong_AsLong(val);
45
- Py_DECREF(val);
46
- }
47
-
48
- PyErr_Clear();
49
- return result;
50
- }
51
-
52
- #define DESCR_ELSIZE(d) _descr_elsize_compat((PyArray_Descr*)(d))
53
- #define DESCR_TYPE_NUM(d) _descr_type_num_compat((PyArray_Descr*)(d))
54
- #endif
55
-
56
- #endif /* NPY_COMPAT_H */
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes