mirror of
https://github.com/deltachat/deltachat-core.git
synced 2025-10-04 18:29:19 +02:00
(flub,hpk) introduce automated building of deltachat python bindings (as wheels) and upload them m.devpi.net/dc/BRANCHNAME
This commit is contained in:
parent
9f56b6e789
commit
3154f64fb5
8 changed files with 61 additions and 45 deletions
21
.scripts/buildwheel.sh
Normal file
21
.scripts/buildwheel.sh
Normal file
|
@ -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
|
21
.travis.yml
21
.travis.yml
|
@ -1,21 +1,18 @@
|
||||||
sudo: required
|
sudo: required
|
||||||
language: c
|
language: c
|
||||||
|
|
||||||
env:
|
env:
|
||||||
global:
|
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:
|
matrix:
|
||||||
- MESONARGS="" DOCS=t TESTS=t
|
- MESONARGS="" DOCS=t TESTS=t WHEEL=t
|
||||||
- MESONARGS="-Dmonolith=true" TESTS=t
|
- MESONARGS="-Dmonolith=true" TESTS=t
|
||||||
- MESONARGS="--default-library=static"
|
- MESONARGS="--default-library=static"
|
||||||
- MESONARGS="--wrap-mode=forcefallback --default-library=static"
|
- MESONARGS="--wrap-mode=forcefallback --default-library=static"
|
||||||
|
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
sources:
|
sources:
|
||||||
- ubuntu-toolchain-r-test
|
- ubuntu-toolchain-r-test
|
||||||
# for newer doxygen: - sourceline: 'ppa:libreoffice/ppa'
|
|
||||||
packages:
|
packages:
|
||||||
- python3-pip
|
- python3-pip
|
||||||
- python3.5
|
- python3.5
|
||||||
|
@ -27,7 +24,6 @@ addons:
|
||||||
- python3.5-dev
|
- python3.5-dev
|
||||||
- python-software-properties
|
- python-software-properties
|
||||||
- doxygen
|
- doxygen
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- export CC=gcc-7
|
- export CC=gcc-7
|
||||||
- export CXX=g++-7
|
- export CXX=g++-7
|
||||||
|
@ -38,8 +34,8 @@ install:
|
||||||
- sudo cp ninja /usr/bin
|
- 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
|
- 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
|
- 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
|
- pushd cyrus-sasl2-2.1.27~101-g0780600+dfsg.orig && ./autogen.sh && make && sudo
|
||||||
|
make install && popd
|
||||||
script:
|
script:
|
||||||
- doxygen --version
|
- doxygen --version
|
||||||
- mkdir -p builddir && pushd builddir
|
- mkdir -p builddir && pushd builddir
|
||||||
|
@ -51,16 +47,17 @@ script:
|
||||||
- popd && pushd python
|
- popd && pushd python
|
||||||
- virtualenv -p /usr/bin/python3.5 venv
|
- virtualenv -p /usr/bin/python3.5 venv
|
||||||
- source venv/bin/activate
|
- source venv/bin/activate
|
||||||
- pip install tox
|
- 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 [ -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 "$TESTS" ]; then tox; fi
|
||||||
- if [ -n "$DOCS" ]; then tox -e doc; fi
|
- if [ -n "$DOCS" ]; then tox -e doc; fi
|
||||||
|
- if [ -n "$WHEEL" ]; then bash $TRAVIS_BUILD_DIR/.scripts/buildwheel.sh ; fi
|
||||||
- popd
|
- popd
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
provider: script
|
provider: script
|
||||||
skip_cleanup: true
|
skip_cleanup: true
|
||||||
script: bash $TRAVIS_BUILD_DIR/.scripts/deploy.sh
|
script: bash $TRAVIS_BUILD_DIR/.scripts/deploy.sh
|
||||||
on:
|
on:
|
||||||
all_branches: true
|
all_branches: true
|
||||||
condition: $DOCS
|
condition: "$DOCS"
|
||||||
|
|
|
@ -76,8 +76,7 @@ harm is running it again::
|
||||||
|
|
||||||
$ pwd # Make sure the current working directory is the
|
$ pwd # Make sure the current working directory is the
|
||||||
.../deltachat-core # top of the deltachat-core project checkout.
|
.../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
|
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
|
images`. This image can now be used to build both libdeltachat.so and
|
||||||
|
|
|
@ -2,5 +2,3 @@
|
||||||
formats = sdist.tgz
|
formats = sdist.tgz
|
||||||
no-vcs = 1
|
no-vcs = 1
|
||||||
|
|
||||||
[bdist_wheel]
|
|
||||||
universal = 1
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ def main():
|
||||||
version=version,
|
version=version,
|
||||||
description='Python bindings for deltachat-core using CFFI',
|
description='Python bindings for deltachat-core using CFFI',
|
||||||
long_description=long_description,
|
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'],
|
setup_requires=['cffi>=1.0.0'],
|
||||||
install_requires=['cffi>=1.0.0', 'requests', 'attrs', 'six'],
|
install_requires=['cffi>=1.0.0', 'requests', 'attrs', 'six'],
|
||||||
packages=setuptools.find_packages('src'),
|
packages=setuptools.find_packages('src'),
|
||||||
|
|
|
@ -2,7 +2,7 @@ from deltachat import capi, const
|
||||||
from deltachat.capi import ffi
|
from deltachat.capi import ffi
|
||||||
from deltachat.account import Account # noqa
|
from deltachat.account import Account # noqa
|
||||||
|
|
||||||
__version__ = "0.8.2.dev1"
|
__version__ = "0.9.0dev1"
|
||||||
|
|
||||||
|
|
||||||
_DC_CALLBACK_MAP = {}
|
_DC_CALLBACK_MAP = {}
|
||||||
|
|
|
@ -62,6 +62,7 @@ DC_EVENT_MSG_FAILED = 2012
|
||||||
DC_EVENT_MSG_READ = 2015
|
DC_EVENT_MSG_READ = 2015
|
||||||
DC_EVENT_CHAT_MODIFIED = 2020
|
DC_EVENT_CHAT_MODIFIED = 2020
|
||||||
DC_EVENT_CONTACTS_CHANGED = 2030
|
DC_EVENT_CONTACTS_CHANGED = 2030
|
||||||
|
DC_EVENT_LOCATION_CHANGED = 2035
|
||||||
DC_EVENT_CONFIGURE_PROGRESS = 2041
|
DC_EVENT_CONFIGURE_PROGRESS = 2041
|
||||||
DC_EVENT_IMEX_PROGRESS = 2051
|
DC_EVENT_IMEX_PROGRESS = 2051
|
||||||
DC_EVENT_IMEX_FILE_WRITTEN = 2052
|
DC_EVENT_IMEX_FILE_WRITTEN = 2052
|
||||||
|
|
|
@ -56,7 +56,7 @@ RUN ldconfig -v
|
||||||
# Install cyrus-sasl
|
# Install cyrus-sasl
|
||||||
ENV SASL_VERSION 2.1.27
|
ENV SASL_VERSION 2.1.27
|
||||||
ENV SASL_SHA256 26866b1549b00ffd020f188a43c258017fa1c382b3ddadd8201536f72efb05d5
|
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 echo "${SASL_SHA256} cyrus-sasl-${SASL_VERSION}.tar.gz" | sha256sum -c -
|
||||||
RUN tar zxf cyrus-sasl-${SASL_VERSION}.tar.gz
|
RUN tar zxf cyrus-sasl-${SASL_VERSION}.tar.gz
|
||||||
RUN cd cyrus-sasl-${SASL_VERSION} && \
|
RUN cd cyrus-sasl-${SASL_VERSION} && \
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue