diff --git a/.scripts/buildwheel.sh b/.scripts/buildwheel.sh new file mode 100644 index 00000000..dbb3df28 --- /dev/null +++ b/.scripts/buildwheel.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +set -e -x + +docker pull deltachat/wheel +rm -rf python/wheelhouse/* +cd $TRAVIS_BUILD_DIR +docker run --rm -it -v $(pwd):/io deltachat/wheel /io/python/wheelbuilder/build-wheels.sh + +devpi use https://m.devpi.net +devpi login dc --password $DEVPI_LOGIN + +devpi use dc/$TRAVIS_BRANCH || { + devpi index -c $TRAVIS_BRANCH + devpi use dc/$TRAVIS_BRANCH +} + +devpi upload --from-dir python/wheelhouse + +cd python +devpi upload diff --git a/.travis.yml b/.travis.yml index ea38e4d9..92f1313a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,21 +1,18 @@ sudo: required language: c - env: global: - - DEPLOY_USER=delta DEPLOY_SERVER="py.delta.chat" - + - DEPLOY_USER=delta DEPLOY_SERVER="py.delta.chat" + - secure: kxF/4pnq6jnhc/9BCtO8kQnoFg6w3/SMfy4zE54pqCzJEHKmOTVV0B+XX7epwYqOMI3aDDprVp+3+qi9+soz8ISN2Sedu1ZRje2ILv/OhHJUVkMLgAmDzzPBhlvlVXA18baIohxjJLGFHw2ZLz9aKHZENcM33ujs/4bSdODuWw6Re8C29aolh6+gvDlb/TmyB27GZoFa3tyc0EU0IhEYX4sPMkkFJVefvTPeKlQzKwJ0InfGMoWhlpr8CqFLsPHbcbDGrkoWXmmMOQny49itsr0AQoe9jpRnHAejrunOKlEnB5q+ok4p/1AQb5K7rZ0m93jbgyjT8Gz2GOeM49xd5M75ZzaLJXs6EkaWg7Y8kP7d7QpkXmKeQK+VjP1n7k2u+hGl9v89mk5aDvhceBBr4v0CjfLZKL3INd2/Z8CBggMyjpGhri5BCNOHxlFycqnsGv0ssz+BSElGQ8KeKtMVfqxkdikPTSpRCX+FT7DfZbM8KiDk0ezI3dEDRBMSZtQ4fngxdasC5FfrH8Y6g6LxAkByfwpGij6Rio0A7ICjlg8b0sJ7iEiFHy5lfkMSm+yoSEzyjFQb/D9JxnsnCTfqL+qr8j3IGGswEnDP9iRkw156gHneFsOMYW6wOtci7ZzYxdxTCGRt9y2HQiQQn8VgI9fLI77/ijDQmt13s1StikE= matrix: - - MESONARGS="" DOCS=t TESTS=t - - MESONARGS="-Dmonolith=true" TESTS=t - - MESONARGS="--default-library=static" - - MESONARGS="--wrap-mode=forcefallback --default-library=static" - + - MESONARGS="" DOCS=t TESTS=t WHEEL=t + - MESONARGS="-Dmonolith=true" TESTS=t + - MESONARGS="--default-library=static" + - MESONARGS="--wrap-mode=forcefallback --default-library=static" addons: apt: sources: - ubuntu-toolchain-r-test - # for newer doxygen: - sourceline: 'ppa:libreoffice/ppa' packages: - python3-pip - python3.5 @@ -27,40 +24,40 @@ addons: - python3.5-dev - python-software-properties - doxygen - install: - - export CC=gcc-7 - - export CXX=g++-7 - - sudo ln -sf /usr/bin/python3.5 /usr/bin/python3 - - sudo pip3 install meson - - wget https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-linux.zip - - unzip ninja-linux.zip - - sudo cp ninja /usr/bin - - wget http://http.debian.net/debian/pool/main/c/cyrus-sasl2/cyrus-sasl2_2.1.27~101-g0780600+dfsg.orig.tar.xz - - tar xfv cyrus-sasl2_2.1.27~101-g0780600+dfsg.orig.tar.xz - - pushd cyrus-sasl2-2.1.27~101-g0780600+dfsg.orig && ./autogen.sh && make && sudo make install && popd - +- export CC=gcc-7 +- export CXX=g++-7 +- sudo ln -sf /usr/bin/python3.5 /usr/bin/python3 +- sudo pip3 install meson +- wget https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-linux.zip +- unzip ninja-linux.zip +- sudo cp ninja /usr/bin +- wget http://http.debian.net/debian/pool/main/c/cyrus-sasl2/cyrus-sasl2_2.1.27~101-g0780600+dfsg.orig.tar.xz +- tar xfv cyrus-sasl2_2.1.27~101-g0780600+dfsg.orig.tar.xz +- pushd cyrus-sasl2-2.1.27~101-g0780600+dfsg.orig && ./autogen.sh && make && sudo + make install && popd script: - - doxygen --version - - mkdir -p builddir && pushd builddir - - meson $MESONARGS && ninja -v && sudo ninja install - - export LD_LIBRARY_PATH=/usr/local/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH - - sudo ldconfig -v - - popd && pushd docs - - if [ -n "$DOCS" ]; then doxygen; fi - - popd && pushd python - - virtualenv -p /usr/bin/python3.5 venv - - source venv/bin/activate - - pip install tox - - if [ -e /usr/local/lib/x86_64-linux-gnu/libdeltachat.so ]; then ldd /usr/local/lib/x86_64-linux-gnu/libdeltachat.so; fi - - if [ -n "$TESTS" ]; then tox; fi - - if [ -n "$DOCS" ]; then tox -e doc; fi - - popd - +- doxygen --version +- mkdir -p builddir && pushd builddir +- meson $MESONARGS && ninja -v && sudo ninja install +- export LD_LIBRARY_PATH=/usr/local/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH +- sudo ldconfig -v +- popd && pushd docs +- if [ -n "$DOCS" ]; then doxygen; fi +- popd && pushd python +- virtualenv -p /usr/bin/python3.5 venv +- source venv/bin/activate +- pip install tox devpi-client +- if [ -e /usr/local/lib/x86_64-linux-gnu/libdeltachat.so ]; then ldd /usr/local/lib/x86_64-linux-gnu/libdeltachat.so; + fi +- if [ -n "$TESTS" ]; then tox; fi +- if [ -n "$DOCS" ]; then tox -e doc; fi +- if [ -n "$WHEEL" ]; then bash $TRAVIS_BUILD_DIR/.scripts/buildwheel.sh ; fi +- popd deploy: provider: script skip_cleanup: true script: bash $TRAVIS_BUILD_DIR/.scripts/deploy.sh on: all_branches: true - condition: $DOCS + condition: "$DOCS" diff --git a/python/README.rst b/python/README.rst index d81714fe..ecacefb2 100644 --- a/python/README.rst +++ b/python/README.rst @@ -76,8 +76,7 @@ harm is running it again:: $ pwd # Make sure the current working directory is the .../deltachat-core # top of the deltachat-core project checkout. - $ docker build -t deltachat-wheel python/wheelbuilder/ - + $ docker build -t deltachat/wheel python/wheelbuilder/ Now you should have an image called `dcwhl` listed if you run `docker images`. This image can now be used to build both libdeltachat.so and diff --git a/python/setup.cfg b/python/setup.cfg index 7a99ba71..4744402f 100644 --- a/python/setup.cfg +++ b/python/setup.cfg @@ -2,5 +2,3 @@ formats = sdist.tgz no-vcs = 1 -[bdist_wheel] -universal = 1 diff --git a/python/setup.py b/python/setup.py index 47cf84d8..782ee09e 100644 --- a/python/setup.py +++ b/python/setup.py @@ -10,7 +10,7 @@ def main(): version=version, description='Python bindings for deltachat-core using CFFI', long_description=long_description, - author='holger krekel, bjoern petersen and contributors', + 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'), diff --git a/python/src/deltachat/__init__.py b/python/src/deltachat/__init__.py index 035bc4ef..920bd11a 100644 --- a/python/src/deltachat/__init__.py +++ b/python/src/deltachat/__init__.py @@ -2,7 +2,7 @@ from deltachat import capi, const from deltachat.capi import ffi from deltachat.account import Account # noqa -__version__ = "0.8.2.dev1" +__version__ = "0.9.0dev1" _DC_CALLBACK_MAP = {} diff --git a/python/src/deltachat/const.py b/python/src/deltachat/const.py index e9f1d1ca..b68a990d 100644 --- a/python/src/deltachat/const.py +++ b/python/src/deltachat/const.py @@ -62,6 +62,7 @@ DC_EVENT_MSG_FAILED = 2012 DC_EVENT_MSG_READ = 2015 DC_EVENT_CHAT_MODIFIED = 2020 DC_EVENT_CONTACTS_CHANGED = 2030 +DC_EVENT_LOCATION_CHANGED = 2035 DC_EVENT_CONFIGURE_PROGRESS = 2041 DC_EVENT_IMEX_PROGRESS = 2051 DC_EVENT_IMEX_FILE_WRITTEN = 2052 diff --git a/python/wheelbuilder/Dockerfile b/python/wheelbuilder/Dockerfile index 2bd1aae3..91398fe5 100644 --- a/python/wheelbuilder/Dockerfile +++ b/python/wheelbuilder/Dockerfile @@ -56,7 +56,7 @@ RUN ldconfig -v # Install cyrus-sasl ENV SASL_VERSION 2.1.27 ENV SASL_SHA256 26866b1549b00ffd020f188a43c258017fa1c382b3ddadd8201536f72efb05d5 -RUN curl -O ftp://ftp.cyrusimap.org/cyrus-sasl/cyrus-sasl-${SASL_VERSION}.tar.gz +RUN curl -O https://www.cyrusimap.org/releases/cyrus-sasl-${SASL_VERSION}.tar.gz RUN echo "${SASL_SHA256} cyrus-sasl-${SASL_VERSION}.tar.gz" | sha256sum -c - RUN tar zxf cyrus-sasl-${SASL_VERSION}.tar.gz RUN cd cyrus-sasl-${SASL_VERSION} && \