feat: bring back and adapt python bindings with rust core

* import python, try to adapt for rust

* add missing wrapper functions

* - try to write up how to build python bindings
- strike some unused functions from deltachat.h

* adjustments to make tox work

* try to run circle-ci with python build

* don't do docs

* running cargo test as well

* don't run cargo test anymore, that's done in other ci jobs

* also build docs

* don't run doxygen anymore

* subst C with Rust

* a try to get better wheels

Closes #41
This commit is contained in:
holger krekel
2019-05-30 23:17:38 +02:00
committed by Friedel Ziegelmayer
parent a2fc127923
commit 6ce8374513
53 changed files with 3996 additions and 8 deletions

44
python/setup.py Normal file
View File

@@ -0,0 +1,44 @@
import setuptools
import os
import re
def main():
long_description, version = read_meta()
setuptools.setup(
name='deltachat',
version=version,
description='Python bindings for deltachat-core using CFFI',
long_description=long_description,
author='holger krekel, Floris Bruynooghe, Bjoern Petersen and contributors',
setup_requires=['cffi>=1.0.0'],
install_requires=['cffi>=1.0.0', 'requests', 'attrs', 'six'],
packages=setuptools.find_packages('src'),
package_dir={'': 'src'},
cffi_modules=['src/deltachat/_build.py:ffibuilder'],
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)',
'Programming Language :: Python :: 3',
'Topic :: Communications :: Email',
'Topic :: Software Development :: Libraries',
],
)
def read_meta():
with open(os.path.join("src", "deltachat", "__init__.py")) as f:
for line in f:
m = re.match('__version__ = "(\S*).*"', line)
if m:
version, = m.groups()
break
with open("README.rst") as f:
long_desc = f.read()
return long_desc, version
if __name__ == "__main__":
main()