Skip to content

Commit

Permalink
Import setup from setuptools instead of distutils.core (#18)
Browse files Browse the repository at this point in the history
Recently users of newer distributions who build Noetic from source
noticed issues when importing setup from distutils.core.
This problem was discussed on
[Discourse](https://discourse.ros.org/t/ros-1-and-python-3-10s-deprecation-of-distutils-core/29834),
and we hope that we can make the needed updates to Noetic to allow for
future builds from source of Noetic.
As a first step, this PR introduces changes from the [Noetic Migration
Guide](https://wiki.ros.org/noetic/Migration#Setuptools_instead_of_Distutils)
that addresses the change to the setuptools module instead of
distutils.core and the corresponding buildtool_depend tags for python
2&3.
  • Loading branch information
MatthijsBurgh authored Oct 4, 2023
2 parents 3b1edd7 + 3af2243 commit ebf0f6e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions package.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
<?xml version="1.0"?>
<?xml-model
href="http://download.ros.org/schema/package_format3.xsd"
schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>rqt_dep</name>
<version>0.4.12</version>
Expand All @@ -15,6 +19,8 @@
<author>Thibault Kruse</author>

<buildtool_depend>catkin</buildtool_depend>
<buildtool_depend condition="$ROS_PYTHON_VERSION == 2">python-setuptools</buildtool_depend>
<buildtool_depend condition="$ROS_PYTHON_VERSION == 3">python3-setuptools</buildtool_depend>

<exec_depend version_gte="0.2.19">python_qt_binding</exec_depend>
<exec_depend condition="$ROS_PYTHON_VERSION == 2">python-rospkg</exec_depend>
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python

from distutils.core import setup
from setuptools import setup
from catkin_pkg.python_setup import generate_distutils_setup

d = generate_distutils_setup(
Expand Down

0 comments on commit ebf0f6e

Please sign in to comment.