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

Use an available python2 binary name in debian templates. #203

Merged
merged 2 commits into from
Jul 12, 2024

Conversation

nuclearsandwich
Copy link
Collaborator

Ubuntu Focal and Jammy install a python2 binary with python-all-dev.
Rather than requiring that tests and downstream packages always install python-is-python2 (seemingly unavailable on jammy), check the current path for each binary and use the first one found, preferring python when it is available to maintain current behavior but using python2 if it's the only option.

This unblocks testing python2 package generation with python3-stdeb in test-2and3.sh.

However, this case doesn't appear to be tested so I've added an additional case when testing python3.

Although I am planning to drop support for installing/running stdeb from python2 (#198) I am hoping to preserve, at least for a while, support for generating python2 packages using the python3 version of stdeb.

Ubuntu Focal and Jammy install python2 with python-all-dev.
Rather than requiring that tests and downstream packages always install
python-is-python2 (seemingly unavailable on jammy), check the current
path for each binary and use the first one found, preferring `python`
when it is available to maintain current behavior but using `python2` if
it's the only option.

This unblocks testing python2 package generation with python3-stdeb in
test-2and3.sh.
Although I am planning to drop support for installing/running stdeb from
python2 I am hoping to preserve, at least for a while, support for
generating python2 packages.

Howveer, this case doesn't appear to be tested so I've added an
additional case when testing python3.
@nuclearsandwich nuclearsandwich self-assigned this Jul 10, 2024
@nuclearsandwich nuclearsandwich changed the title Python2 binname Use an available python2 binary name in debian templates. Jul 10, 2024
@nuclearsandwich
Copy link
Collaborator Author

Part of me feels like there might be another more explicit way to deal with this but I'm not super inclined to put more time into it as long as this works.

Copy link

@cottsay cottsay left a comment

Choose a reason for hiding this comment

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

Seems like a reasonable approach to me.

@nuclearsandwich nuclearsandwich added this to the 0.10.1 milestone Jul 12, 2024
@nuclearsandwich nuclearsandwich merged commit b268e83 into master Jul 12, 2024
@nuclearsandwich nuclearsandwich deleted the python2-binname branch July 12, 2024 22:46
nuclearsandwich added a commit that referenced this pull request Nov 13, 2024
With the addition of #203, a missing Python 2 binary will raise an error
instead of assuming that the binary is called `python`. As a result,
this test script now fails on platforms where no Python 2 installation
is available.
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.

2 participants