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

initial sphinx docs and many docstrings.

This commit is contained in:
holger krekel 2018-09-14 11:30:09 +02:00
parent dd060d7cf2
commit 66d6621f93
19 changed files with 1277 additions and 27 deletions

View file

@ -1,17 +1,18 @@
import setuptools
import os
import re
def main():
with open('README.rst') as fd:
long_description = fd.read()
long_description, version = read_meta()
setuptools.setup(
name='deltachat',
version='0.1',
version=version,
description='Python bindings for deltachat-core using CFFI',
long_description = long_description,
author='holger krekel and contributors',
author='holger krekel, bjoern petersen and contributors',
setup_requires=['cffi>=1.0.0'],
install_requires=['cffi>=1.0.0', 'requests', 'attr'],
install_requires=['cffi>=1.0.0', 'requests', 'attrs'],
packages=setuptools.find_packages('src'),
package_dir={'': 'src'},
cffi_modules=['src/deltachat/_build.py:ffibuilder'],
@ -25,6 +26,21 @@ def main():
],
)
def read_meta():
with open('README.rst') as fd:
long_description = fd.read()
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()
with open("README.rst") as f:
long_desc = f.read()
return long_desc, version
if __name__ == "__main__":
main()