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

install-deps.sh: Install python headers on openSUSE/SLE #31434

Closed
wants to merge 1 commit into from

Conversation

toabctl
Copy link
Contributor

@toabctl toabctl commented Nov 6, 2019

When installing python modules from source, the python headers are
needed when the module needs to compile code. This is eg. needed for
xmlsec. Without Python.h available, ./install-deps.sh fails with:

/tmp/pip-wheel-Kx6zVj/xmlsec/src/platform.h:16:10:
fatal error: Python.h: No such file or directory

Fixes: https://tracker.ceph.com/issues/42665

Signed-off-by: Thomas Bechtold tbechtold@suse.com

When installing python modules from source, the python headers are
needed when the module needs to compile code. This is eg. needed for
xmlsec. Without Python.h available, ./install-deps.sh fails with:

/tmp/pip-wheel-Kx6zVj/xmlsec/src/platform.h:16:10: \
    fatal error: Python.h: No such file or directory

Fixes: https://tracker.ceph.com/issues/42665

Signed-off-by: Thomas Bechtold <tbechtold@suse.com>
@smithfarm
Copy link
Contributor

smithfarm commented Nov 7, 2019

master is supposed to be going all-out Python 3. Why is python-devel (Python 2 version) needed here?

At the very least, we should be careful not to introduce Python 2 onto a system that doesn't already have it...

@smithfarm smithfarm self-requested a review November 7, 2019 10:53
@toabctl
Copy link
Contributor Author

toabctl commented Nov 7, 2019

master is supposed to be going all-out Python 3. Why is python-devel (Python 2 version) needed here?

I just tried to call install-deps.sh and that package was missing (on my system where python2.7 and python3.7 are available).
Are you saying that master will be python3-only? So python2 support could/should be removed?

@smithfarm
Copy link
Contributor

smithfarm commented Nov 7, 2019

@toabctl Python 2 EOL is coming very soon and Octopus (planned release March 2020) will not support it. See, e.g.:

So, in master (the future Octopus), we can already act as if Python 2 is not supported.

@smithfarm
Copy link
Contributor

Nautilus supports CentOS 7, which is similar to openSUSE 42.* - i.e. a py2 distro. So, for nautilus we have to keep the py2 stuff around.

But assuming the plan doesn't change, Octopus will not support any py2 distros.

@tchaikov
Copy link
Contributor

tchaikov commented Nov 11, 2019

i think the problem Thomas ran into is that we are stilling building/installing wheels for python2.7 in install-deps.sh even if the distro already moved to python3. in this case, openSUSE Tumbleweed uses python3.7.

probably a better fix is to drop python2 tox tests in "make check" . see #31525

@stale
Copy link

stale bot commented Jan 10, 2020

This pull request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs for another 30 days.
If you are a maintainer or core committer, please follow-up on this pull request to identify what steps should be taken by the author to move this proposed change forward.
If you are the author of this pull request, thank you for your proposed contribution. If you believe this change is still appropriate, please ensure that any feedback has been addressed and ask for a code review.

@stale stale bot added the stale label Jan 10, 2020
@@ -414,6 +414,8 @@ else
echo "Using zypper to install dependencies"
zypp_install="zypper --gpg-auto-import-keys --non-interactive install --no-recommends"
$SUDO $zypp_install systemd-rpm-macros
# python header files are needed to install inside the virtualenv (eg. xmlsec needs the header files)
$SUDO $zypp_install python-devel python3-devel
Copy link
Contributor

Choose a reason for hiding this comment

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

i think we already install python%{python3_pkgversion}-devel, so presumably, python3-devel should be installed by

$SUDO $zypp_install $(rpmspec -q --buildrequires $DIR/ceph.spec)

and since we dropped python2 support in master, we don't need to install python-devel anymore.

@stale stale bot removed the stale label Jan 10, 2020
@smithfarm
Copy link
Contributor

This was fixed by #32153 which was subsequently reverted by 5d4c2c7 - at any rate, the issue should be gone now in master.

@smithfarm smithfarm closed this Jan 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants