1
0
Fork 0
mirror of https://github.com/deltachat/deltachat-core.git synced 2025-10-04 10:19:16 +02:00

Update python bindings to new headers naming

This fixes the python bindings build to work with the new layout of
the header files and new names.
This commit is contained in:
Floris Bruynooghe 2018-07-19 20:15:54 +02:00
parent 437bb33131
commit 3aeec2202a
4 changed files with 9 additions and 11 deletions

2
.gitignore vendored
View file

@ -45,6 +45,8 @@ po/*.insert-header
# ignore other files
.DS_Store
capi.abi3.so
# ignore build directory
builddir/
python/build

View file

@ -10,7 +10,7 @@ def ffibuilder():
builder.set_source(
'deltachat.capi',
"""
#include <deltachat/mrmailbox.h>
#include <deltachat/deltachat.h>
""",
libraries=['deltachat'],
)
@ -21,7 +21,7 @@ def ffibuilder():
cc = distutils.ccompiler.new_compiler(force=True)
distutils.sysconfig.customize_compiler(cc)
with tempfile.NamedTemporaryFile(mode='w', suffix='.h') as src_fp:
src_fp.write('#include <deltachat/mrmailbox.h>')
src_fp.write('#include <deltachat/deltachat.h>')
src_fp.flush()
with tempfile.NamedTemporaryFile(mode='r') as dst_fp:
cc.preprocess(source=src_fp.name,

View file

@ -5,12 +5,6 @@ import pytest
from deltachat import capi
@pytest.fixture
def tmppath(tmpdir):
return pathlib.Path(tmpdir.strpath)
def test_new():
mbox = capi.lib.mrmailbox_new(capi.ffi.NULL, capi.ffi.NULL, capi.ffi.NULL)
capi.lib.mrmailbox_close(mbox)
assert 0
def test_empty_context():
ctx = capi.lib.dc_context_new(capi.ffi.NULL, capi.ffi.NULL, capi.ffi.NULL)
capi.lib.dc_close(ctx)

View file

@ -27,8 +27,10 @@ extern "C" {
#endif
#ifndef PY_CFFI
#include <stdint.h>
#include <time.h>
#endif
#define DC_VERSION_STR "0.19.0"