Handle pip package versions like pip does #901
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
With most ROS-supported operating systems and their default package managers, major version changes will usually not be automatically introduced. This avoids major incompatibilities being introduced within a given, supported operating system version for packages installed through the default package manager. As PyPi retains Python modules which are not tied to operating system versions, major, breaking changes can be introduced unexpectedly. Therefore, there exists a need for
rosdepto be able to handle version management ofpip-installed modules. This PR introduces version checking torosdepwhen verifying pip package installation.Since
rosdeppasses package requirements directly from a keys YAML file topipwithout modification, the installation of packages with version requirements was already possible. However, if a package with a version requirement was specified and installed,rosdepdid not understand how to verify that the version requirement had been met. This PR adds this functionality.Since this PR uses the
packagingmodule, it automatically complies with https://peps.python.org/pep-0440/ and https://peps.python.org/pep-0508/.Covers the version-checking requirement (but not the extras-checkig one) of #900.