diff --git a/.travis.yml b/.travis.yml index d358684..b901dd8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,7 +13,9 @@ matrix: - os: linux python: 3.6 - os: linux - python: 3.7-dev + sudo: required + dist: xenial + python: 3.7 - os: osx language: generic env: PYTHON_BIN=python2 diff --git a/appveyor.yml b/appveyor.yml index 881bda2..1bb8e0b 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,46 +1,8 @@ environment: matrix: - - PYTHON: "C:\\Python27" - PYTHON_ARCH: "32" - OPENSSL_LIB: "openssl-1.0.2k-vs2008" - - - PYTHON: "C:\\Python33" - PYTHON_ARCH: "32" - OPENSSL_LIB: "openssl-1.0.2k-vs2010" - - - PYTHON: "C:\\Python34" - PYTHON_ARCH: "32" - OPENSSL_LIB: "openssl-1.0.2k-vs2010" - - - PYTHON: "C:\\Python35" - PYTHON_ARCH: "32" - OPENSSL_LIB: "openssl-1.0.2k-vs2015" - - - PYTHON: "C:\\Python36" - PYTHON_ARCH: "32" - OPENSSL_LIB: "openssl-1.0.2k-vs2015" - - - PYTHON: "C:\\Python27-x64" - PYTHON_ARCH: "64" - OPENSSL_LIB: "openssl-1.0.2k-vs2008" - - - PYTHON: "C:\\Python33-x64" - PYTHON_ARCH: "64" - OPENSSL_LIB: "openssl-1.0.2k-vs2010" - DISTUTILS_USE_SDK: "1" - - - PYTHON: "C:\\Python34-x64" - PYTHON_ARCH: "64" - OPENSSL_LIB: "openssl-1.0.2k-vs2010" - DISTUTILS_USE_SDK: "1" - - - PYTHON: "C:\\Python35-x64" - PYTHON_ARCH: "64" - OPENSSL_LIB: "openssl-1.0.2k-vs2015" - - - PYTHON: "C:\\Python36-x64" + - PYTHON: "C:\\Python37-x64" PYTHON_ARCH: "64" - OPENSSL_LIB: "openssl-1.0.2k-vs2015" + OPENSSL_LIB: "openssl-1.1.0f-vs2017" install: - "%PYTHON%\\python.exe -m pip install wheel" diff --git a/setup.py b/setup.py index ec59766..76b20ad 100644 --- a/setup.py +++ b/setup.py @@ -16,7 +16,9 @@ import os, shutil, sys -if sys.platform == 'win32': +BUNDLE_SSL = sys.platform == 'win32' and sys.version_info < (3,7) + +if BUNDLE_SSL: LIB_NAMES = ['ssleay32MD', 'libeay32MD'] else: LIB_NAMES = ['ssl'] @@ -28,7 +30,7 @@ try: # Symlink the libs so they can be included in the package data - if sys.platform == 'win32': + if BUNDLE_SSL: for lib in LIB_NAMES: shutil.copy2('openssl/bin/%s.dll'%lib, 'sslpsk/') @@ -61,12 +63,12 @@ ], packages = ['sslpsk', 'sslpsk.test'], ext_modules = [_sslpsk], - package_data = {'' : ['%s.dll'%lib for lib in LIB_NAMES]}, + package_data = {'' : ['%s.dll'%lib for lib in LIB_NAMES]} if BUNDLE_SSL else {}, test_suite = 'sslpsk.test', zip_safe = False ) finally: - if sys.platform == 'win32': + if BUNDLE_SSL: for lib in LIB_NAMES: os.remove('sslpsk/%s.dll'%lib)