mirror of https://github.com/Syncplay/syncplay
AppVeyor: migrate from conda to native Python
This commit is contained in:
parent
6b515e671c
commit
2ddc756a61
|
@ -1,43 +1,44 @@
|
||||||
environment:
|
environment:
|
||||||
MINICONDA: "C:\\Miniconda"
|
MINICONDA: "C:\\Miniconda"
|
||||||
|
PYTHON: "C:\\Python34"
|
||||||
|
PYTHON_VERSION: 3.4
|
||||||
|
PYTHON_ARCH: 32
|
||||||
|
|
||||||
platform: x86
|
platform: x86
|
||||||
|
|
||||||
configuration: Release
|
configuration: Release
|
||||||
|
|
||||||
init:
|
init:
|
||||||
- set PATH=C:\Miniconda;C:\Miniconda\Scripts;C:\Program Files (x86)\NSIS;%PATH%
|
- set PATH=%PYTHON%;%PYTHON%\Scripts;C:\Program Files (x86)\NSIS;%PATH%
|
||||||
- conda create -n syncplay -y
|
- python --version
|
||||||
- activate syncplay
|
- python -m site
|
||||||
- conda install python=3.5 -y
|
- python -m pip install -U pip setuptools wheel
|
||||||
- conda install pywin32 -y
|
- pip install -U pypiwin32==219
|
||||||
- conda install -c conda-forge pyside2 -y
|
- pip install pyside
|
||||||
- pip install twisted pyinstaller zope.interface
|
- pip install twisted
|
||||||
- type nul > C:\Miniconda\envs\syncplay\lib\site-packages\zope\__init__.py
|
- pip install py2exe
|
||||||
- type nul > C:\Miniconda\envs\syncplay\lib\site-packages\pyinstaller\loader\rthooks\pyi_rth_twisted.py
|
- pip install zope.interface
|
||||||
|
- type nul > C:\Python34\lib\site-packages\zope\__init__.py
|
||||||
- pip freeze
|
- pip freeze
|
||||||
- conda list
|
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- cd %APPVEYOR_BUILD_FOLDER%
|
- cd %APPVEYOR_BUILD_FOLDER%
|
||||||
- for /F "tokens=2 delims='" %%a in ('findstr version syncplay\__init__.py') do @set ver=%%a
|
- for /F "tokens=2 delims='" %%a in ('findstr version syncplay\__init__.py') do @set ver=%%a
|
||||||
- pyinstaller pyinstaller-client.spec
|
- python buildPy2exe.py
|
||||||
- pyinstaller pyinstaller-server.spec
|
- copy Syncplay-%ver%-Setup.exe Syncplay-%ver%-Setup-Py34.exe
|
||||||
- python buildInstaller.py
|
- type nul > syncplay_v%ver%\syncplay.ini
|
||||||
- copy Syncplay-%ver%-Setup.exe Syncplay-%ver%-Setup-Py35.exe
|
- copy resources\win_lua_note.txt syncplay_v%ver%\"VLC LUA Script installation.txt"
|
||||||
- type nul > dist\syncplay.ini
|
|
||||||
- copy resources\win_lua_note.txt dist\"VLC LUA Script installation.txt"
|
|
||||||
|
|
||||||
# Not a project with an msbuild file, build done at install.
|
# Not a project with an msbuild file, build done at install.
|
||||||
build: off
|
build: off
|
||||||
|
|
||||||
artifacts:
|
artifacts:
|
||||||
- path: 'dist'
|
- path: 'syncplay_v$(ver)'
|
||||||
type: zip
|
type: zip
|
||||||
name: Syncplay_$(ver)_Portable_py35
|
name: Syncplay_$(ver)_Portable_py34
|
||||||
|
|
||||||
- path: Syncplay-$(ver)-Setup-Py35.exe
|
- path: Syncplay-$(ver)-Setup-Py34.exe
|
||||||
name: Syncplay-$(ver)-Setup-Py35
|
name: Syncplay-$(ver)-Setup-Py34
|
||||||
|
|
||||||
# Push artefact to S3 bucket and list all
|
# Push artefact to S3 bucket and list all
|
||||||
before_deploy:
|
before_deploy:
|
||||||
|
|
|
@ -18,7 +18,7 @@ from distutils.core import setup
|
||||||
try:
|
try:
|
||||||
from py2exe.build_exe import py2exe
|
from py2exe.build_exe import py2exe
|
||||||
except ImportError:
|
except ImportError:
|
||||||
from py2exe.distutils_build_exe import py2exe
|
from py2exe.distutils_buildexe import py2exe
|
||||||
from string import Template
|
from string import Template
|
||||||
|
|
||||||
import syncplay
|
import syncplay
|
||||||
|
@ -629,7 +629,7 @@ class NSISScript(object):
|
||||||
totalSize = totalSize,
|
totalSize = totalSize,
|
||||||
)
|
)
|
||||||
with codecs.open(SETUP_SCRIPT_PATH, "w", "utf-8-sig") as outfile:
|
with codecs.open(SETUP_SCRIPT_PATH, "w", "utf-8-sig") as outfile:
|
||||||
outfile.write(contents.decode('utf-8'))
|
outfile.write(contents)
|
||||||
|
|
||||||
def compile(self):
|
def compile(self):
|
||||||
if not os.path.isfile(NSIS_COMPILE):
|
if not os.path.isfile(NSIS_COMPILE):
|
||||||
|
@ -720,8 +720,8 @@ info = dict(
|
||||||
# console=['syncplayServer.py', {"script":"syncplayClient.py", "icon_resources":[(1, "resources\\icon.ico")], 'dest_base': "Syncplay"}],
|
# console=['syncplayServer.py', {"script":"syncplayClient.py", "icon_resources":[(1, "resources\\icon.ico")], 'dest_base': "Syncplay"}],
|
||||||
options={'py2exe': {
|
options={'py2exe': {
|
||||||
'dist_dir': OUT_DIR,
|
'dist_dir': OUT_DIR,
|
||||||
'packages': 'PySide2.QtUiTools',
|
'packages': 'PySide.QtUiTools',
|
||||||
'includes': 'twisted, sys, encodings, datetime, os, time, math, PySide2, liburl, ast, unicodedata, _ssl',
|
'includes': 'twisted, sys, encodings, datetime, os, time, math, PySide, liburl, ast, unicodedata, _ssl',
|
||||||
'excludes': 'venv, doctest, pdb, unittest, win32clipboard, win32file, win32pdh, win32security, win32trace, win32ui, winxpgui, win32pipe, win32process, Tkinter',
|
'excludes': 'venv, doctest, pdb, unittest, win32clipboard, win32file, win32pdh, win32security, win32trace, win32ui, winxpgui, win32pipe, win32process, Tkinter',
|
||||||
'dll_excludes': 'msvcr71.dll, MSVCP90.dll, POWRPROF.dll',
|
'dll_excludes': 'msvcr71.dll, MSVCP90.dll, POWRPROF.dll',
|
||||||
'optimize': 2,
|
'optimize': 2,
|
||||||
|
@ -733,5 +733,5 @@ info = dict(
|
||||||
cmdclass = {"py2exe": build_installer},
|
cmdclass = {"py2exe": build_installer},
|
||||||
)
|
)
|
||||||
|
|
||||||
sys.argv.extend(['py2exe', '-p win32com ', '-i twisted.web.resource', '-i PySide2.QtCore', '-p PySide2.QtGui', '-i PySide2.QtWidgets'])
|
sys.argv.extend(['py2exe', '-p win32com ', '-i twisted.web.resource', '-i PySide.QtCore', '-i PySide.QtGui'])
|
||||||
setup(**info)
|
setup(**info)
|
||||||
|
|
|
@ -5,11 +5,11 @@ import site, sys
|
||||||
# libpath
|
# libpath
|
||||||
|
|
||||||
try:
|
try:
|
||||||
if (sys.version_info.major != 3) or (sys.version_info.minor < 5):
|
if (sys.version_info.major != 3) or (sys.version_info.minor < 4):
|
||||||
raise Exception("You must run Syncplay with Python 3.5 or newer!")
|
raise Exception("You must run Syncplay with Python 3.4 or newer!")
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
import warnings
|
import warnings
|
||||||
warnings.warn("You must run Syncplay with Python 3.5 or newer!")
|
warnings.warn("You must run Syncplay with Python 3.4 or newer!")
|
||||||
|
|
||||||
from syncplay.clientManager import SyncplayClientManager
|
from syncplay.clientManager import SyncplayClientManager
|
||||||
from syncplay.utils import blackholeStdoutForFrozenWindow
|
from syncplay.utils import blackholeStdoutForFrozenWindow
|
||||||
|
|
|
@ -6,11 +6,11 @@ import site, sys
|
||||||
# libpath
|
# libpath
|
||||||
|
|
||||||
try:
|
try:
|
||||||
if (sys.version_info.major != 3) or (sys.version_info.minor < 5):
|
if (sys.version_info.major != 3) or (sys.version_info.minor < 4):
|
||||||
raise Exception("You must run Syncplay with Python 3.5 or newer!")
|
raise Exception("You must run Syncplay with Python 3.4 or newer!")
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
import warnings
|
import warnings
|
||||||
warnings.warn("You must run Syncplay with Python 3.5 or newer!")
|
warnings.warn("You must run Syncplay with Python 3.4 or newer!")
|
||||||
|
|
||||||
from twisted.internet import reactor
|
from twisted.internet import reactor
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue