We were previously using a Git commit from a few days before the 0.8
release. This commit upgrades us to the just-released 0.9 release.
This required some Starlark changes due to backwards incompatible
changes.
Alphare | |
martinvonz |
hg-reviewers |
We were previously using a Git commit from a few days before the 0.8
release. This commit upgrades us to the just-released 0.9 release.
This required some Starlark changes due to backwards incompatible
changes.
Automatic diff as part of commit; lint not applicable. |
Automatic diff as part of commit; unit tests not applicable. |
@pulkit @durin42 @martinvonz: this should get queued to stable to support the 5.6 release. I'll be grafting it locally to produce the Python 3 Windows installers.
Path | Packages | |||
---|---|---|---|---|
M | contrib/automation/hgautomation/linux.py (2 lines) | |||
M | contrib/install-windows-dependencies.ps1 (2 lines) | |||
M | rust/hgcli/pyoxidizer.bzl (24 lines) |
wget -O rustup-init --progress dot:mega https://static.rust-lang.org/rustup/archive/1.18.3/x86_64-unknown-linux-gnu/rustup-init | wget -O rustup-init --progress dot:mega https://static.rust-lang.org/rustup/archive/1.18.3/x86_64-unknown-linux-gnu/rustup-init | ||||
echo "${RUSTUP_INIT_SHA256} rustup-init" | sha256sum --check - | echo "${RUSTUP_INIT_SHA256} rustup-init" | sha256sum --check - | ||||
chmod +x rustup-init | chmod +x rustup-init | ||||
sudo -H -u hg -g hg ./rustup-init -y | sudo -H -u hg -g hg ./rustup-init -y | ||||
sudo -H -u hg -g hg /home/hg/.cargo/bin/rustup install 1.31.1 1.46.0 | sudo -H -u hg -g hg /home/hg/.cargo/bin/rustup install 1.31.1 1.46.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/rustup component add clippy | ||||
sudo -H -u hg -g hg /home/hg/.cargo/bin/cargo install --git https://github.com/indygreg/PyOxidizer.git --rev 4697fb25918dfad6dc73288daeea501063963a08 pyoxidizer | sudo -H -u hg -g hg /home/hg/.cargo/bin/cargo install --version 0.9.0 pyoxidizer | ||||
''' | ''' | ||||
BOOTSTRAP_VIRTUALENV = r''' | BOOTSTRAP_VIRTUALENV = r''' | ||||
/usr/bin/virtualenv /hgdev/venv-bootstrap | /usr/bin/virtualenv /hgdev/venv-bootstrap | ||||
HG_SHA256=35fc8ba5e0379c1b3affa2757e83fb0509e8ac314cbd9f1fd133cf265d16e49f | HG_SHA256=35fc8ba5e0379c1b3affa2757e83fb0509e8ac314cbd9f1fd133cf265d16e49f | ||||
HG_TARBALL=mercurial-5.1.1.tar.gz | HG_TARBALL=mercurial-5.1.1.tar.gz |
$Env:CARGO_HOME = "${prefix}\cargo" | $Env:CARGO_HOME = "${prefix}\cargo" | ||||
Invoke-Process "${prefix}\assets\rustup-init.exe" "-y --default-host x86_64-pc-windows-msvc" | Invoke-Process "${prefix}\assets\rustup-init.exe" "-y --default-host x86_64-pc-windows-msvc" | ||||
Invoke-Process "${prefix}\cargo\bin\rustup.exe" "target add i686-pc-windows-msvc" | Invoke-Process "${prefix}\cargo\bin\rustup.exe" "target add i686-pc-windows-msvc" | ||||
Invoke-Process "${prefix}\cargo\bin\rustup.exe" "install 1.46.0" | Invoke-Process "${prefix}\cargo\bin\rustup.exe" "install 1.46.0" | ||||
Invoke-Process "${prefix}\cargo\bin\rustup.exe" "component add clippy" | Invoke-Process "${prefix}\cargo\bin\rustup.exe" "component add clippy" | ||||
# Install PyOxidizer for packaging. | # Install PyOxidizer for packaging. | ||||
Invoke-Process "${prefix}\cargo\bin\cargo.exe" "install --git https://github.com/indygreg/PyOxidizer.git --rev 4697fb25918dfad6dc73288daeea501063963a08 pyoxidizer" | Invoke-Process "${prefix}\cargo\bin\cargo.exe" "install --version 0.9.0 pyoxidizer" | ||||
} | } | ||||
function Install-Dependencies($prefix) { | function Install-Dependencies($prefix) { | ||||
if (!(Test-Path -Path $prefix\assets)) { | if (!(Test-Path -Path $prefix\assets)) { | ||||
New-Item -Path $prefix\assets -ItemType Directory | New-Item -Path $prefix\assets -ItemType Directory | ||||
} | } | ||||
$pip = "${prefix}\assets\get-pip.py" | $pip = "${prefix}\assets\get-pip.py" |
resource.add_location = "filesystem-relative:lib" | resource.add_location = "filesystem-relative:lib" | ||||
def make_exe(dist): | def make_exe(dist): | ||||
"""Builds a Rust-wrapped Mercurial binary.""" | """Builds a Rust-wrapped Mercurial binary.""" | ||||
packaging_policy = dist.make_python_packaging_policy() | packaging_policy = dist.make_python_packaging_policy() | ||||
# Extension may depend on any Python functionality. Include all | # Extension may depend on any Python functionality. Include all | ||||
# extensions. | # extensions. | ||||
packaging_policy.extension_module_filter = "all" | packaging_policy.extension_module_filter = "all" | ||||
packaging_policy.resources_policy = "prefer-in-memory-fallback-filesystem-relative:lib" | packaging_policy.resources_location = "in-memory" | ||||
packaging_policy.resources_location_fallback = "filesystem-relative:lib" | |||||
packaging_policy.register_resource_callback(resource_callback) | packaging_policy.register_resource_callback(resource_callback) | ||||
config = PythonInterpreterConfig( | config = dist.make_python_interpreter_config() | ||||
raw_allocator = "system", | config.raw_allocator = "system" | ||||
run_eval = RUN_CODE, | config.run_mode = "eval:%s" % RUN_CODE | ||||
# We want to let the user load extensions from the file system | # We want to let the user load extensions from the file system | ||||
filesystem_importer = True, | config.filesystem_importer = True | ||||
# We need this to make resourceutil happy, since it looks for sys.frozen. | # We need this to make resourceutil happy, since it looks for sys.frozen. | ||||
sys_frozen = True, | config.sys_frozen = True | ||||
legacy_windows_stdio = True, | config.legacy_windows_stdio = True | ||||
) | |||||
exe = dist.to_python_executable( | exe = dist.to_python_executable( | ||||
name = "hg", | name = "hg", | ||||
packaging_policy = packaging_policy, | packaging_policy = packaging_policy, | ||||
config = config, | config = config, | ||||
) | ) | ||||
# Add Mercurial to resources. | # Add Mercurial to resources. | ||||
resolve_targets() | resolve_targets() | ||||
# END OF COMMON USER-ADJUSTED SETTINGS. | # END OF COMMON USER-ADJUSTED SETTINGS. | ||||
# | # | ||||
# Everything below this is typically managed by PyOxidizer and doesn't need | # Everything below this is typically managed by PyOxidizer and doesn't need | ||||
# to be updated by people. | # to be updated by people. | ||||
PYOXIDIZER_VERSION = "0.8.0-pre" | PYOXIDIZER_VERSION = "0.9.0" | ||||
PYOXIDIZER_COMMIT = "4697fb25918dfad6dc73288daeea501063963a08" | PYOXIDIZER_COMMIT = "1fbc264cc004226cd76ee452e0a386ffca6ccfb1" |