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

Restrict app_python to Python2 enabling builds on systems where Python3 is the default #1645

Closed
amessina opened this issue Sep 16, 2018 · 7 comments

Comments

Projects
None yet
3 participants
@amessina
Copy link
Contributor

commented Sep 16, 2018

The following change enables app_python (which only works with Python2 anyway) to build on systems where Python3 is the default (Fedora 29).

diff --git a/src/modules/app_python/Makefile b/src/modules/app_python/Makefile
index d1854c12e..c9ad254c3 100644
--- a/src/modules/app_python/Makefile
+++ b/src/modules/app_python/Makefile
@@ -9,7 +9,7 @@ NAME=app_python.so
 # the following to point to the correct instance. Module has been tested
 # to work with 2.6 and 2.5. Python 2.4 has been only confirmed to compile,
 # but no testing has been done with that.
-PYTHON?=python
+PYTHON?=python2
 
 PYTHON_VERSION=${shell ${PYTHON} -c "import distutils.sysconfig;print distutils.sysconfig.get_config_var('VERSION')"}
 PYTHON_LIBDIR=${shell ${PYTHON} -c "import distutils.sysconfig;print distutils.sysconfig.get_config_var('LIBDIR')"}

henningw added a commit that referenced this issue Sep 16, 2018

@henningw

This comment has been minimized.

Copy link
Contributor

commented Sep 16, 2018

Thank you, commited to git master. Will also backport to 5.0 and 5.1 branch.

@henningw henningw closed this Sep 16, 2018

henningw added a commit that referenced this issue Sep 16, 2018

henningw added a commit that referenced this issue Sep 16, 2018

@miconda

This comment has been minimized.

Copy link
Member

commented Sep 16, 2018

On macos there is no python2, but python and python2.7. So I guess this needs to be updated in the way of checking if python2 exits (which python2) and if yes, use it, otherwise set it to python. I expect that only distro having python3 are shipping python2, old distros with python 2.x only, likely don't have python2.

@henningw

This comment has been minimized.

Copy link
Contributor

commented Sep 16, 2018

Hi Daniel, I looked at opensuse, debian 8 and debian 9 - all have this python2 link, interesting that MacOS here is different. But will add something like this, would be great if you could test as I have no access to MacOS.

@henningw henningw reopened this Sep 16, 2018

@henningw

This comment has been minimized.

Copy link
Contributor

commented Sep 16, 2018

Daniel - could you give a52e7cb a quick test?

@miconda

This comment has been minimized.

Copy link
Member

commented Sep 16, 2018

Master branch compiles ok.

@henningw

This comment has been minimized.

Copy link
Contributor

commented Sep 16, 2018

Ok, thanks, will backport it as well.

@henningw henningw closed this Sep 16, 2018

@amessina

This comment has been minimized.

Copy link
Contributor Author

commented Sep 16, 2018

@henningw @miconda lightning quick. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.