File tree Expand file tree Collapse file tree 8 files changed +13
-24
lines changed Expand file tree Collapse file tree 8 files changed +13
-24
lines changed Original file line number Diff line number Diff line change 9
9
10
10
matrix :
11
11
include :
12
- - python : " 2.7"
13
- env : FEATURES=python2
14
12
- python : " 3.5"
15
13
env : FEATURES=python3
16
14
- python : " 3.6"
Original file line number Diff line number Diff line change 1
1
[package ]
2
2
name = " numpy"
3
- version = " 0.5 .0"
3
+ version = " 0.6 .0"
4
4
authors = [
" Toshiki Teramura <[email protected] >" ,
" Yuji Kanagawa <[email protected] >" ]
5
5
description = " Rust binding of NumPy C-API"
6
6
documentation = " https://rust-numpy.github.io/rust-numpy/numpy"
@@ -14,13 +14,11 @@ libc = "0.2"
14
14
num-complex = " 0.2"
15
15
num-traits = " 0.2"
16
16
ndarray = " 0.12"
17
- pyo3 = " 0.6 "
17
+ pyo3 = " 0.7 "
18
18
19
19
[features ]
20
20
# In default setting, python version is automatically detected
21
21
default = []
22
- # Use this feature when building python2 binding.
23
- python2 = [" pyo3/python2" ]
24
- # Use this feature when building python3 binding.
22
+ # This is no longer needed but setuptools-rust assumes this feature
25
23
python3 = [" pyo3/python3" ]
26
24
Original file line number Diff line number Diff line change @@ -56,8 +56,8 @@ using [setuptools-rust](https://github.com/PyO3/setuptools-rust).
56
56
name = " numpy-test"
57
57
58
58
[dependencies ]
59
- pyo3 = " 0.6.0 "
60
- numpy = " 0.5 .0"
59
+ pyo3 = " 0.7 "
60
+ numpy = " 0.6 .0"
61
61
```
62
62
63
63
``` rust
@@ -100,11 +100,11 @@ name = "rust_ext"
100
100
crate-type = [" cdylib" ]
101
101
102
102
[dependencies ]
103
- numpy = " 0.5 .0"
103
+ numpy = " 0.6 .0"
104
104
ndarray = " 0.12"
105
105
106
106
[dependencies .pyo3 ]
107
- version = " 0.6.0 "
107
+ version = " 0.7 "
108
108
features = [" extension-module" ]
109
109
```
110
110
@@ -160,6 +160,10 @@ We need your feedback.
160
160
Don't hesitate to open [ issues] ( https://github.com/rust-numpy/rust-numpy/issues ) !
161
161
162
162
## Version
163
+ - v0.6.0
164
+ - Update PyO3 to 0.7
165
+ - Drop Python2 support
166
+
163
167
- v0.5.0
164
168
- Update PyO3 to 0.6
165
169
Original file line number Diff line number Diff line change 1
1
environment :
2
2
TARGET : x86_64-pc-windows-msvc
3
3
matrix :
4
- - PYTHON : " C:/Python27-x64"
5
- FEATURES : python2
6
4
- PYTHON : " C:/Python35-x64"
7
5
FEATURES : python3
8
6
- PYTHON : " C:/Python36-x64"
Original file line number Diff line number Diff line change 16
16
rust_extensions = [RustExtension (
17
17
'rust_linalg.rust_linalg' ,
18
18
'./Cargo.toml' ,
19
- rustc_flags = ['--cfg=Py_{}' .format (PYTHON_MAJOR_VERSION )],
20
- features = ['numpy/python{}' .format (PYTHON_MAJOR_VERSION )],
21
19
)],
22
20
install_requires = install_requires ,
23
21
setup_requires = setup_requires ,
Original file line number Diff line number Diff line change @@ -12,5 +12,5 @@ numpy = { path = "../.." }
12
12
ndarray = " 0.12"
13
13
14
14
[dependencies .pyo3 ]
15
- version = " 0.6 "
15
+ version = " 0.7 "
16
16
features = [" extension-module" ]
Original file line number Diff line number Diff line change 16
16
rust_extensions = [RustExtension (
17
17
'rust_ext.rust_ext' ,
18
18
'./Cargo.toml' ,
19
- rustc_flags = ['--cfg=Py_{}' .format (PYTHON_MAJOR_VERSION )],
20
- features = ['numpy/python{}' .format (PYTHON_MAJOR_VERSION )],
21
19
)],
22
20
install_requires = install_requires ,
23
21
setup_requires = setup_requires ,
Original file line number Diff line number Diff line change 12
12
use pyo3:: ffi;
13
13
use std:: ffi:: CString ;
14
14
use std:: os:: raw:: c_void;
15
+ use std:: ptr:: null_mut;
15
16
16
17
fn get_numpy_api ( module : & str , capsule : & str ) -> * const * const c_void {
17
18
let module = CString :: new ( module) . unwrap ( ) ;
18
19
let capsule = CString :: new ( capsule) . unwrap ( ) ;
19
- #[ cfg( feature = "python2" ) ]
20
20
unsafe fn get_capsule ( capsule : * mut ffi:: PyObject ) -> * const * const c_void {
21
- ffi:: PyCObject_AsVoidPtr ( capsule) as * const * const c_void
22
- }
23
- #[ cfg( not( feature = "python2" ) ) ]
24
- unsafe fn get_capsule ( capsule : * mut ffi:: PyObject ) -> * const * const c_void {
25
- use std:: ptr:: null_mut;
26
21
ffi:: PyCapsule_GetPointer ( capsule, null_mut ( ) ) as * const * const c_void
27
22
}
28
23
unsafe {
You can’t perform that action at this time.
0 commit comments