| Summary: | app-forensics/openscap-0.9.12 - checking for headers required to compile python extensions... -/ /- print sys.prefix -/ /- SyntaxError: invalid syntax | ||
|---|---|---|---|
| Product: | Gentoo Linux | Reporter: | Willard Dawson <wfdawson> |
| Component: | Current packages | Assignee: | LABBE Corentin <clabbe.montjoie> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | proxy-maint, swift |
| Priority: | Normal | ||
| Version: | unspecified | ||
| Hardware: | AMD64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Package list: | Runtime testing required: | --- | |
| Attachments: |
emerge --info
build log emerge -pqv build environment build log emerge --info emerge -pqv build environment |
||
Created attachment 359064 [details]
build log
Created attachment 359066 [details]
emerge -pqv
Created attachment 359068 [details]
build environment
Corentin ping? The problem was detected by the configure:
checking for headers required to compile python extensions... File "<string>", line 1
import sys; print sys.prefix
^
SyntaxError: invalid syntax
File "<string>", line 1
import sys; print sys.exec_prefix
^
SyntaxError: invalid syntax
not found
Does this still happen with recent version of openscap ?
(In reply to clabbe.montjoie from comment #5) > The problem was detected by the configure: > checking for headers required to compile python extensions... File > "<string>", line 1 > import sys; print sys.prefix > ^ > SyntaxError: invalid syntax > File "<string>", line 1 > import sys; print sys.exec_prefix > ^ > SyntaxError: invalid syntax > not found > > Does this still happen with recent version of openscap ? This issue was opened against what was and still is the most recent version, app-forensics/openscap-0.9.12. Updating the file attachments with the most recent attempt. Created attachment 366002 [details]
build log
Created attachment 366004 [details]
emerge --info
Created attachment 366006 [details]
emerge -pqv
Created attachment 366008 [details]
build environment
Do you have multiple Pythons installed? If so, care to switch to Python 2.<something>? The syntax shown is not valid for Python 3, so we might need to mark it for Python-2 only (or fix it ourselves, but that might be a *very* *deep* rabbithole ;) (In reply to Sven Vermeulen from comment #11) > Do you have multiple Pythons installed? > > If so, care to switch to Python 2.<something>? The syntax shown is not valid > for Python 3, so we might need to mark it for Python-2 only (or fix it > ourselves, but that might be a *very* *deep* rabbithole ;) Switching to python2.7 from my current default of python3.3 did the trick. As that is apparently a strict dependency, openscap should require it, or look for an installed instance of 2.7 and actually use it, don't you think? Relying on system default when python 2.7 is readily available seems, well, unreliable. True. The ebuilds already mention this, but it hasn't been implemented further in the src_* functions I guess...
"""
PYTHON_DEPEND="2"
PYTHON_COMPAT=( python{2_5,2_6,2_7} )
"""
Seems like adding "python_setup" at the beginning of the src_configure() phase does the trick. If anyone else can confirm this, I'll gladly commit it. (In reply to Sven Vermeulen from comment #14) > Seems like adding "python_setup" at the beginning of the src_configure() > phase does the trick. If anyone else can confirm this, I'll gladly commit it. Works for me. `emerge app-forensics/openscap` with python3.3 set as system default completed successfully. (In reply to Willard Dawson from comment #15) > (In reply to Sven Vermeulen from comment #14) > > Seems like adding "python_setup" at the beginning of the src_configure() > > phase does the trick. If anyone else can confirm this, I'll gladly commit it. > > Works for me. `emerge app-forensics/openscap` with python3.3 set as system > default completed successfully. Looks like openscap-1.0.1.ebuild was released to us without integrating this patch, or for that matter without openscap-0.9.12.ebuild being updated. Should I open a new ticket for openscap-1.0.1 or is this one sufficient? The confirmation was still pending; no need for a new bugreport, I'll update the ebuilds accordingly. There ya go, fix implemented for 0.9.12, 1.0.1 and 9999. |
Created attachment 359062 [details] emerge --info emerge -uDN world from app-forensics/openscap-0.9.8 fails as described in Summary.