mirror of
https://github.com/deltachat/deltachat-core.git
synced 2025-10-04 10:19:16 +02:00
add and check a simple readme, remove minversion, add some python/vim patterns to .gitignore
This commit is contained in:
parent
f09fa60a67
commit
d2e437a550
5 changed files with 87 additions and 24 deletions
6
.gitignore
vendored
6
.gitignore
vendored
|
@ -9,6 +9,7 @@
|
||||||
__pycache__
|
__pycache__
|
||||||
.pytest_cache
|
.pytest_cache
|
||||||
*.egg-info
|
*.egg-info
|
||||||
|
python/dist
|
||||||
|
|
||||||
# ignore Codeblocks temporary files and build directories.
|
# ignore Codeblocks temporary files and build directories.
|
||||||
# Codeblocks project file (*.cbp) is added although it may contain some user preferences (eg. program's arguments), it may be useful for some people
|
# Codeblocks project file (*.cbp) is added although it may contain some user preferences (eg. program's arguments), it may be useful for some people
|
||||||
|
@ -50,3 +51,8 @@ capi.abi3.so
|
||||||
# ignore build directory
|
# ignore build directory
|
||||||
builddir/
|
builddir/
|
||||||
python/build
|
python/build
|
||||||
|
|
||||||
|
# ignore python binding stuff
|
||||||
|
python/src/deltachat/capi*so
|
||||||
|
|
||||||
|
.*.swp
|
||||||
|
|
50
python/README.rst
Normal file
50
python/README.rst
Normal file
|
@ -0,0 +1,50 @@
|
||||||
|
|
||||||
|
deltachat python bindings
|
||||||
|
=========================
|
||||||
|
|
||||||
|
This package provides bindings to the delta-core_ C-library
|
||||||
|
which provides imap/smtp/crypto handling as well as chat/group/messages
|
||||||
|
handling to Android, Desktop and IO user interfaces.
|
||||||
|
|
||||||
|
Install
|
||||||
|
-------
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
|
||||||
|
Currently the install instructions exist only for Debian based systems (Ubuntu etc.).
|
||||||
|
|
||||||
|
First you need to execute all the build steps to install the delta-core C-library,
|
||||||
|
see https://github.com/deltachat/deltachat-core/blob/master/README.md#build
|
||||||
|
|
||||||
|
Next, you need to do perform::
|
||||||
|
|
||||||
|
pip install -e .
|
||||||
|
|
||||||
|
Afterwards you should be able to successfully import the bindings::
|
||||||
|
|
||||||
|
python -c "import deltachat"
|
||||||
|
|
||||||
|
|
||||||
|
Running tests
|
||||||
|
-------------
|
||||||
|
|
||||||
|
Install the delta-core C-library (see _Install) and then
|
||||||
|
type the following to execute tests::
|
||||||
|
|
||||||
|
pip install tox
|
||||||
|
tox
|
||||||
|
|
||||||
|
If you want to run functional tests that run against real
|
||||||
|
e-mail accounts, generate a "liveconfig" file where each
|
||||||
|
lines contains account settings, for example::
|
||||||
|
|
||||||
|
# liveconfig file for specifying real-life accounts
|
||||||
|
addr=some-email@example.org mail_pw=password
|
||||||
|
addr=other-email@example.org mail_pw=otherpassword
|
||||||
|
|
||||||
|
And then run the tests with this live-accounts config file::
|
||||||
|
|
||||||
|
tox -- --liveconfig liveconfig
|
||||||
|
|
||||||
|
|
||||||
|
.. _`delta-core`: https://github.com/deltachat/deltachat-core
|
|
@ -1,2 +1,3 @@
|
||||||
[devpi:upload]
|
[devpi:upload]
|
||||||
formats = sdist.tgz,bdist_wheel
|
formats = sdist.tgz,bdist_wheel
|
||||||
|
no-vcs = 1
|
||||||
|
|
|
@ -1,22 +1,30 @@
|
||||||
import setuptools
|
import setuptools
|
||||||
|
|
||||||
|
def main():
|
||||||
|
with open('README.rst') as fd:
|
||||||
|
long_description = fd.read()
|
||||||
|
|
||||||
|
setuptools.setup(
|
||||||
|
name='deltachat',
|
||||||
|
version='0.1',
|
||||||
|
description='Python bindings for deltachat-core using CFFI',
|
||||||
|
long_description = long_description,
|
||||||
|
author='Delta Chat contributors',
|
||||||
|
setup_requires=['cffi>=1.0.0'],
|
||||||
|
install_requires=['cffi>=1.0.0', 'requests'],
|
||||||
|
packages=setuptools.find_packages('src'),
|
||||||
|
package_dir={'': 'src'},
|
||||||
|
cffi_modules=['src/deltachat/_build.py:ffibuilder'],
|
||||||
|
classifiers=[
|
||||||
|
'Development Status :: 3 - Alpha',
|
||||||
|
'Intended Audience :: Developers',
|
||||||
|
'License :: OSI Approved :: GNU General Public License (GPL)',
|
||||||
|
'Programming Language :: Python :: 3',
|
||||||
|
'Topic :: Communications :: Email',
|
||||||
|
'Topic :: Software Development :: Libraries',
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
||||||
|
|
||||||
setuptools.setup(
|
|
||||||
name='deltachat',
|
|
||||||
version='0.1',
|
|
||||||
description='Python bindings for deltachat-core using CFFI',
|
|
||||||
author='Delta Chat contributors',
|
|
||||||
setup_requires=['cffi>=1.0.0'],
|
|
||||||
install_requires=['cffi>=1.0.0', 'requests'],
|
|
||||||
packages=setuptools.find_packages('src'),
|
|
||||||
package_dir={'': 'src'},
|
|
||||||
cffi_modules=['src/deltachat/_build.py:ffibuilder'],
|
|
||||||
classifiers=[
|
|
||||||
'Development Status :: 3 - Alpha',
|
|
||||||
'Intended Audience :: Developers',
|
|
||||||
'License :: OSI Approved :: GNU General Public License (GPL)',
|
|
||||||
'Programming Language :: Python :: 3',
|
|
||||||
'Topic :: Communications :: Email',
|
|
||||||
'Topic :: Software Development :: Libraries',
|
|
||||||
],
|
|
||||||
)
|
|
||||||
|
|
|
@ -26,13 +26,11 @@ deps =
|
||||||
commands =
|
commands =
|
||||||
flake8 src/deltachat
|
flake8 src/deltachat
|
||||||
flake8 tests/
|
flake8 tests/
|
||||||
# {envpython} scripts/check-rst.py
|
rst-lint --encoding 'utf-8' README.rst
|
||||||
|
|
||||||
[pytest]
|
[pytest]
|
||||||
minversion = 2.0
|
|
||||||
#--pyargs --doctest-modules --ignore=.tox
|
|
||||||
python_files = tests/test_*.py
|
python_files = tests/test_*.py
|
||||||
norecursedirs = .tox ja .hg cx_freeze_source
|
norecursedirs = .tox
|
||||||
xfail_strict=true
|
xfail_strict=true
|
||||||
|
|
||||||
[flake8]
|
[flake8]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue