-
Notifications
You must be signed in to change notification settings - Fork 856
Closed
Labels
Description
Hi, I'm seeing the following error when compiling modules on the latest nightly:
error[E0658]: paths of length greater than one in macro invocations are currently unstable
--> src/lib.rs:50:3
|
50 | #[py::modinit(_word_count)]
| ^^^^^^^^^^^
|
= help: add #![feature(proc_macro_path_invoc)] to the crate attributes to enable
Then once I fix that by adding the feature attribute, I get an error when importing e.g. python -c "import word_count"
from https://github.com/PyO3/pyo3/tree/master/examples/word-count:
Python 2.7.14 (default, Apr 4 2018, 09:03:23)
[GCC 4.2.1 Compatible Apple LLVM 9.1.0 (clang-902.0.39.1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import word_count
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "word_count/__init__.py", line 4, in <module>
from ._word_count import search, search_sequential
ImportError: dynamic module does not define init function (init_word_count)
Can repro by running:
cd examples/word-count
python setup.py develop
python -c "import word_count"
(happens on both Python 2 and 3)
Any ideas?
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
Downgrade nightly for now to workaround pyo3 issue
Downgrade nightly for now to workaround pyo3 issue
konstin commentedon May 1, 2018
Yep, it's caused by rust-lang/rust#50120 and fixed in #147, which will be included in the next release.