Skip to content

Commit

Permalink
Merge c898f0f into d6b167f
Browse files Browse the repository at this point in the history
  • Loading branch information
topic2k committed Feb 16, 2019
2 parents d6b167f + c898f0f commit 6671d1f
Show file tree
Hide file tree
Showing 1,539 changed files with 539,854 additions and 75,349 deletions.
79 changes: 44 additions & 35 deletions .appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,25 @@
# In AppVeyor's web config add an enviremont variable named GITHUB_TOKEN.
# Set it to a token you've created on GitHub.
# To draft a release on GitHub with AppVeyor, create a tag on master.
#
# To draft a release on GitHub with AppVeyor, create a tag in the form "deploy_VERSION"
# VERSION must be a valid version string (without leading 'v')
# this tag will be deleted and a new release "vVERSION" created.
# Example:
# manually created tag is: deploy_42.05.04-beta47
# automatically created releaase will be: v42.05.04-beta47


version: '{build}-{branch}'

# branches to build
branches:
# whitelist
# only:
# - master

# blacklist
except:
- gh-pages

#init:
# # Enable Remotedesktop and pause the build execution
Expand Down Expand Up @@ -37,6 +52,8 @@ install:
# Microsoft Visual C++ Redistributable 2008 (version min: 9.0.21022.8)
# - cinst vcredist2008

# - cinst pycharm

#- ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
- ps: |
$Env:PATH = $Env:PATH -replace "Python27", "Stackless27"
Expand All @@ -59,46 +76,38 @@ install:
" "
"--- " + $msg
" Installing..."
pip install -q $mod
pip install -q -q --disable-pip-version-check $mod
" Done."
}
" "
"--- Stackless 2.7.12150 x86"
$StacklessInstaller = $InstallersFolder + "python-2.7.12150-stackless.msi"
"--- Stackless 2.7.15150 x86"
$fname = "python-2.7.15150-stackless.msi"
$StacklessInstaller = $InstallersFolder + $fname
$StacklessInstallDir = "TARGETDIR=" + $PythonFolder
$StacklessURL = "http://www.stackless.com/binaries/python-2.7.12150-stackless.msi"
$StacklessURL = "http://www.stackless.com/binaries/" + $fname
Start-FileDownload $StacklessURL -Timeout 60000 -FileName $StacklessInstaller
" Installing..."
Start-Process MsiExec.exe -Arg "/I $StacklessInstaller /quiet /passive /qn /norestart $StacklessInstallDir" -Wait
" Done."
" "
"--- wxPython 3.0.2.0"
$WXInstaller = $InstallersFolder + "wxPython3.0-win32-3.0.2.0-py27.exe"
$WXURL = "http://downloads.sourceforge.net/wxpython/wxPython3.0-win32-3.0.2.0-py27.exe"
Start-FileDownload $WXURL -Timeout 60000 -FileName $WXInstaller
" Installing..."
Start-Process $WXInstaller -Arg "/VERYSILENT /SUPPRESSMSGBOXES" -NoNewWindow -Wait
" Done."
" "
"--- pip 9.0.1"
"--- pip 19.0.2"
" Updating..."
python -m pip install --no-cache-dir -q -U "pip==9.0.1"
python -m pip install --disable-pip-version-check --no-cache-dir -q -q -U "pip==19.0.2"
" Done."
" "
"--- setuptools 34.3.0"
" Updating..."
pip install -q -U "setuptools==34.3.0"
" Done."
PipInstall "wheel 0.29.0" "wheel==0.29.0"
PipInstall "sphinx 1.7.5" "sphinx==1.7.5"
PipInstall "commonmark 0.7.3" "commonmark==0.7.3"
PipInstall "pillow 3.4.2" "pillow==3.4.2"
# Pinned sphinx to 1.8.0 because 1.8.1 has changes that will throw a warning when building the docs
# https://github.com/sphinx-doc/sphinx/compare/v1.8.0...v1.8.1
PipInstall "sphinx 1.8.0" "sphinx==1.8.0"
PipInstall "wxPython 4.0.4" "wxPython==4.0.4"
PipInstall "commonmark 0.8.1" "commonmark==0.8.1"
PipInstall "pillow 5.4.1" "pillow==5.4.1"
PipInstall "py2exe 0.6.9" "py2exe_py2==0.6.9"
PipInstall "pycrypto 2.6.1" "pycrypto==2.6.1"
PipInstall "comtypes 1.1.3" "https://github.com/enthought/comtypes/archive/1.1.3.zip"
PipInstall "ctypeslib 0.5.6" "svn+http://svn.python.org/projects/ctypes/trunk/ctypeslib/#ctypeslib=0.5.6"
PipInstall "paramiko 2.2.1" "paramiko==2.2.1"
PipInstall "pywin32 223" pywin32==223
PipInstall "paramiko 2.4.2" "paramiko==2.4.2"
PipInstall "pywin32 224" "pywin32==224"
PipInstall "comtypes 1.1.7" "comtypes==1.1.7"
# PipInstall "comtypes 1.1.3" "https://github.com/enthought/comtypes/archive/1.1.3.zip"
# PipInstall "pycryptodome 3.7.2" "pycryptodome==3.7.2" # included in repo:lib27/site-packeages
}
" "
"--- pywin32 post install"
Expand All @@ -115,20 +124,21 @@ install:
#" Done."
" "
" "
# pip list
"=============== start the EventGhost build ==============="
" "
If ($Env:APPVEYOR_REPO_TAG.tolower() -eq "true" -and
$Env:APPVEYOR_REPO_TAG_NAME.tolower().startswith("deploy"))
{
# to do a release, create a tag in the form "Deploy_VERSION"
# VERSION must be a valid version string (without leading 'v')
# this tag will be deleted and a new release "vVERSION" created.
# do a release
git checkout -q master
$release = $Env:APPVEYOR_REPO_TAG_NAME.split("_", 2)[1]
$env:release = $Env:APPVEYOR_REPO_TAG_NAME.split("_", 2)[1]
$url = if($Env:SFTP_URL){' --docs --url "' + $env:SFTP_URL + '"'} else {''}
python "_build\Build.py" --build --package --release --version $release $url
python "_build\Build.py" --build --package --release --version $env:release $url
} Else {
# WIP
# start-process powershell_ise.exe
# $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
python "_build\Build.py" --build --package
.\EventGhost.exe -install
}
Expand All @@ -137,8 +147,8 @@ install:
# update the appveyor build version to be the same as the EventGhost version
$start = $env:SetupExe.IndexOf("_")
$length = $env:SetupExe.LastIndexOf("_") - $start
$build_version = $env:SetupExe.Substring($start + 1, $length - 1)
Update-AppveyorBuild -Version "$build_version"
$env:build_version = $env:SetupExe.Substring($start + 1, $length - 1)
Update-AppveyorBuild -Version "$env:build_version"
# Make sure the appveyor cache is only saved if our build was successfull
If (-Not (Test-Path(".\EventGhost.exe"))) {$env:APPVEYOR_CACHE_SKIP_SAVE = "true"}
Expand Down Expand Up @@ -223,7 +233,6 @@ notifications:
# # Enable Remotedesktop and pause the build execution
# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))


# notifications:
# - provider: GitHubPullRequest
# template: "{{#passed}}:white_check_mark: [Setup.exe](https://ci.appveyor.com/api/buildjobs/$(APPVEYOR_JOB_ID)/artifacts/_build%2Foutput%2F$(setup-exe)){{/passed}}{{#failed}}:x:{{/failed}} [Build {{&projectName}} {{buildVersion}} {{status}}]({{buildUrl}}) (commit {{commitUrl}} by @{{&commitAuthorUsername}})"
13 changes: 10 additions & 3 deletions _build/Build.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,30 +34,37 @@ class MyBuilder(builder.Builder):
name = "EventGhost"
description = "EventGhost Automation Tool"
companyName = "EventGhost Project"
copyright = u"Copyright © 2005-2016 EventGhost Project"
copyright = u"Copyright © 2005-2019 EventGhost Project"
mainScript = "EventGhost.pyw"

includeModules = [
"CommonMark",
"agithub",
"commonmark",
"comtypes",
"Crypto",
"docutils",
"isapi",
"jinja2",
"PIL",
"pip",
"pkg_resources",
"pycurl",
"pythoncom",
"pywin32",
"qrcode",
"requests",
"six",
"websocket",
"win32com",
"wx",
]

excludeModules = [
"eg",
"Crypto", # needs to be added manually because of strange import mechanism used in package
"_imagingtk",
"_tkinter",
"cffi", # bundled for no reason
"certifi",
"comtypes.gen",
#"ctypes.macholib", # seems to be for Apple
"curses",
Expand Down
26 changes: 16 additions & 10 deletions _build/builder/BuildDocs.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import os
import re
import shutil
import sphinx
import sphinx.cmd.build
from os.path import join

# Local imports
Expand Down Expand Up @@ -66,7 +66,10 @@ def Setup(self):
self.activated = bool(self.buildSetup.args.package)

def DoTask(self):

tmpDir = join(self.buildSetup.tmpDir, "chm")
if not os.path.exists(tmpDir):
os.makedirs(tmpDir)
call_sphinx('htmlhelp', self.buildSetup, tmpDir)

print "calling HTML Help Workshop compiler"
Expand All @@ -91,32 +94,35 @@ def Setup(self):
bool(self.buildSetup.args.websiteUrl)

def DoTask(self):
call_sphinx('html', self.buildSetup, join(self.buildSetup.websiteDir, "docs"))
tmpDir = join(self.buildSetup.websiteDir, "docs")
if not os.path.exists(tmpDir):
os.makedirs(tmpDir)
call_sphinx('html', self.buildSetup, tmpDir)


def call_sphinx(builder, build_setup, dest_dir):
WritePluginList(join(build_setup.docsDir, "pluginlist.rst"))
Prepare(build_setup.docsDir)
sphinx.build_main(
sphinx.cmd.build.build_main(
[
None,
"-D", "project=EventGhost",
"-D", "copyright=2005-2017 EventGhost Project",
"-D", "copyright=2005-2019 EventGhost Project",
"-D", "version=%s" % build_setup.appVersion,
"-D", "release=%s" % build_setup.appVersion,
# "-D", "templates_path=[]",
'-q', # be quiet
# "-a", # always write all output files
# "-E", # Don’t use a saved environment (the structure
"-E", # Don’t use a saved environment (the structure
# caching all cross-references),
# "-a", # always write all output files
'-q', # be quiet
# "-N", # Prevent colored output.
# "-P", # (Useful for debugging only.) Run the Python debugger,
# pdb, if an unhandled exception occurs while building.
# '-v', # verbosity, can be given up to three times
# '-v',
# '-v',
# write warnings and errors to file:
# '-w', join('output', 'sphinx_log_chm.txt'),
"-b", builder,
"-D", "version=%s" % build_setup.appVersion,
"-D", "release=%s" % build_setup.appVersion,
"-d", join(build_setup.tmpDir, ".doctree"),
build_setup.docsDir,
dest_dir,
Expand Down
3 changes: 3 additions & 0 deletions _build/builder/BuildImports.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,9 @@ def FindModulesInPath(path, prefix="", includeDeprecated=False):
if not eType == "DeprecationWarning":
print " ", moduleName, eType, eMesg
continue
if "-" in moduleName:
print "Module name contains invalid character: ", repr(moduleName)
continue
modules.append(moduleName)
return modules

Expand Down
38 changes: 18 additions & 20 deletions _build/builder/CheckDependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@

import glob
import os
import pip
from pip._internal.utils.misc import get_installed_distributions
import platform
import re
import sys
import warnings
from os.path import basename, exists, expandvars, join
from pip._vendor import requests
import requests
from shutil import copy2
from string import digits

Expand Down Expand Up @@ -131,7 +131,7 @@ def Check(self):

class InnoSetupDependency(DependencyBase):
name = "Inno Setup"
version = "5.5.8"
version = "5.5.9"
package = "innosetup"
#url = "http://www.innosetup.com/isdl.php"
url = "http://www.innosetup.com/download.php/is-unicode.exe"
Expand Down Expand Up @@ -160,7 +160,7 @@ def Check(self):
else:
result = [
p.version
for p in pip.get_installed_distributions()
for p in get_installed_distributions()
if str(p).startswith(self.name + " ")
]
if result:
Expand All @@ -175,8 +175,8 @@ def Check(self):

class PyWin32Dependency(DependencyBase):
name = "pywin32"
version = "220"
url = "https://eventghost.github.io/dist/dependencies/pywin32-220-cp27-none-win32.whl"
version = "224"
# url = "https://eventghost.github.io/dist/dependencies/pywin32-220-cp27-none-win32.whl"

def Check(self):
versionFilePath = join(
Expand All @@ -192,8 +192,8 @@ def Check(self):

class StacklessDependency(DependencyBase):
name = "Stackless Python"
version = "2.7.9"
url = "http://www.stackless.com/binaries/python-2.7.9150-stackless.msi"
version = "2.7.15"
url = "http://www.stackless.com/binaries/python-2.7.15150-stackless.msi"

def Check(self):
try:
Expand All @@ -206,20 +206,20 @@ def Check(self):

DEPENDENCIES = [
ModuleDependency(
name = "CommonMark",
module = "CommonMark",
version = "0.7.0",
name = "commonmark",
module = "commonmark",
version = "0.8.1",
),
ModuleDependency(
name = "comtypes",
module = "comtypes",
version = "1.1.2",
version = "1.1.7",
),
ModuleDependency(
name = "ctypeslib",
module = "ctypeslib",
version = "0.5.6",
url = "https://eventghost.github.io/dist/dependencies/ctypeslib-0.5.6-cp27-none-any.whl"
url = "svn+http://svn.python.org/projects/ctypes/trunk/ctypeslib/#ctypeslib=0.5.6"
),
ModuleDependency(
name = "future",
Expand All @@ -242,31 +242,29 @@ def Check(self):
name = "Pillow",
module = "PIL",
attr = "PILLOW_VERSION",
version = "3.1.1",
version = "5.4.1",
),
ModuleDependency(
name = "py2exe_py2",
module = "py2exe",
version = "0.6.9",
),
ModuleDependency(
name = "PyCrypto",
name = "pycryptodome",
module = "Crypto",
version = "2.6.1",
url = "https://eventghost.github.io/dist/dependencies/pycrypto-2.6.1-cp27-none-win32.whl",
version = "3.7.2",
),
PyWin32Dependency(),
ModuleDependency(
name = "Sphinx",
module = "sphinx",
version = "1.7.5",
version = "1.8.0",
),
StacklessDependency(),
ModuleDependency(
name = "wxPython",
module = "wx",
version = "3.0.2.0",
url = "https://eventghost.github.io/dist/dependencies/wxPython-3.0.2.0-cp27-none-win32.whl",
version = "4.0.4",
),
]

Expand Down

0 comments on commit 6671d1f

Please sign in to comment.