-
-
Notifications
You must be signed in to change notification settings - Fork 594
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[use-case question] How to compile a package with subpackages, and use/import all its modules from python scripts? #69
Comments
Did you check out "Use Case 3 - Package compilation" in the User Manual ? It should be exactly that what you are doing. For factory branch I updated the manual a bit, because --recurse-directory is about file system, and we are moving to --include-package/module options, which will work with names of packages/modules instead. The use case you have works right now and is supposed to become even simpler. Yours, |
Thanks for your reply,
I'll check the factory version for the new doc and updates. |
Ah, that ".so" can of course not be included in the package. Compile with Nuitka as described, and produce a directory structure (yourself) like this: package1.so Nuitka will use the directory for loading stuff. It at least works for standalone mode, where it has to, and I think it will for package mode too. Please confirm to me if this works indeed. |
Hi Kay, 0.5.29.4 (from pip), and following the "Use Case 3", with I've got this warning, but it works properly, with and without swig.
factory branch (nuitka v 0.5.30rc4), the option --include-package/module does not seem to be present, and using I've setup a set o examples/tests to test nuitka, before applying to a real more complex scenario, I've also build a directory walker script that helps me building single modules recursively, cleaning build stuff and .py/.pyc and avoid compiling swig modules with nuitka. You can checkout from here: Note that the test case numbering is not related with the use cases from nuitka manual. |
Hi Kay Hayen, first of all, congratulations for your outstanding work with nuitka, and project methodologies. I find that the documentation is somehow poor, which I'd like to volunteer to contribute with use-cases and examples explained in the documentation/how-tos. On that regard I have some questions about a use-case, that I cannot figure out how to use.
I have a package, with sub-packages inside the directory python_path_root (see below),
I would like to build a single library with nuitka that contains all the packages and sub-packages, and be able to import any of its modules from other python scripts. Is this possible?
Example:
Package structure
The text was updated successfully, but these errors were encountered: