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
sci-physics/lhapdf: Use single python #29143
Conversation
Pull Request assignmentSubmitter: @APN-Pucky sci-physics/lhapdf: @gentoo/sci-physics Linked bugsBugs linked: 870139 In order to force reassignment and/or bug reference scan, please append Docs: Code of Conduct ● Copyright policy (expl.) ● Devmanual ● GitHub PRs ● Proxy-maint guide |
|
||
LICENSE="GPL-2" | ||
SLOT="0" | ||
KEYWORDS="~amd64" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't have to drop the ~x86
keyword here.
|
||
if use python; then | ||
cd "${S}"/wrappers/python || die | ||
distutils-r1_src_prepare |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because we are switching to single target we can probably simplify this ebuild by:
- dropping all the
if use python
stuff and let$(use_enable python)
take care of things. - switching from distutils-r1 eclass to python-single-r1 eclass. This would also get rid of the
DistutilsNonPEP517Build
warning.
Similar to the 6.5.X ebuilds.
Or maybe even enable python unconditionally since this is what the 6.5.X ebuilds seem to do.
# Copyright 1999-2023 Gentoo Authors | ||
# Distributed under the terms of the GNU General Public License v2 | ||
|
||
EAPI=7 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we want to bump it to EAPI=8
since we might have to hang on to this version for a while until python is fixed in the 6.5.X series.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I initial tried sth. similar to the 6.5.X EAPI=8 ebuilds for 6.3.0, but since the python interface/wrapper changed it did not work out of the box.
Admittedly, this PR is just the fastest/easiest fix to the bug.
I suspect the underlying reason this fixes the problem is because switching to single targets makes the distutils eclass run the |
Adding |
Single is fine, I don't think there is anything depending on |
Pull request CI reportReport generated at: 2023-01-17 13:53 UTC There are existing issues already. Please look into the report to make sure none of them affect the packages in question: |
|
||
EAPI=7 | ||
|
||
PYTHON_COMPAT=( python3_{7..9} ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you may want to update python version here, if possible. Both 7 and 8 are gone and 9 is near to its EOL
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately it does not compile with python3.10. For this package we have this version with working python bindings, but its stuck on 3.9. And we have the newer versions which compile with 3.10 and 3.11 but there's a serious bug in the python bindings: https://bugs.gentoo.org/875386.
Ideally we would patch this version to support 3.10 and 3.11, but I'm not sure if this is feasible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I got python3.10 running with 6.3.0 now, will update this PR soon.
I got inspired by
https://gitlab.com/hepcedar/lhapdf/-/issues/13 to delete the wrappers/python/lhapdf.cpp
and let make reproduce it with a more recent cython (which becomes a new dependency for lhapdf then).
src_configure() { | ||
CONFIG_SHELL="${EPREFIX}/bin/bash" \ | ||
econf \ | ||
--disable-static \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you'll move to EAPI=8 remember to drop this one as now it made by EAPI itself
Bug: https://bugs.gentoo.org/870139 Signed-off-by: Alexander Puck Neuwirth <alexander@neuwirth-informatik.de>
I could not get it working with the python-single-r1 eclass, so I sticked to the distutils-r1, but with PEP517 setuptools (still with |
Pull request CI reportReport generated at: 2023-01-17 16:53 UTC There are existing issues already. Please look into the report to make sure none of them affect the packages in question: |
REQUIRED_USE="${PYTHON_REQUIRED_USE}" | ||
|
||
BDEPEND=" | ||
dev-libs/boost:= |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need boost? The newer versions have dropped this dependency. And if we need boost, should we also depend on boost[${PYTHON_USEDEP}]
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At 6.3.0 they still have boost.m4
in the repo (https://gitlab.com/hepcedar/lhapdf/-/tree/lhapdf-6.3.0/m4), but the changelog suggests that since 2017-07-09 (6.2.0) no boost is needed. I tested it an no boost is needed.
|
||
cd "${S}"/wrappers/python || die | ||
distutils-r1_src_install | ||
python_optimize |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can drop this, distutils-r1_src_install
should already take care of python_optimize
.
I'll test it with |
Co-authored-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org> Signed-off-by: Alexander Puck Neuwirth <APN-Pucky@users.noreply.github.com>
Pull request CI reportReport generated at: 2023-01-18 11:58 UTC There are existing issues already. Please look into the report to make sure none of them affect the packages in question: |
Signed-off-by: Alexander Puck Neuwirth <alexander@neuwirth-informatik.de>
Pull request CI reportReport generated at: 2023-01-18 12:08 UTC There are existing issues already. Please look into the report to make sure none of them affect the packages in question: |
Great work, Thanks 👍 I tested with |
DISTUTILS_SINGLE_IMPL
forcespython
to be the selected python version thereby fixing linked bug.Bug: https://bugs.gentoo.org/870139
Signed-off-by: Alexander Puck Neuwirth alexander@neuwirth-informatik.de