Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump dependency on cfg-if #240

Merged
merged 4 commits into from
Jan 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ jobs:
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.41.1
toolchain: 1.48.0
default: true
- name: Install maturin, poetry, and toml
run: pip install maturin poetry toml
Expand Down
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@ authors = [
description = "Rust binding of NumPy C-API"
documentation = "https://pyo3.github.io/rust-numpy/numpy"
edition = "2018"
rust-version = "1.48"
davidhewitt marked this conversation as resolved.
Show resolved Hide resolved
repository = "https://github.com/PyO3/rust-numpy"
keywords = ["numpy", "python", "binding"]
license = "BSD-2-Clause"

[dependencies]
cfg-if = "0.1"
cfg-if = "1.0"
libc = "0.2"
num-complex = ">= 0.2, <= 0.4"
num-traits = "0.2"
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ rust-numpy
===========
[![Actions Status](https://github.com/PyO3/rust-numpy/workflows/CI/badge.svg)](https://github.com/PyO3/rust-numpy/actions)
[![Crate](https://img.shields.io/crates/v/numpy.svg)](https://crates.io/crates/numpy)
[![Minimum rustc 1.41](https://img.shields.io/badge/rustc-1.41+-blue.svg)](https://rust-lang.github.io/rfcs/2495-min-rust-version.html)
[![Minimum rustc 1.48](https://img.shields.io/badge/rustc-1.48+-blue.svg)](https://rust-lang.github.io/rfcs/2495-min-rust-version.html)

Rust bindings for the NumPy C-API.

Expand All @@ -12,7 +12,7 @@ Rust bindings for the NumPy C-API.


## Requirements
- Rust >= 1.41.1
- Rust >= 1.48.0
- Basically, our MSRV follows the one of [PyO3](https://github.com/PyO3/pyo3)
- Python >= 3.6
- Python 3.5 support is dropped from 0.13
Expand Down
4 changes: 2 additions & 2 deletions src/array.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ use crate::npyffi::{self, npy_intp, NPY_ORDER, PY_ARRAY_API};
use ndarray::*;
use num_traits::AsPrimitive;
use pyo3::{
ffi, prelude::*, type_object, types::PyAny, AsPyPointer, PyDowncastError, PyNativeType,
PyResult,
ffi, prelude::*, pyobject_native_type_info, pyobject_native_type_named, type_object,
types::PyAny, AsPyPointer, PyDowncastError, PyNativeType, PyResult,
};
use std::{
cell::Cell,
Expand Down
9 changes: 4 additions & 5 deletions src/dtype.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
use crate::npyffi::{NpyTypes, PyArray_Descr, NPY_TYPES, PY_ARRAY_API};
use cfg_if::cfg_if;
use pyo3::{ffi, prelude::*, pyobject_native_type_core, types::PyType, AsPyPointer, PyNativeType};
use std::os::raw::c_int;

pub use num_complex::Complex32 as c32;
pub use num_complex::Complex64 as c64;
use pyo3::ffi;
use pyo3::prelude::*;
use pyo3::types::PyType;
use pyo3::{AsPyPointer, PyNativeType};
use std::os::raw::c_int;

/// Binding of [`numpy.dtype`](https://numpy.org/doc/stable/reference/generated/numpy.dtype.html).
///
Expand Down
11 changes: 2 additions & 9 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,6 @@
//! })
//! }
//! ```

#[macro_use]
extern crate cfg_if;
#[macro_use]
extern crate pyo3;

pub mod array;
pub mod convert;
mod dtype;
Expand Down Expand Up @@ -65,9 +59,8 @@ pub use crate::readonly::{
pub use crate::sum_products::{dot, einsum_impl, inner};
pub use ndarray::{array, Ix1, Ix2, Ix3, Ix4, Ix5, Ix6, IxDyn};

/// Test readme
#[doc(hidden)]
pub mod doc_test {
#[cfg(doctest)]
mod doctest {
macro_rules! doc_comment {
($x: expr, $modname: ident) => {
#[doc = $x]
Expand Down