Skip to content

Commit a61abd6

Browse files
author
Franziska Geiger
committed
[GR-17909] CAPI and ginstall
PullRequest: graalpython/631
2 parents dd590d5 + a402ed3 commit a61abd6

File tree

4 files changed

+23
-5
lines changed

4 files changed

+23
-5
lines changed

graalpython/com.oracle.graal.python.cext/src/abstract.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -426,6 +426,10 @@ int PyBuffer_FillInfo(Py_buffer *view, PyObject *obj, void *buf, Py_ssize_t len,
426426
return 0;
427427
}
428428

429+
UPCALL_ID(PySequence_DelItem);
430+
int PySequence_DelItem(PyObject *s, Py_ssize_t i) {
431+
return UPCALL_CEXT_I(_jls_PySequence_DelItem, native_to_java(s), i);
432+
}
429433
// taken from CPython "Objects/abstract.c"
430434
static int _IsFortranContiguous(const Py_buffer *view) {
431435
Py_ssize_t sd, dim;

graalpython/com.oracle.graal.python.cext/src/ceval.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,10 @@ PyObject* PyEval_GetBuiltins() {
7070
return UPCALL_CEXT_O(_jls_PyEval_GetBuiltins);
7171
}
7272

73+
int PyEval_MergeCompilerFlags(PyCompilerFlags *cf) {
74+
return 0;
75+
}
76+
7377
UPCALL_ID(PyThread_allocate_lock);
7478
void* PyThread_allocate_lock() {
7579
return UPCALL_CEXT_O(_jls_PyThread_allocate_lock);

graalpython/lib-graalpython/modules/ginstall.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,8 @@ def PyYAML(**kwargs):
132132
def six(**kwargs):
133133
install_from_pypi("six==1.12.0", **kwargs)
134134

135-
def Cython(extra_opts=[], **kwargs):
136-
install_from_pypi("Cython==0.29.2", extra_opts=(['--no-cython-compile'] + extra_opts), **kwargs)
135+
def Cython(**kwargs):
136+
install_from_pypi("Cython==0.29.2", **kwargs)
137137

138138
def setuptools(**kwargs):
139139
try:
@@ -181,8 +181,13 @@ def Werkzeug(**kwargs):
181181
# print("Installing required dependency: pkgconfig")
182182
# pkgconfig(**kwargs)
183183
# install_from_pypi("h5py==2.9.0", **kwargs)
184-
185-
# Does not yet work
184+
# try:
185+
# import six
186+
# except ImportError:
187+
# print("Installing required dependency: six")
188+
# pkgconfig(**kwargs)
189+
# install_from_pypi("six==1.12.0", **kwargs)
190+
#
186191
# def keras_applications(**kwargs):
187192
# try:
188193
# import h5py

graalpython/lib-graalpython/python_cext.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,12 @@ def PyModule_SetDocString(module, string):
111111
def PyModule_NewObject(name):
112112
return moduletype(name)
113113

114+
##################### ABSTRACT
115+
116+
@may_raise(-1)
117+
def PySequence_DelItem(o,i):
118+
del o[i]
119+
return 0
114120

115121
@may_raise
116122
def PyModule_GetNameObject(module_obj):
@@ -776,7 +782,6 @@ def PyUnicode_AsUnicodeEscapeString(string):
776782
import _codecs as _codecs_module
777783
return _codecs_module.unicode_escape_encode(string)[0]
778784

779-
780785
@may_raise(-1)
781786
def PyUnicode_Tailmatch(s, substr, start, end, direction):
782787
if direction > 0:

0 commit comments

Comments
 (0)