-
Notifications
You must be signed in to change notification settings - Fork 280
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/install wheel for Python packages #1196
base: noetic-devel
Are you sure you want to change the base?
Build/install wheel for Python packages #1196
Conversation
"--disable-pip-version-check" \ | ||
"--user" \ | ||
"--upgrade" \ | ||
"$WHEELFILE" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested various combinations of the --root
, --target
, and --prefix
options available in pip (see https://stackoverflow.com/a/53870246/109517) and the --root
+ --user
+ PYTHONUSERBASE
route seems the least hacky.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might also be over the top to be involving pip
here when it could be as simple as reaching into setuptools to invoke the install/run method:
Or using the new pypa/installer method as suggested in the original warning message: https://installer.pypa.io/en/stable/
|
||
<buildtool_export_depend>cmake</buildtool_export_depend> | ||
<buildtool_export_depend condition="$ROS_PYTHON_VERSION == 3">python3-setuptools</buildtool_export_depend> | ||
<buildtool_export_depend condition="$ROS_PYTHON_VERSION == 3">python3-build</buildtool_export_depend> | ||
<buildtool_export_depend condition="$ROS_PYTHON_VERSION == 3">python3-wheel</buildtool_export_depend> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably need a dep here for pip too; on NixOS at least neither the module nor executable is bundled with Python: https://search.nixos.org/packages?query=pip
Addresses another bit of spam we encountered migrating our ROS 1 codebase to Python 3.11:
I don't expect this to be accepted as it's a pretty significant change in operations for catkin and possibly even breaks core functionality such as the develspace (though we don't care as we now use colcon everywhere anyway). I'm offering it largely as a conversation piece to understand from the community if there is any interest in "modernizing" catkin's interface to Python in this way, and if so is calling the CLI interface to pypa/build and pip the correct way to go about it, or are there programmatic APIs that would be more logical to use? If we only want to continue supporting setuptools, then we can obviously use
setuptools.build_meta
, but if we're going to pay the cost of a wheel round trip anyway, why not put us on the path to working with pyproject-only packages too?On the colcon side, there's been some lively discussion going on for a while in colcon/colcon-core#208 and colcon/colcon-core#454.