diff --git a/.travis.yml b/.travis.yml index 180920911e2ca63469e337d7b73cd19aae98dd17..7ff4c8dcd9745cacd78f09c3102de1ca796b1304 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,21 +1,32 @@ language: shell -if: tag IS present -dist: xenial +if: tag IS present OR branch = build-fuckery +dist: bionic os: - linux - osx - windows addons: + apt: + packages: + - python3.7 + - python3.7-dev + - python3-pip + - python3-setuptools + - python3-tk homebrew: packages: - - python + - python@3.7 before_install: - chmod +x scripts/setup_${TRAVIS_OS_NAME}.sh - . scripts/setup_${TRAVIS_OS_NAME}.sh install: - - which python3 && export PYTHON=python3 || export PYTHON=python + - which python && export PYTHON=python || echo whatever + - which python3 && export PYTHON=python3 || echo whatever + - which python3.7 && export PYTHON=python3.7 || echo whatever - echo ${PYTHON} - - ${PYTHON} -m pip install -f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-16.04/ -r requirements.txt + - ${PYTHON} -m pip install -r requirements.txt +script: + - ${PYTHON} setup.py build before_deploy: - ${PYTHON} setup.py build - pushd build diff --git a/scripts/setup_linux.sh b/scripts/setup_linux.sh index 4f199b74c430ba8010a684b3bd2868e482cac0e5..f1f641af19bf623505554b29f35499b5d15f3fd3 100644 --- a/scripts/setup_linux.sh +++ b/scripts/setup_linux.sh @@ -1,7 +1 @@ #!/usr/bin/env bash -set -x - -sudo apt-get update -sudo apt-get install -y python3 python3-dev python3-pip python3-setuptools libgtk2.0-dev libgtk-3-dev libjpeg-dev libtiff-dev libsdl1.2-dev libgstreamer-plugins-base0.10-dev libnotify-dev freeglut3 freeglut3-dev libsm-dev libwebkitgtk-dev libwebkitgtk-3.0-dev - -set +x diff --git a/scripts/setup_osx.sh b/scripts/setup_osx.sh index 2dcd2b1c7cfa9a05a86b67e2119cf7423121de32..f1f641af19bf623505554b29f35499b5d15f3fd3 100644 --- a/scripts/setup_osx.sh +++ b/scripts/setup_osx.sh @@ -1,4 +1 @@ #!/usr/bin/env bash -set -x - -set +x diff --git a/scripts/setup_windows.sh b/scripts/setup_windows.sh index 612f10add69732bd75f110c69ddc716081d107d4..a8da53703a0b05014e232438a7915ae07da49a19 100644 --- a/scripts/setup_windows.sh +++ b/scripts/setup_windows.sh @@ -1,12 +1,5 @@ #!/usr/bin/env bash -set -x - -choco install python +choco install python --version 3.7.9 -y curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py -echo $PATH export PATH=/C/Python37:$PATH -which python python get-pip.py -python -m pip install --upgrade git+https://github.com/anthony-tuininga/cx_Freeze.git@master - -set +x diff --git a/setup.py b/setup.py index cf45e976d60368ff672e48cca694673c70747a7e..92300c86b3489d2e18e635f01640b09fc44a1cb6 100644 --- a/setup.py +++ b/setup.py @@ -11,10 +11,14 @@ buildOptions = dict(packages=[], excludes=[]) PYTHON_INSTALL_DIR = os.path.dirname(os.path.dirname(os.__file__)) if sys.platform == "win32": - buildOptions['include_files'] = [ - os.path.join(PYTHON_INSTALL_DIR, 'DLLs', 'libcrypto-1_1-x64.dll'), - os.path.join(PYTHON_INSTALL_DIR, 'DLLs', 'libssl-1_1-x64.dll'), - ] + dlls_folder = os.path.join(PYTHON_INSTALL_DIR, 'DLLs') + targets = ['libcrypto', 'libssl'] + include_files = [] + for dll in os.listdir(dlls_folder): + for target in targets: + if target.startswith(target): + include_files.append(os.path.join(dlls_folder, dll)) + buildOptions['include_files'] = include_files base = 'Win32GUI' if sys.platform == 'win32' else None