1
0
Fork 0
mirror of https://github.com/deltachat/deltachat-core.git synced 2025-10-05 02:29:28 +02:00
deltachat-core/python
Floris Bruynooghe 0fd55137f6 Improve building of extension a little
- This renames deltachat.types to deltachat.props.  Not re-using a
  stdlib name is somewhat nice and solves a weird edge-case for me where
  the deltachat.types module can be hiding stdlib types by the deltachat
  directory appearing before the stlib on sys.path.

- When manually invoking the build script (rather then via
  pip/setup.py) it figures out where the package actually lives and
  makes sure the .so file ends up in that directory.  This is better
  than the current version which depends on the current directory and
  thus sometimes creates an alternate deltachat/ directory tree.

- Add some common python artefact files to gitignore.
2018-11-01 18:12:06 +02:00
..
doc add chat.delete(), chat.send_image, msg.filename, msg.filemime and msg.type.is_* 2018-10-06 19:11:48 +02:00
src/deltachat Improve building of extension a little 2018-11-01 18:12:06 +02:00
tests Improve building of extension a little 2018-11-01 18:12:06 +02:00
.gitignore improve docs and structure 2018-09-14 18:10:01 +02:00
CHANGELOG prepare new deltachat python release 2018-10-17 12:33:23 +02:00
MANIFEST.in shift message classes to own file 2018-10-07 14:20:24 +02:00
README.rst major rehault of docs at root and python level, 2018-09-27 16:10:33 +02:00
setup.cfg add Account.get_infostring() to show low-level core info 2018-10-08 16:47:14 +02:00
setup.py add python tests for new save_mime_headers config and get_mime_headers function 2018-10-16 00:15:54 +02:00
tox.ini - bump version 2018-10-06 21:37:05 +02:00

deltachat python bindings
=========================

This package provides bindings to the deltachat-core_ C-library
which provides imap/smtp/crypto handling as well as chat/group/messages
handling to Android, Desktop and IO user interfaces.

Install
-------

1. First you need to `install the delta-core C-library
   <https://github.com/deltachat/deltachat-core/blob/master/README.md>`_.

2. `Install virtualenv <https://virtualenv.pypa.io/en/stable/installation/>`_
   if you don't have it, then create and use a fresh clean python environment::

        virtualenv -p python3 venv
        source venv/bin/activate

   Afterwards invoking ``python`` or ``pip install`` will only modify files
   in your ``venv`` directory.

3. Install the bindings with pip::

        pip install deltachat

   Afterwards you should be able to successfully import the bindings::

        python -c "import deltachat"

You may now look at `examples <https://py.delta.chat/examples.html>`_.



Running tests
-------------

Get a checkout of the `deltachat-core github repository`_ and type::

    cd python
    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 specifying imap/smtp 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


.. _`deltachat-core github repository`: https://github.com/deltachat/deltachat-core
.. _`deltachat-core`: https://github.com/deltachat/deltachat-core