Skip to content
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

Add support for Suite3 option to release into different suites based on python version. #147

Merged
merged 6 commits into from
Dec 5, 2019

Conversation

nuclearsandwich
Copy link
Collaborator

This pull request adds a new optional configuration field to stdeb.cfg: Suite3.
The Suite3 field contains an alternative distname value which is used when building with python3 only.
If the field is not present, python3 builds will use the Suite value or its default.
If a Suite3 field is present, running stdeb with both python2 and python3 will raise a ValueError since only one distname can be used.

The ROS team is hoping to use this feature to avoid releasing python2 variants of our packages onto newer Ubuntu versions where Python 2 support is not planned. It has been tested locally using this example config https://github.com/nuclearsandwich/bloom/blob/example-suite3/stdeb.cfg

@dirk-thomas dirk-thomas mentioned this pull request Nov 27, 2019
nuclearsandwich added a commit to ros-infrastructure/catkin_pkg that referenced this pull request Dec 3, 2019
This configuration option requires two recent changes in stdeb and
ros_release_python:
* astraw/stdeb#147
* ros-infrastructure/ros_release_python#33

The option allows a different set of suites to be set for Python 3
releases allowing us to forestall releasing Python2 versions of these
packages for platforms where we don't plan to support Python 2.
dirk-thomas pushed a commit to ros-infrastructure/catkin_pkg that referenced this pull request Dec 3, 2019
This configuration option requires two recent changes in stdeb and
ros_release_python:
* astraw/stdeb#147
* ros-infrastructure/ros_release_python#33

The option allows a different set of suites to be set for Python 3
releases allowing us to forestall releasing Python2 versions of these
packages for platforms where we don't plan to support Python 2.
Copy link
Collaborator

@dirk-thomas dirk-thomas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the patch.

stdeb/util.py Outdated Show resolved Hide resolved
README.rst Show resolved Hide resolved
stdeb/util.py Outdated Show resolved Hide resolved
In order to specify a default using the conventional format we must also
add a special case to the default regexp parser.
As noted we set the value to an empty string and the consuming code will
check for the empty string and use the value of the suite option
instead.
Previously:

With both Suite and Suite3 defined, you could not run `--with-python2
true --with-python3 true`.
Now you may do so if and only if the values of Suite and Suite3 are
identical.
@dirk-thomas
Copy link
Collaborator

Thanks for the contribution and iterating on it.

After reviewing the patch I am fairly confident it will work as desired. Also as long as the new option Suite3 is not set this shouldn't change the current behavior in any way.

@dirk-thomas dirk-thomas merged commit f01bbb9 into astraw:master Dec 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants