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:
parent
437bb33131
commit
3aeec2202a
4 changed files with 9 additions and 11 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -45,6 +45,8 @@ po/*.insert-header
|
|||
|
||||
# ignore other files
|
||||
.DS_Store
|
||||
capi.abi3.so
|
||||
|
||||
# ignore build directory
|
||||
builddir/
|
||||
python/build
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -27,8 +27,10 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
|
||||
#ifndef PY_CFFI
|
||||
#include <stdint.h>
|
||||
#include <time.h>
|
||||
#endif
|
||||
|
||||
|
||||
#define DC_VERSION_STR "0.19.0"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue