[Pkg-bitcoin-commits] [python-quamash] 259/269: Cleanup powershell and fix build problems
Jonas Smedegaard
dr at jones.dk
Fri Nov 24 11:26:42 UTC 2017
This is an automated email from the git hooks/post-receive script.
js pushed a commit to branch master
in repository python-quamash.
commit 15747e41ebef74861ac80ce0d93202af0ead733d
Author: Mark Harviston <mark.harviston at gmail.com>
Date: Wed Nov 18 13:05:54 2015 -0800
Cleanup powershell and fix build problems
PyQt wasn't installing because the registry needs to be set to tell the installer
where to install PyQt too.
This isn't the prettiest powershell, but it's maybe slightly prettier?
---
appveyor.yml | 6 ++---
appveyor/install.ps1 | 65 +++++++++++++++++++++++++++-------------------------
2 files changed, 37 insertions(+), 34 deletions(-)
diff --git a/appveyor.yml b/appveyor.yml
index 665e124..f9f180b 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -2,17 +2,17 @@ environment:
matrix:
- PYTHON: "C:\\Python34"
- PYTHON_VERSION: "3.4.1"
+ PYTHON_VERSION: "3.4.3"
PYTHON_ARCH: "32"
QTIMPL: "PySide"
- PYTHON: "C:\\Python34"
- PYTHON_VERSION: "3.4.1"
+ PYTHON_VERSION: "3.4.3"
PYTHON_ARCH: "32"
QTIMPL: "PyQt4"
- PYTHON: "C:\\Python34"
- PYTHON_VERSION: "3.4.1"
+ PYTHON_VERSION: "3.4.3"
PYTHON_ARCH: "32"
QTIMPL: "PyQt5"
diff --git a/appveyor/install.ps1 b/appveyor/install.ps1
index 4fb8763..8b03498 100644
--- a/appveyor/install.ps1
+++ b/appveyor/install.ps1
@@ -3,47 +3,50 @@
# License: CC0 1.0 Universal: http://creativecommons.org/publicdomain/zero/1.0/
# Adapted by Mark Harviston <mark.harviston at gmail.com>
-$BASE_URL = "https://www.python.org/ftp/python/"
$GET_PIP_URL = "https://bootstrap.pypa.io/get-pip.py"
$GET_PIP_PATH = "C:\get-pip.py"
function InstallPip ($python_home) {
- $pip_path = $python_home + "\Scripts\pip.exe"
- $python_path = $python_home + "\python.exe"
- if (-not(Test-Path $pip_path)) {
- Write-Host "Installing pip..."
- $webclient = New-Object System.Net.WebClient
- $webclient.DownloadFile($GET_PIP_URL, $GET_PIP_PATH)
- Write-Host "Executing:" $python_path $GET_PIP_PATH
- Start-Process -FilePath "$python_path" -ArgumentList "$GET_PIP_PATH" -Wait -Passthru
- } else {
- Write-Host "pip already installed."
- }
+ $pip_path = $python_home + "\Scripts\pip.exe"
+ $python_path = $python_home + "\python.exe"
+ if (-not(Test-Path $pip_path)) {
+ Write-Host "Installing pip..."
+ $webclient = New-Object System.Net.WebClient
+ $webclient.DownloadFile($GET_PIP_URL, $GET_PIP_PATH)
+ Write-Host "Executing:" $python_path $GET_PIP_PATH
+ Start-Process -FilePath "$python_path" -ArgumentList "$GET_PIP_PATH" -Wait -Passthru
+ } else {
+ Write-Host "pip already installed."
+ }
}
function InstallPackage ($python_home, $pkg) {
- $pip_path = $python_home + "\Scripts\pip.exe"
- & $pip_path install $pkg
+ $pip_path = $python_home + "\Scripts\pip.exe"
+ & $pip_path install $pkg
}
function main () {
- InstallPip $env:PYTHON
- InstallPackage $env:PYTHON wheel
- InstallPackage $env:PYTHON pytest
- if($env:PYTHON_VERSION -match "^3.3"){
- InstallPackage $env:PYTHON asyncio
- }
- if($env:QTIMPL -eq "PySide"){
- InstallPackage $env:Python PySide
- }
- if ($env:QTIMPL -eq "PyQt4"){
- (new-object net.webclient).DownloadFile("http://sourceforge.net/projects/pyqt/files/PyQt4/PyQt-4.11.4/PyQt4-4.11.4-gpl-Py3.4-Qt4.8.7-x32.exe/download", "C:\install-PyQt4.exe")
- Start-Process -FilePath C:\install-PyQt4.exe -ArgumentList "/S" -Wait -Passthru
- }
- if ($env:QTIMPL -eq "PyQt5"){
- (new-object net.webclient).DownloadFile("http://sourceforge.net/projects/pyqt/files/PyQt5/PyQt-5.5.1/PyQt5-5.5.1-gpl-Py3.4-Qt5.5.1-x32.exe/download", "C:\install-PyQt5.exe")
- Start-Process -FilePath C:\install-PyQt5.exe -ArgumentList "/S" -Wait -Passthru
- }
+ $PYTHON_MAJ_VERSION = $env:PYTHON_VERSION -replace '(\d+)\.(\d+)\.(\d+)', '$1.$2'
+ & REG ADD "HKCU\Software\Python\PythonCore\${PYTHON_MAJ_VERSION}\InstallPath" /f /ve /t REG_SZ /d $env:PYTHON
+ InstallPip $env:PYTHON
+ InstallPackage $env:PYTHON wheel
+ InstallPackage $env:PYTHON pytest
+ if($PYTHON_MAJ_VERSION -eq '3.3'){
+ InstallPackage $env:PYTHON asyncio
+ }
+ switch ($env:QTIMPL){
+ "PySide" {
+ InstallPackage $env:Python PySide
+ }
+ "PyQt4" {
+ (new-object net.webclient).DownloadFile("http://sourceforge.net/projects/pyqt/files/PyQt4/PyQt-4.11.4/PyQt4-4.11.4-gpl-Py3.4-Qt4.8.7-x32.exe/download", "C:\install-PyQt4.exe")
+ Start-Process -FilePath C:\install-PyQt4.exe -ArgumentList "/S" -Wait -Passthru
+ }
+ "PyQt5" {
+ (new-object net.webclient).DownloadFile("http://sourceforge.net/projects/pyqt/files/PyQt5/PyQt-5.5.1/PyQt5-5.5.1-gpl-Py3.4-Qt5.5.1-x32.exe/download", "C:\install-PyQt5.exe")
+ Start-Process -FilePath C:\install-PyQt5.exe -ArgumentList "/S" -Wait -Passthru
+ }
+ }
}
main
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-bitcoin/python-quamash.git
More information about the Pkg-bitcoin-commits
mailing list