From bf4e36d9d94880b63a209e879e46175a9b6a28a3 Mon Sep 17 00:00:00 2001 From: Nikolay Kim Date: Fri, 12 May 2017 22:51:14 -0700 Subject: [PATCH] update travis config --- Makefile | 7 ++----- README.md | 9 ++++++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index f6824cd8..f151c7ae 100644 --- a/Makefile +++ b/Makefile @@ -11,12 +11,9 @@ NIGHTLY := 0 endif endif -ifeq ($(PY),3) -FEATURES := python3-sys ifdef PEP384 export PEP384=1 -FEATURES := $(FEATURES) pep-384 -endif +FEATURES := pep-384 endif ifeq ($(NIGHTLY),1) FEATURES := $(FEATURES) nightly @@ -24,7 +21,7 @@ endif CARGO_FLAGS := --features "$(FEATURES)" --no-default-features -default: test extensions +default: test src/py_class/py_class_impl.rs: src/py_class/py_class_impl.py PY=3 python $< >$@ diff --git a/README.md b/README.md index 04f54095..3c195b0f 100644 --- a/README.md +++ b/README.md @@ -71,13 +71,13 @@ features = ["extension-module"] **`src/lib.rs`** ```rust -#[macro_use] extern crate cpython; +#[macro_use] extern crate pye3; -use cpython::{PyResult, Python}; +use pyo3::{PyResult, Python}; // add bindings to the generated python module // N.B: names: "librust2py" must be the name of the `.so` or `.pyd` file -py_module_initializer!(librust2py, initlibrust2py, PyInit_librust2py, |py, m| { +py_module_initializer!(librust2py, PyInit_librust2py, |py, m| { try!(m.add(py, "__doc__", "This module is implemented in Rust.")); try!(m.add(py, "sum_as_string", py_fn!(py, sum_as_string_py(a: i64, b:i64)))); Ok(()) @@ -99,3 +99,6 @@ fn sum_as_string_py(_: Python, a:i64, b:i64) -> PyResult { ``` For `setup.py` integration, see https://github.com/PyO3/setuptools-rust + + +** This is fork of rust-cpython project https://github.com/dgrunwald/rust-cpython **