Commit Graph

937 Commits

Author SHA1 Message Date
Martin Larralde d1ec82d4a7 Remove `attr_with_parentheses` from `utils.rs` 2018-05-14 01:56:25 +02:00
Martin Larralde ecadcef0c9 Fix `items` in `pyo3-derive-backed::args` test module 2018-05-14 01:49:12 +02:00
Martin Larralde 4414d684e4 Tidy up `pyo3cls/src/lib.rs` 2018-05-14 01:14:50 +02:00
Martin Larralde d1d0dddb48 Improve error messages in `pyo3cls` 2018-05-14 01:01:23 +02:00
Martin Larralde d07c538779 Port `pyo3cls` to latest `syn` 2018-05-14 00:49:15 +02:00
Martin Larralde bf550c3c1f Make `process_functions_...` only accept `ItemFn` 2018-05-13 21:33:59 +02:00
Martin Larralde b43b481980 Merge #154 and #155 changed with `syn13` 2018-05-13 21:24:40 +02:00
konstin 103bde7db1 Improve build script 2018-05-13 15:55:13 +02:00
konstin a6944b6485 Bump minimum rust version
There were some significant changes in last weeks
2018-05-13 15:19:21 +02:00
konstin 46b9bd6a9f
Merge pull request #155 from PyO3/pyobject_macros
Refactor and Export Pyobject_* macros
2018-05-13 14:54:57 +02:00
konstin 5717463daf
Merge pull request #154 from konstin/capybara
Relax return types and add functions
2018-05-12 20:43:40 +02:00
Martin Larralde 416a7fd8d3
Export PyUnicode in Python3 as well 2018-05-08 12:54:21 +02:00
konstin d445d60e0a Export PyUnicode to fix #141 2018-05-08 10:42:17 +02:00
konstin cb5bae2c90 Export pyobejct_* macros
This is required for interaction with other native python extensions, e.g. numpy

Fixes #153
2018-05-07 23:47:23 +02:00
konstin 8c26020015 Refactor pyobject_* macros 2018-05-07 23:45:24 +02:00
konstin da3e9a90ed Add missing closing bracket 2018-05-05 16:14:26 +02:00
konstin 5dd7ae6ce4 Merge branch 'master' into capybara 2018-05-05 15:51:01 +02:00
konstin 858a124374 Merge master 2018-05-05 15:50:04 +02:00
konstin afcc87e82c Feature gate try_from
This was discovered https://github.com/PyO3/pyo3/issues/5#issuecomment-386579894
2018-05-05 14:43:37 +02:00
konstin 0b511e8684 Small warning fixes 2018-05-05 14:26:59 +02:00
konstin 8783d61c02
Merge pull request #139 from konstin/codegen_crate
Move codegen into its own crate
2018-05-05 14:21:42 +02:00
konstin 5a26fa4953 Fix redirect on github pages 2018-05-05 14:19:50 +02:00
Martin Larralde 3b6a87c8c2
Fix wrong repository name in `.travis.yml` 2018-05-04 18:34:05 +02:00
Martin Larralde 70bdf5e93c
Tidy up Travis-CI (#152)
* Use Travis-CI build matrix to setup environment
* Setup Travis cache 
* Use `sccache` to cache compiled artifacts
* Use `setup.sh` script to setup Travis-CI
* Add more tests to `ci/travis` to lighten `.travis.yml`
* Use `script` deployment to run `kcov` in Travis-CI
* Export `RUSTC_WRAPPER` in the Travis configuration directly
* Fix wrong Python `3.7` version in Travis configuration
* Fix `ci/travis/cover.sh`
* Prevent Travis-CI from cleaning build artifacts
* Recompile `kcov` only when needed in Travis-CI
* Collect coverage in parallel
* Add github-pages deployment script
2018-05-04 18:20:28 +02:00
konstin 9dc76610b9
Merge pull request #150 from konstin/test_class
Split up test_class into multiple files
2018-05-02 21:06:03 +02:00
konstin 3e8a36b297 Split up test_class into multiple files 2018-05-02 20:56:11 +02:00
konstin 57048bc5fc Merge branch 'master' into capybara 2018-05-02 19:32:56 +02:00
konstin 15204bab56 Better way to add functions to modules 2018-05-02 19:26:54 +02:00
Martin Larralde 7f49673fae
Merge pull request #149 from althonos/master
Fix `exception` tests failing with Python 2
2018-05-02 16:02:39 +02:00
Martin Larralde cc352dade3 Fix `exception` tests failing with Python 2 2018-05-02 13:54:59 +02:00
Martin Larralde b64977fa8b
Merge pull request #142 from althonos/doctests
Add tests for the guide book using `docmatic`
2018-05-02 10:43:03 +02:00
Martin Larralde b80b85539b Remove occurrences of `py::methods` and `py::class` 2018-05-01 23:17:42 +02:00
Martin Larralde 3554248615 Bump `docmatic` test dependency to `0.1.2` 2018-05-01 23:01:29 +02:00
Martin Larralde 80b3ce7801 Use new `docmatic` API 2018-05-01 22:59:49 +02:00
Martin Larralde 57de066a6b Use `docmatic` with additional arguments 2018-05-01 22:59:49 +02:00
Martin Larralde 87e3f5d600 Make `guide_path` immutable in `test_doc` 2018-05-01 22:59:49 +02:00
Martin Larralde 4dccd556b7 Fix `conversions.md` stubs to work with Py2 as well 2018-05-01 22:59:49 +02:00
Martin Larralde 0963a6052c Add stubs to `conversions.md` to allow more tests to run 2018-05-01 22:59:49 +02:00
Martin Larralde f12af1653d Fix guide documentation to pass doctests 2018-05-01 22:59:49 +02:00
Martin Larralde aed4af9a1e Add documentation tests for `guide/exception.md` 2018-05-01 22:59:49 +02:00
Martin Larralde 79491db60a Add documentation tests for `guide/overview.md` 2018-05-01 22:59:49 +02:00
Martin Larralde 2a618698cf Add `docmatic` to test dependencies 2018-05-01 22:59:49 +02:00
konstin 0880ac166c Merge master 2018-05-01 20:41:35 +02:00
konstin 2fcac85003 Add version in Cargo.toml
Following https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#specifying-path-dependencies, we need a version for path dependencies
2018-05-01 20:25:20 +02:00
konstin cb6c287f1f Expect the pyo3 crate to be in scope for the codegen
This allows using generated code from crates that do not directly depend on pyo3.

E.g.:

```rust
extern crate my_pyo3_wrapper;

use my_pyo3_wrapper::pyo3;

#[py::modinit(rust2py)]
fn init_mod(py: Python, m: &PyModule) -> PyResult<()> {
    // ...
    Ok(())
}
2018-05-01 20:24:34 +02:00
konstin 29fdc05b60 Move the codegen into its own crate
This makes the code generatioin reusable from third party crates.
2018-05-01 20:24:32 +02:00
konstin 5a8f5034d6 Fix make test
This is a follow-up to #147
2018-05-01 20:15:43 +02:00
konstin e3b74498c8
Merge pull request #146 from konstin/modules_and_functions
Add test for module
2018-05-01 19:26:47 +02:00
konstin 4735c2c516
Merge pull request #147 from konstin/proc_macro_path_invoc
Fix compilation on nightly
2018-05-01 18:59:43 +02:00
konstin d0c42dfcc1 Fix compilation on nightly 2018-05-01 15:44:38 +02:00