Ros2Setup
This project is a tiny python library made for ROS2 modules to simplify the packaging process.
Instead of having two files -setup.py and package.xml- with the same duplicated information, this module makes it easy dynamically import the information from the package.xml into the python setup file.
This way, only the package.xml file has to be edited, to prevent having the two files with conflicting information.
Installing
Either install with pip install ros2setup, or copy ros2setup.py next to your setup.py so that it is accessible from there.
Usage
In the setup.py file of your ROS2 package, change the hardcoded information to a call to Ros2Setup to pull the data from the XML file.
from setuptools import setup
from ros2setup import Ros2Setup
package_name = Ros2Setup.tag('name')
setup(
name=package_name,
version=Ros2Setup.tag('version'),
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=Ros2Setup.tag('maintainer'),
maintainer_email=Ros2Setup.attrib('maintainer', 'email'),
description=Ros2Setup.tag('description'),
license=Ros2Setup.tag('license'),
tests_require=['pytest'],
entry_points={
'console_scripts': [
'streamer = mypackage.submodule:main',
],
},
)
Metadata
Release files for ros2setup 1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| ros2setup-1.1.tar.gz | 2.6 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ros2setup-1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.2 kB
Release files / ros2setup-1.1.tar.gz
| Download URL | ros2setup-1.1.tar.gz |
|---|---|
| Size | 2.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b53d019332c716ec2e02dd37b9b5782c110fd58a6bbf84b787d13b72fe1ab0fd
|
|
BLAKE2b-256 checksum How to use checksums |
64a049a0d15185152058d336c1c8d7ade3011e43cad3f9a21c297c1d37aa2755
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.0
|
Release files / ros2setup-1.1-py3-none-any.whl
| Download URL | ros2setup-1.1-py3-none-any.whl |
|---|---|
| Size | 5.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
839bde217916280ba72f6c063eddbb35355b29d281e808b42beefc14c6d4fc5a
|
|
BLAKE2b-256 checksum How to use checksums |
fb87841776784a30d722a83bc6f3d5b565628701326d1b565db8cb4505cd9abc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.0
|
Security for ros2setup 1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.