Skip to content

Fix python bindings so PYTHONPATH isn't needed#2036

Merged
scpeters merged 9 commits intomasterfrom
scpeters/python_install
Sep 7, 2022
Merged

Fix python bindings so PYTHONPATH isn't needed#2036
scpeters merged 9 commits intomasterfrom
scpeters/python_install

Conversation

@scpeters
Copy link
Copy Markdown
Member

@scpeters scpeters commented Sep 4, 2022

This installs the python bindings for gz-math7 and sdformat13 to lib/python3.10 instead of lib/python and explicitly depends on the python@3.10 formula. This should allow our bindings to be used with home-brew's python@3.10 without setting PYTHONPATH.

@scpeters scpeters requested a review from azeey September 4, 2022 05:55
@scpeters
Copy link
Copy Markdown
Member Author

scpeters commented Sep 4, 2022

build bottle

Signed-off-by: Steve Peters <scpeters@openrobotics.org>
@scpeters
Copy link
Copy Markdown
Member Author

scpeters commented Sep 4, 2022

build bottle

@scpeters
Copy link
Copy Markdown
Member Author

scpeters commented Sep 4, 2022

brew audit failed:

osrf/simulation/gz-math7:
  * python modules have explicit framework links
    These python extension modules were linked directly to a Python
    framework binary. They should be linked with -undefined dynamic_lookup
    instead of -lpython or -framework Python.
      /usr/local/opt/gz-math7/lib/python3.10/site-packages/gz/math.cpython-310-darwin.so
      /usr/local/opt/gz-math7/lib/python3.10/site-packages/ignition/math.cpython-310-darwin.so

Signed-off-by: Steve Peters <scpeters@openrobotics.org>
@scpeters
Copy link
Copy Markdown
Member Author

scpeters commented Sep 6, 2022

trying again with patch from gazebosim/gz-math#497

build bottle

Signed-off-by: Steve Peters <scpeters@openrobotics.org>
Signed-off-by: Steve Peters <scpeters@openrobotics.org>
@scpeters
Copy link
Copy Markdown
Member Author

scpeters commented Sep 6, 2022

build bottle

Copy link
Copy Markdown
Member

@azeey azeey left a comment

Choose a reason for hiding this comment

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

Works great!

@scpeters scpeters merged commit 971ea50 into master Sep 7, 2022
@scpeters scpeters deleted the scpeters/python_install branch September 7, 2022 17:01
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.

3 participants