From 1ea6fea6b4e3f1c02b5b3c65a49aba0e7b5040d1 Mon Sep 17 00:00:00 2001 From: fduxiao Date: Fri, 21 Sep 2018 22:59:51 +0800 Subject: [PATCH 1/2] add compiled lib to package --- pylibui/libui/sharedlibs/__init__.py | 2 ++ setup.py | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 pylibui/libui/sharedlibs/__init__.py diff --git a/pylibui/libui/sharedlibs/__init__.py b/pylibui/libui/sharedlibs/__init__.py new file mode 100644 index 0000000..d4b03c8 --- /dev/null +++ b/pylibui/libui/sharedlibs/__init__.py @@ -0,0 +1,2 @@ +# This file is left empty + diff --git a/setup.py b/setup.py index 140db72..7aa721a 100644 --- a/setup.py +++ b/setup.py @@ -5,5 +5,7 @@ name='pylibui', version='0.0.1', description='Python wrapper for libui', - packages=find_packages() + packages=find_packages(), + package_data={'pylibui.libui.sharedlibs': '*'}, + include_package_data=True, ) From 36a1e3b1c868605715c7cea378a952ac3d893e8a Mon Sep 17 00:00:00 2001 From: fduxiao Date: Sat, 22 Sep 2018 00:30:20 +0800 Subject: [PATCH 2/2] add 'if' before 'mkdir' --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index c5c2ead..77ebd15 100644 --- a/.travis.yml +++ b/.travis.yml @@ -37,7 +37,7 @@ before_script: - export BASE_DIR=$PWD && cd `mktemp -d` && export TEMP_LIB_DIR=$PWD && git clone https://github.com/andlabs/libui . && mkdir build && cd build && cmake .. && make && cd $BASE_DIR script: - - mkdir pylibui/libui/sharedlibs + - if [ ! -d pylibui/libui/sharedlibs ]; then mkdir pylibui/libui/sharedlibs ; fi - cp -f $TEMP_LIB_DIR/build/out/* pylibui/libui/sharedlibs/ - if [ "$TRAVIS_OS_NAME" == "linux" ]; then xvfb-run python -m unittest ; fi - if [ "$TRAVIS_OS_NAME" == "osx" ]; then python -m unittest ; fi