[Updated] D10680: contrib: install PyOxidizer 0.15.0
indygreg (Gregory Szorc)
phabricator at mercurial-scm.org
Fri May 7 16:43:01 UTC 2021
indygreg edited the summary of this revision.
indygreg updated this revision to Diff 27762.
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D10680?vs=27751&id=27762
BRANCH
default
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D10680/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D10680
AFFECTED FILES
contrib/automation/hgautomation/linux.py
contrib/automation/hgautomation/windows.py
contrib/install-windows-dependencies.ps1
CHANGE DETAILS
diff --git a/contrib/install-windows-dependencies.ps1 b/contrib/install-windows-dependencies.ps1
--- a/contrib/install-windows-dependencies.ps1
+++ b/contrib/install-windows-dependencies.ps1
@@ -62,6 +62,9 @@
$RUSTUP_INIT_URL = "https://static.rust-lang.org/rustup/archive/1.21.1/x86_64-pc-windows-gnu/rustup-init.exe"
$RUSTUP_INIT_SHA256 = "d17df34ba974b9b19cf5c75883a95475aa22ddc364591d75d174090d55711c72"
+$PYOXIDIZER_URL = "https://github.com/indygreg/PyOxidizer/releases/download/pyoxidizer%2F0.15.0/PyOxidizer-0.15.0-x64.msi"
+$PYOXIDIZER_SHA256 = "c866b70431fc5a2690937e265e31834d4be6127c8c8315d1f1412c792cbc29f1"
+
# Writing progress slows down downloads substantially. So disable it.
$progressPreference = 'silentlyContinue'
@@ -123,9 +126,6 @@
Invoke-Process "${prefix}\cargo\bin\rustup.exe" "target add i686-pc-windows-msvc"
Invoke-Process "${prefix}\cargo\bin\rustup.exe" "install 1.52.0"
Invoke-Process "${prefix}\cargo\bin\rustup.exe" "component add clippy"
-
- # Install PyOxidizer for packaging.
- Invoke-Process "${prefix}\cargo\bin\cargo.exe" "install --version 0.10.3 pyoxidizer"
}
function Install-Dependencies($prefix) {
@@ -151,6 +151,7 @@
Secure-Download $MINGW_BIN_URL ${prefix}\assets\mingw-get-bin.zip $MINGW_BIN_SHA256
Secure-Download $MERCURIAL_WHEEL_URL ${prefix}\assets\${MERCURIAL_WHEEL_FILENAME} $MERCURIAL_WHEEL_SHA256
Secure-Download $RUSTUP_INIT_URL ${prefix}\assets\rustup-init.exe $RUSTUP_INIT_SHA256
+ Secure-Download $PYOXIDIZER_URL ${prefix}\assets\PyOxidizer.msi $PYOXIDIZER_SHA256
Write-Output "installing Python 2.7 32-bit"
Invoke-Process msiexec.exe "/i ${prefix}\assets\python27-x86.msi /l* ${prefix}\assets\python27-x86.log /q TARGETDIR=${prefix}\python27-x86 ALLUSERS="
@@ -172,6 +173,9 @@
Write-Output "installing Visual Studio 2017 Build Tools and SDKs"
Invoke-Process ${prefix}\assets\vs_buildtools.exe "--quiet --wait --norestart --nocache --channelUri https://aka.ms/vs/15/release/channel --add Microsoft.VisualStudio.Workload.MSBuildTools --add Microsoft.VisualStudio.Component.Windows10SDK.17763 --add Microsoft.VisualStudio.Workload.VCTools --add Microsoft.VisualStudio.Component.Windows10SDK --add Microsoft.VisualStudio.Component.VC.140"
+ Write-Output "installing PyOxidizer"
+ Invoke-Process msiexec.exe "/i ${prefix}\assets\PyOxidizer.msi /l* ${prefix}\assets\PyOxidizer.log /quiet"
+
Install-Rust ${prefix}
Write-Output "installing Visual C++ 9.0 for Python 2.7"
diff --git a/contrib/automation/hgautomation/windows.py b/contrib/automation/hgautomation/windows.py
--- a/contrib/automation/hgautomation/windows.py
+++ b/contrib/automation/hgautomation/windows.py
@@ -69,6 +69,7 @@
'''.lstrip()
BUILD_INNO_PYTHON3 = r'''
+$Env:PATH = "C:\Program Files\PyOxidizer;$Env:PATH"
$Env:RUSTUP_HOME = "C:\hgdev\rustup"
$Env:CARGO_HOME = "C:\hgdev\cargo"
Set-Location C:\hgdev\src
@@ -79,6 +80,7 @@
'''
BUILD_INNO_PYTHON2 = r'''
+$Env:PATH = "C:\Program Files\PyOxidizer;$Env:PATH"
Set-Location C:\hgdev\src
$python = "C:\hgdev\python27-{arch}\python.exe"
C:\hgdev\python37-x64\python.exe contrib\packaging\packaging.py inno --python $python {extra_args}
@@ -96,6 +98,7 @@
'''
BUILD_WIX_PYTHON3 = r'''
+$Env:PATH = "C:\Program Files\PyOxidizer;$Env:PATH"
$Env:RUSTUP_HOME = "C:\hgdev\rustup"
$Env:CARGO_HOME = "C:\hgdev\cargo"
Set-Location C:\hgdev\src
@@ -106,6 +109,7 @@
'''
BUILD_WIX_PYTHON2 = r'''
+$Env:PATH = "C:\Program Files\PyOxidizer;$Env:PATH"
Set-Location C:\hgdev\src
$python = "C:\hgdev\python27-{arch}\python.exe"
C:\hgdev\python37-x64\python.exe contrib\packaging\packaging.py wix --python $python {extra_args}
@@ -115,6 +119,7 @@
'''
RUN_TESTS = r'''
+$Env:PATH = "C:\Program Files\PyOxidizer;$Env:PATH"
C:\hgdev\MinGW\msys\1.0\bin\sh.exe --login -c "cd /c/hgdev/src/tests && /c/hgdev/{python_path}/python.exe run-tests.py {test_flags}"
if ($LASTEXITCODE -ne 0) {{
throw "process exited non-0: $LASTEXITCODE"
diff --git a/contrib/automation/hgautomation/linux.py b/contrib/automation/hgautomation/linux.py
--- a/contrib/automation/hgautomation/linux.py
+++ b/contrib/automation/hgautomation/linux.py
@@ -77,6 +77,18 @@
'\r\n', '\n'
)
+INSTALL_PYOXIDIZER = r'''
+PYOXIDIZER_VERSION=0.15.0
+PYOXIDIZER_SHA256=396c9b271174b108dcd9ec1f8b9b93839930890b41a859e7945948bcec57fae9
+PYOXIDIZER_URL=https://github.com/indygreg/PyOxidizer/releases/download/pyoxidizer%2F${PYOXIDIZER_VERSION}/pyoxidizer-${PYOXIDIZER_VERSION}-linux_x86_64.zip
+
+wget -O pyoxidizer.zip --progress dot:mega ${PYOXIDIZER_URL}
+echo "${PYOXIDIZER_SHA256} pyoxidizer.zip" | sha256sum --check -
+
+unzip pyoxidizer.zip
+chmod +x pyoxidizer
+sudo mv pyoxidizer /usr/local/bin/pyoxidizer
+'''
INSTALL_RUST = r'''
RUSTUP_INIT_SHA256=a46fe67199b7bcbbde2dcbc23ae08db6f29883e260e23899a88b9073effc9076
@@ -87,8 +99,6 @@
sudo -H -u hg -g hg ./rustup-init -y
sudo -H -u hg -g hg /home/hg/.cargo/bin/rustup install 1.41.1 1.52.0
sudo -H -u hg -g hg /home/hg/.cargo/bin/rustup component add clippy
-
-sudo -H -u hg -g hg /home/hg/.cargo/bin/cargo install --version 0.10.3 pyoxidizer
'''
@@ -319,6 +329,7 @@
sudo chown `whoami` /hgdev
{install_rust}
+{install_pyoxidizer}
cp requirements-*.txt /hgdev/
@@ -344,6 +355,7 @@
'''.lstrip()
.format(
install_rust=INSTALL_RUST,
+ install_pyoxidizer=INSTALL_PYOXIDIZER,
install_pythons=INSTALL_PYTHONS,
bootstrap_virtualenv=BOOTSTRAP_VIRTUALENV,
)
To: indygreg, #hg-reviewers
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20210507/f17ce9c4/attachment-0002.html>
More information about the Mercurial-patches
mailing list