Packages on Rhino

Hi,

I would like to use my compas package in Rhino.
According to documentation additional packages to compas are installed like this:
python -m compas_rhino.install -p compas_mypackage
Does it have anything to do with that the package has linked library that is coming from pybind11 and I must use RPC: - rpc (compas.dev)

Update I guess the solution is below. Just would be good to know if there is a way to check if a process has been started?
If I skip these lines, would the proxy start automatically if no process was started?

proxy.stop_server()
proxy.start_server()

import compas_wood


from compas.rpc import Proxy
proxy = Proxy('compas_wood.joinery') # import module
proxy.stop_server()
proxy.start_server()

proxy.test() # run function from the module

Question
What is necessary to know when publishing your own package and running on Rhino?

Current situation
I am able to call the package rhino python, so the package is found:

Problem

I guess, the compiled .pyd file is not found so no functions can be called:

I also tried to add the folder link to the .pyd file in the editpythonscript, but this has no effect:

if you have a package that has wrappers for C++ code, you have to make sure that the functions for working with geometry in Rhino are separated from the functions relying on C++. the former are probably needed to create input data for and visualize the results of the latter. calls to the C++ wrappers will have to be made through RPC. therefore the pure Python “Rhino code” and the “C++ wrapper code” will have to reside in different modules in your package so they can be imported independently.

manually adding paths to the Python Module Search Paths is never needed, and will certainly not help to run C++ code directly in Rhino, since this is simply not possible.

when you create an RPC proxy, it will automatically try to reconnect to an existing server. if none is found, it will start a new one.

manually stopping and starting the server (i.e. proxy.restart_server()) is only needed if you want to reload the code that is running on the server, for example after making changes…

I will separate the code into individual modules. I did not know about this.


manually adding paths to the Python Module Search Paths is never needed, and will certainly not help to run C++ code directly in Rhino, since this is simply not possible.

when you create an RPC proxy, it will automatically try to reconnect to an existing server. if none is found, it will start a new one.

manually stopping and starting the server (i.e. proxy.restart_server() ) is only needed if you want to reload the code that is running on the server, for example after making changes…

Thank you for the explanation, now it is much clearer.


I will wait for further instructions in this thread, since I am struggling in the recent days to find a right solution: