Skip to content

Commit 06298ff

Browse files
authored
Tech.resource 5.x (#132)
* Another large change, needs some careful consideration. * Moved to tech.v3.jna as an issue in tech.resource was found. * removed unused requires. * Updating readme.
1 parent c4d0c2c commit 06298ff

31 files changed

Lines changed: 46 additions & 53 deletions

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@
88
- Note - Please avoid deprecated versions such as `[cnuernber/libpython-clj "1.36"]` (***note name change***).
99

1010
* [API Documentation](https://clj-python.github.io/libpython-clj/)
11+
* This library, which has received the efforts of many excellent people, is built mainly upon
12+
[cnuernber/dtype-next](https://github.com/cnuernber/dtype-next/) and
13+
[techascent/tech.jna](https://github.com/techascent/tech.jna). It supports zerocopy transfer
14+
of data to/from numpy, dynamically creating Clojure namespaces from Python modules, and has
15+
a deep intergration with the Clojure language.
1116

1217
## libpython-clj features
1318

project.clj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
:url "http://www.eclipse.org/legal/epl-v10.html"}
66
:dependencies [[org.clojure/clojure "1.10.2-alpha2"]
77
[camel-snake-kebab "0.4.0"]
8-
[cnuernber/dtype-next "6.00-alpha-10"]
9-
[techascent/tech.jna "3.24"]
8+
[cnuernber/dtype-next "6.00-alpha-11"]
9+
[techascent/tech.jna "4.02"]
1010
[org.clojure/data.json "1.0.0"]]
1111
:profiles {:dev {:dependencies [[criterium "0.4.5"]]}
1212
:codox

src/libpython_clj/jna/base.clj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
(ns libpython-clj.jna.base
2-
(:require [tech.jna :as jna]
3-
[tech.jna.base :as jna-base])
2+
(:require [tech.v3.jna :as jna]
3+
[tech.v3.jna.base :as jna-base])
44
(:import [com.sun.jna Pointer NativeLibrary]
55
[libpython_clj.jna PyObject]
66
[java.util.concurrent.atomic AtomicLong]))
@@ -110,6 +110,6 @@
110110

111111

112112
(defn find-pylib-symbol
113-
[sym-name]
113+
^Pointer [sym-name]
114114
(.getGlobalVariableAddress ^NativeLibrary (jna-base/load-library *python-library*)
115115
sym-name))

src/libpython_clj/jna/concrete/cfunction.clj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
size-t-type
99
*python-library*]
1010
:as libpy-base]
11-
[tech.jna :as jna])
11+
[tech.v3.jna :as jna])
1212
(:import [com.sun.jna CallbackReference Pointer Callback]
1313
[libpython_clj.jna
1414
CFunction$KeyWordFunction

src/libpython_clj/jna/concrete/dict.clj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
size-t-type
88
*python-library*]
99
:as libpy-base]
10-
[tech.jna :as jna])
10+
[tech.v3.jna :as jna])
1111
(:import [com.sun.jna Pointer]
1212
[libpython_clj.jna PyObject DirectMapped]))
1313

src/libpython_clj/jna/concrete/err.clj

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,12 @@
88
find-pylib-symbol
99
*python-library*]
1010
:as libpy-base]
11-
[tech.jna :as jna])
11+
[tech.v3.jna :as jna])
1212
(:import [com.sun.jna Pointer]
1313
[libpython_clj.jna PyObject PyTypeObject DirectMapped]))
1414

15+
(set! *warn-on-reflection* true)
16+
1517

1618
(defn PyErr_Occurred
1719
"Check if the error indicator is set. If so, return the exception type."

src/libpython_clj/jna/concrete/import.clj

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66
ensure-pydict
77
size-t-type
88
*python-library*]
9-
:as libpy-base]
10-
[tech.jna :as jna])
9+
:as libpy-base])
1110
(:import [com.sun.jna Pointer]
1211
[libpython_clj.jna PyObject]))
1312

src/libpython_clj/jna/concrete/list.clj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
size-t-type
88
*python-library*]
99
:as libpy-base]
10-
[tech.jna :as jna])
10+
[tech.v3.jna :as jna])
1111
(:import [com.sun.jna Pointer]
1212
[libpython_clj.jna PyObject]))
1313

src/libpython_clj/jna/concrete/module.clj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
size-t-type
88
*python-library*]
99
:as libpy-base]
10-
[tech.jna :as jna])
10+
[tech.v3.jna :as jna])
1111
(:import [com.sun.jna Pointer]
1212
[libpython_clj.jna PyModuleDef PyMethodDef PyObject]))
1313

src/libpython_clj/jna/concrete/numeric/boolean.clj

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
ensure-pytuple
66
ensure-pydict
77
find-pylib-symbol]
8-
:as libpy-base]
9-
[tech.jna :as jna])
8+
:as libpy-base])
109
(:import [com.sun.jna Pointer]
1110
[libpython_clj.jna PyObject]))
1211

0 commit comments

Comments
 (0)