mirror of
https://github.com/chatmail/core.git
synced 2026-05-02 04:46:29 +03:00
update Python README
This commit is contained in:
@@ -3,56 +3,50 @@ deltachat python bindings
|
|||||||
=========================
|
=========================
|
||||||
|
|
||||||
This package provides bindings to the deltachat-core_ Rust -library
|
This package provides bindings to the deltachat-core_ Rust -library
|
||||||
which provides imap/smtp/crypto handling as well as chat/group/messages
|
which implements IMAP/SMTP/MIME/PGP e-mail standards and offers
|
||||||
handling to Android, Desktop and IO user interfaces.
|
a low-level Chat/Contact/Message API to user interfaces and bots.
|
||||||
|
|
||||||
|
|
||||||
Installing bindings from source (Updated: 21-Dec-2019)
|
Installing bindings from source (Updated: 20-Jan-2020)
|
||||||
=========================================================
|
=========================================================
|
||||||
|
|
||||||
Install Rust and Cargo first. Deltachat needs a specific nightly
|
Install Rust and Cargo first. Deltachat needs a specific nightly
|
||||||
version, the easiest is probably to first install Rust stable from
|
version, the easiest is probably to first install Rust stable from
|
||||||
rustup and then use this to install the correct nightly version.
|
rustup and then use this to install the correct nightly version.
|
||||||
|
|
||||||
Install rustup using::
|
Bootstrap Rust and Cargo by using rustup::
|
||||||
|
|
||||||
curl https://sh.rustup.rs -sSf | sh
|
curl https://sh.rustup.rs -sSf | sh
|
||||||
|
|
||||||
GIT clone the repo and use rustup to check the correct nightly version
|
Then GIT clone the deltachat-core-rust repo and get the actual
|
||||||
is available, if you do not have the right nightly version rustup will
|
rust- and cargo-toolchain needed by deltachat::
|
||||||
download and install it::
|
|
||||||
|
|
||||||
git clone https://github.com/deltachat/deltachat-core-rust
|
git clone https://github.com/deltachat/deltachat-core-rust
|
||||||
cd deltachat-core-rust
|
cd deltachat-core-rust
|
||||||
rustup show
|
rustup show
|
||||||
|
|
||||||
To install the python bindings make sure you have python installed, a
|
To install the Delta Chat Python bindings make sure you have Python3 installed.
|
||||||
recent 3.x version will also come with the required venv module.
|
|
||||||
E.g. on Debian-based systems `apt install python3 python3-pip
|
E.g. on Debian-based systems `apt install python3 python3-pip
|
||||||
python3-venv` should give you a usable python installation. If you
|
python3-venv` should give you a usable python installation.
|
||||||
prefer you can also
|
|
||||||
`Install virtualenv <https://virtualenv.pypa.io/en/stable/installation/>`_
|
|
||||||
as an alternative to `venv`.
|
|
||||||
|
|
||||||
Ensure you are in the deltachat-core-rust/python directory, create the
|
Ensure you are in the deltachat-core-rust/python directory, create the
|
||||||
vivrtual environment and activate it in your shell::
|
virtual environment and activate it in your shell::
|
||||||
|
|
||||||
cd python
|
cd python
|
||||||
python3 -m venv venv # or: virtualenv venv
|
python3 -m venv venv # or: virtualenv venv
|
||||||
source venv/bin/activate
|
source venv/bin/activate
|
||||||
|
|
||||||
You should now be able to build the python bindings using the supplied
|
You should now be able to build the python bindings using the supplied script::
|
||||||
script::
|
|
||||||
|
|
||||||
./install_python_bindings.py
|
./install_python_bindings.py
|
||||||
|
|
||||||
The installation might take a while, depending on your machine.
|
The installation might take a while, depending on your machine.
|
||||||
The bindings will be installed in release mode but with debug symbols.
|
The bindings will be installed in release mode but with debug symbols.
|
||||||
The release mode is necessary because some tests generate RSA keys
|
The release mode is currently necessary because some tests generate RSA keys
|
||||||
which is prohibitively slow in debug mode.
|
which is prohibitively slow in non-release mode.
|
||||||
|
|
||||||
After successful binding installation you can install a few more
|
After successful binding installation you can install a few more
|
||||||
python packages before finally running the tests::
|
Python packages before running the tests::
|
||||||
|
|
||||||
python -m pip install pytest pytest-timeout pytest-rerunfailures requests
|
python -m pip install pytest pytest-timeout pytest-rerunfailures requests
|
||||||
pytest -v tests
|
pytest -v tests
|
||||||
@@ -81,15 +75,15 @@ Installing pre-built packages (Linux-only)
|
|||||||
If you have a Linux system you may try to install the ``deltachat`` binary "wheel" packages
|
If you have a Linux system you may try to install the ``deltachat`` binary "wheel" packages
|
||||||
without any "build-from-source" steps.
|
without any "build-from-source" steps.
|
||||||
|
|
||||||
First of all we suggest to `Install virtualenv <https://virtualenv.pypa.io/en/stable/installation/>`_,
|
We suggest to `Install virtualenv <https://virtualenv.pypa.io/en/stable/installation/>`_,
|
||||||
then create a fresh python environment and activate it in your shell::
|
then create a fresh Python virtual environment and activate it in your shell::
|
||||||
|
|
||||||
virtualenv venv # or: python -m venv
|
virtualenv venv # or: python -m venv
|
||||||
source venv/bin/activate
|
source venv/bin/activate
|
||||||
|
|
||||||
Afterwards, invoking ``python`` or ``pip install`` will only
|
Afterwards, invoking ``python`` or ``pip install`` only
|
||||||
modify files in your ``venv`` directory and leave your system installation
|
modifies files in your ``venv`` directory and leaves
|
||||||
alone.
|
your system installation alone.
|
||||||
|
|
||||||
For Linux, we automatically build wheels for all github PR branches
|
For Linux, we automatically build wheels for all github PR branches
|
||||||
and push them to a python package index. To install the latest
|
and push them to a python package index. To install the latest
|
||||||
|
|||||||
Reference in New Issue
Block a user