SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
I am trying to create a package called helloworld that print out a message
cd ~/ro2_ws/src
ros2 pkg create --build-type ament_python helloworld
Inside helloworld/helloworld/nodefile.py
def main():
print('Hello world')
Inside helloworld/setup.py
from setuptools import setup
package_name = 'helloworld'
setup(
name=package_name,
version='0.0.0',
packages=[package_name],
data_files=[
('share/ament_index/resource_index/packages',
['resource/' + package_name]),
('share/' + package_name, ['package.xml']),
],
install_requires=['setuptools'],
zip_safe=True,
maintainer='TODO',
maintainer_email='TODO',
description='TODO: Package description',
license='TODO: License declaration',
tests_require=['pytest'],
entry_points={
'console_scripts': [
'nodefile = helloworld.nodefile:main'
],
},
)
I try to compile it
colcon build --packages-select helloworld
I get
--- stderr: helloworld
/usr/lib/python3.10/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
---
Finished <<< helloworld [0.76s]
Summary: 1 package finished [0.93s]
1 package had stderr output: helloworld
So what is going on