konstin
fe931a594f
#[pymodinit] now uses the function name as default module name
2018-07-10 00:13:02 +02:00
konstin
4013d40897
Add `py` prefix to the proc macros and move them into the root module
...
This is important because `proc_macro_path_invoc` isn't going to be stabilized soon.
2018-07-08 23:33:48 +02:00
konstin
80096ae143
rudtfmt the tests
...
With some careful refactoring alongside
2018-06-15 21:21:12 +02:00
konstin
f9ff7cd465
Ignore test because of a docmatic bug
...
See https://github.com/assert-rs/docmatic/issues/4
2018-06-15 15:59:22 +02:00
Kevin Phillips
7412eda4b0
Changed the import for the test_module to include ToPyObject in order to make travis CI pass
2018-05-21 16:34:44 +02:00
Kevin Phillips
9544adaf1d
Marked from_code on PyModule to only work with Python 3. It could work with Python 2 if you call, for example, Py_CompileStringFlags and pass std::prt::null_mut() as the last argument and when calling PyImport_ExecCodeModuleEx passing mutable pointers for the first and last arguments. I also added a test for this to test_module.rs
2018-05-21 16:03:21 +02:00
Martin Larralde
31ff8356b6
Add some additional test cases to `test_methods`
2018-05-14 18:47:13 +02:00
konstin
858a124374
Merge master
2018-05-05 15:50:04 +02:00
konstin
15204bab56
Better way to add functions to modules
2018-05-02 19:26:54 +02:00
konstin
0880ac166c
Merge master
2018-05-01 20:41:35 +02:00
konstin
5a8f5034d6
Fix make test
...
This is a follow-up to #147
2018-05-01 20:15:43 +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