Conversation
This is needed (at least) when one customises the Python bindings installation directory using `PYTHON_LIB_INSTALL_DIR`. Since the `library_path` module will also be installed into the same directory as `stp.py`, this change should be safe to make even when one uses the default `PYTHON_LIB_INSTALL_DIR`. I moved this line up with the other imports because my linter was complaining about its location, but I don't mind moving it back to where it was originally. See stp#353 and stp#400.
|
Hmm, I'm not sure that this is immediately mergeable. Basically, this no longer works: export PYTHONPATH=$(readlink -f bindings/python/stp)
python3 ./bindings/python/stp/stp.pyThis is then a problem if we have a user that does this: from stp import SolverI need to have a think about the best way to solve this ... |
aytey
left a comment
There was a problem hiding this comment.
I'm marking this as "request changes", because it doesn't currently work with how our current users would expect.
|
Sure, let me have a closer look at this to see if I can fix that. |
|
Don't get me wrong; people from should point to one level above, but I am not sure they do. |
|
Does it currently work when pointed to one level from above? Because my impression is that it doesn't (but I'd want to test that with different configurations first). |
|
Yeah, because our |
|
Aha, I see. Actually, setting Maybe the fix here might look something like applying the change if you install |
|
Personally, I'd remove what's in Interestingly, there does appear to be a Is Homebrew "blocked" on this, or can we take a bit of time to work out a longer-term solution? |
|
We've got the time to work out a proper solution. |
|
Okay, let me have a think. I might opt for something even more disruptive (== remove the content of At least then it is really clear about how we expect the package to be imported. |
|
Sounds good! Though, I should probably mention that I'm currently unable to build off CMake was invoked as Adding the flags doesn't help. (Though IIRC you already pass I can open a separate issue to track this if you like unless it's a matter of me missing some flags I should be passing to CMake here, or if this is something you're otherwise already aware of. |
|
Yeah, release seems broken on macOS: |
|
I'm going to close this due to inactivity and the fact that this doesn't seem to be causing issues for many users. But if we're still doing something suboptimal / unconventional with our Python packaging, I'd still like to address it. Please let me know if you need this reopened. |
This is needed (at least) when one customises the Python bindings
installation directory using
PYTHON_LIB_INSTALL_DIR.Since the
library_pathmodule will also be installed into the samedirectory as
stp.py, this change should be safe to make even when oneuses the default
PYTHON_LIB_INSTALL_DIR.I moved this line up with the other imports because my linter was
complaining about its location, but I don't mind moving it back to where
it was originally.
See #353 and #400.