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

"make dist" doesn't work under Ubuntu 20.04 which uses Python 3 #73

Open
vadz opened this issue Jul 20, 2021 · 4 comments
Open

"make dist" doesn't work under Ubuntu 20.04 which uses Python 3 #73

vadz opened this issue Jul 20, 2021 · 4 comments

Comments

@vadz
Copy link
Collaborator

vadz commented Jul 20, 2021

Running bkl in dist-hook target fails under 20.04 because python is now Python 3 and we need Python 2 for it.

Unfortunately using python2 doesn't work everywhere neither (e.g. it fails under Ubuntu 18.04). Other than porting bkl to Python 3 (which is not trivial), is there any way to run it under all systems? All I can think about is to define PYTHON2 env var and use it in the makefile, which is a bit ugly but probably ought to work.

@vslavik
Copy link
Owner

vslavik commented Jul 21, 2021

This doesn't seem to be a xmlwrapp issue, is it? It just runs bkl as provided, so it's a matter of having the correct shebang in the bkl binary, no? E.g. it could be updated to hardcode /usr/bin/env python2.7 nowadays...

How is bkl installed?

@vadz
Copy link
Collaborator Author

vadz commented Jul 21, 2021

Of course it would be better to fix it in bkl, but this would require making a new release there, as we install it from the distribution tarball, so I hoped for a workaround here.

But you're right, it's probably best to do it there and just update the version being downloaded here to 1.2.7.

@vslavik
Copy link
Owner

vslavik commented Jul 21, 2021

I see. Seeing how the script does so much bkl-specific things, wouldn't the simplest fix be to do

sed --in-place -e 's,/usr/bin/env python,/usr/bin/env python2.7,g' bakefile-${BKL_VERSION}/src/tool.py

in the script?

@vadz
Copy link
Collaborator Author

vadz commented Sep 29, 2022

For now I've just added a CI build using Ubuntu 18.04 in a container (see #83) which will allow us to use it beyond the end of 2022, i.e. even after GitHub stops providing it natively, but the long term solution is probably to stop using bkl -- now that the generated solutions are included in the repository itself (or will be once/if #82 is merged), it's not really necessary any longer.

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

No branches or pull requests

2 participants