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
konstin
2ee1102ef2
Add test for module
2018-04-30 23:32:25 +02:00
konstin
6113428746
Allow defining functions outside of the module declarations
...
This commit consists of
* a proc macro to convert rust functions into python functions (`#[function]`),
* a macro to register a function in a module (`add_function_to_module!`)
* Documenting both the old and the new way in the book
2018-04-30 23:17:09 +02:00
konstin
7f68835877
Add unit test for module
2018-04-30 22:38:48 +02:00
konstin
1c276105e5
Generate better code
...
This reduces the size of the generated code and elinates at least two of the Err => Err antipatterns
2018-04-12 23:20:35 +02:00
konstin
1c0eac2690
Minor changes
2018-04-09 00:00:20 +02:00
konstin
ccbc73a385
Fix compilation on older nightlies
2018-04-08 00:43:49 +02:00
konstin
45bb09b3e8
Relax return type requirements
...
Allows returning essentially arbitrary types by wrapping them into a PyResult. This is done with a conversion trait that specializes for PyResult.
2018-04-06 17:22:09 +02:00
konstin
ced4eb532c
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-04-05 13:39:07 +02:00
konstin
e570c6b9b9
Move the codegen into its own crate
...
This makes the code generatioin reusable from third party crates.
2018-04-05 13:39:07 +02:00
Nikolay Kim
14ab12b89f
move doc generation to asfter script section
2018-04-03 10:32:10 -07:00
Nikolay Kim
cab682d855
use rust bin dir instead
2018-04-03 10:15:57 -07:00
Nikolay Kim
6b665e9a82
create cargo dir
2018-04-03 10:15:04 -07:00
Nikolay Kim
a5d0b30227
use precompiled mdbook
2018-03-30 14:51:13 -07:00
Nikolay Kim
0982cba184
use precompiled mdbook
2018-03-30 14:29:36 -07:00
Nikolay Kim
6719e152ba
Merge pull request #137 from PyO3/try_from_fixes
...
use PyTryFrom explicitly (fixes for 1.26.0-nightly)
2018-03-29 07:40:58 -07:00
Alexey Popravka
e66c5ebb83
use PyTryFrom explicitly
2018-03-29 17:36:05 +03:00