Skip to content
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

Build the python poc #239

Open
wants to merge 3 commits into
base: moritz/pyapi
Choose a base branch
from
Open

Conversation

CzBalti
Copy link
Contributor

@CzBalti CzBalti commented Apr 26, 2024

Allow the developer to build the conan project in editable and non-editable mode.

…non-editable mode.

Command for build:
* editable:
        ```
        conan install conanfile.py cloe/0.22.0-develop@cloe/develop --install-folder="build" --build=outdated && \
        cmake --preset=debug && \
        cmake --build --preset=debug
        ```
* non-editable:
        `conan create . cloe/develop`
Copy link
Contributor

@cassava cassava left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's talk because I have some questions.

conanfile.py Outdated Show resolved Hide resolved
conanfile.py Outdated Show resolved Hide resolved
conanfile.py Outdated Show resolved Hide resolved
conanfile.py Outdated Show resolved Hide resolved
conanfile.py Outdated Show resolved Hide resolved
from ._cloe_bindings import CallbackResult
from _cloe_bindings import CallbackResult
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this necessary / safe?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Above you're still importing from ._runner, implying that mechanism still works.
So what is removing relative import gaining here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In editable mode the _cloe_bindings.so file is not next to the python file so relative import won't work.
Python finds it through the PYTHONPATH env variable.

python/python_api/cloe/_runner.py Outdated Show resolved Hide resolved
python/python_api/cloe/_runner.py Show resolved Hide resolved
@cassava cassava added this to the 0.26.0 milestone Jun 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants