We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a13192e commit 47475edCopy full SHA for 47475ed
1 file changed
src/pkgcraft/pkg/base.pyx
@@ -1,10 +1,10 @@
1
from .. cimport pkgcraft_c as C
2
from ..atom cimport Cpv, Version
3
+from ..eapi cimport Eapi
4
from ..error cimport _IndirectInit
5
from ..repo cimport Repo
6
from ..restrict cimport Restrict
7
from . cimport EbuildPkg, FakePkg
-from ..eapi import EAPIS
8
9
10
cdef class Pkg(_IndirectInit):
@@ -34,11 +34,7 @@ cdef class Pkg(_IndirectInit):
34
@property
35
def eapi(self):
36
"""Get a package's EAPI."""
37
- eapi = C.pkgcraft_pkg_eapi(self.ptr)
38
- c_str = C.pkgcraft_eapi_as_str(eapi)
39
- id = c_str.decode()
40
- C.pkgcraft_str_free(c_str)
41
- return EAPIS[id]
+ return Eapi.from_ptr(C.pkgcraft_pkg_eapi(self.ptr))
42
43
44
def repo(self):
0 commit comments