mirror of
git://code.qt.io/qt/qt5.git
synced 2026-01-04 05:57:42 +08:00
COIN: Move arm Mac brew and pyenv install script under common directory
Pick-to: 6.7 Change-Id: I83c6b017d81bc98431f0d0421167890466e5b855 Reviewed-by: Ville-Pekka Karhu <ville-pekka.karhu@qt.io>
This commit is contained in:
@@ -8,14 +8,14 @@
|
||||
|
||||
set -e
|
||||
|
||||
. "$(dirname "$0")"/../common/unix/DownloadURL.sh
|
||||
. "$(dirname "$0")"/../common/unix/SetEnvVar.sh
|
||||
. "$(dirname "$0")"/../unix/DownloadURL.sh
|
||||
. "$(dirname "$0")"/../unix/SetEnvVar.sh
|
||||
|
||||
|
||||
DownloadURL \
|
||||
http://ci-files01-hki.ci.qt.io/input/mac/homebrew/a822f0d0f1838c07e86b356fcd2bf93c7a11c2aa/install.sh \
|
||||
https://raw.githubusercontent.com/Homebrew/install/c744a716f9845988d01e6e238eee7117b8c366c9/install \
|
||||
3210da71e12a699ab3bba43910a6d5fc64b92000 \
|
||||
http://ci-files01-hki.intra.qt.io/input/mac/homebrew/be699a568315f57b65519df576d7fc5840b8a5cc/install.sh \
|
||||
https://raw.githubusercontent.com/Homebrew/install/be699a568315f57b65519df576d7fc5840b8a5cc/install \
|
||||
f20e4a577f0cafbab5a44b4d239886d725b3b985 \
|
||||
/tmp/homebrew_install.sh
|
||||
|
||||
DownloadURL "http://ci-files01-hki.ci.qt.io/input/semisecure/sign/pw" "http://ci-files01-hki.ci.qt.io/input/semisecure/sign/pw" "aae58d00d0a1b179a09f21cfc67f9d16fb95ff36" "/Users/qt/pw"
|
||||
@@ -1,41 +1,39 @@
|
||||
class Pyenv < Formula
|
||||
desc "Python version management"
|
||||
homepage "https://github.com/pyenv/pyenv"
|
||||
url "https://github.com/pyenv/pyenv/archive/v2.2.0.tar.gz"
|
||||
sha256 "ef62a5d0a0d582b38497ae8d24a2a417d4a21c42811123c08082541a7092825d"
|
||||
url "https://github.com/pyenv/pyenv/archive/refs/tags/v2.3.15.tar.gz"
|
||||
sha256 "cf6499e1c8f18fb3473c2afdf5f14826fd42a1c4b051219faea104e38036e4bb"
|
||||
license "MIT"
|
||||
version_scheme 1
|
||||
head "https://github.com/pyenv/pyenv.git", branch: "master"
|
||||
|
||||
livecheck do
|
||||
url :stable
|
||||
strategy :github_latest
|
||||
regex(/^v?(\d+(?:\.\d+)+(-\d+)?)$/i)
|
||||
end
|
||||
|
||||
bottle do
|
||||
sha256 cellar: :any, arm64_monterey: "1d326dcae6327e1a62a8026e80665a0d995eec0d26c27f417ef34a9b75a2e2a7"
|
||||
sha256 cellar: :any, arm64_big_sur: "38f17626731a50f95ce1ad71495de2d260706a1420a19f2f29e7c935525c8c01"
|
||||
sha256 cellar: :any, monterey: "b02075ca6820755aee0956795c7decbfac56562ba66fec06bea193116cef5de6"
|
||||
sha256 cellar: :any, big_sur: "880bf4a355cc3da07562b82bac1bf7d0f4bcde6c613f5ea691f50d4e013b1bf8"
|
||||
sha256 cellar: :any, catalina: "5f7f283d3029f6293a52fc5449cf6aae8be5976f605318c9afa300be3e7d88f8"
|
||||
sha256 cellar: :any_skip_relocation, x86_64_linux: "fb8949a118e2b8012383fe822148778944d24fe7eab36655fad6e1f1d506e2ad"
|
||||
sha256 cellar: :any, arm64_ventura: "ff68efd633ee282abb0c0a6ba72f90d5248644f3143f40e15841b6ae7996e3cd"
|
||||
sha256 cellar: :any, arm64_monterey: "af7621550cc7c005549d96218d2606a521e12595f2efc9ae9d8523cc46d318ba"
|
||||
sha256 cellar: :any, arm64_big_sur: "69d69ceeea16fe45346d8856bf213c0a0e48220097635cf17d40b98fa8e12f83"
|
||||
sha256 cellar: :any, ventura: "48fb21656dc11dc0a6ef25eb7cb5e8829485c1e1fac7d1ca596a46771a9ad91d"
|
||||
sha256 cellar: :any, monterey: "96ba1d1702b7620dd9d0d2fe030af4d31c83504afea1b119910ab2e9c9fbb08c"
|
||||
sha256 cellar: :any, big_sur: "f96dfcecefb40d4794a8ea3ef5981bdeab6e64c412f18f0c128b1d64fe87d913"
|
||||
sha256 cellar: :any_skip_relocation, x86_64_linux: "83737a776f4828a7fb5eb289b10418b7cf829cccca3fc634d7dfe7c96aff4e7e"
|
||||
end
|
||||
|
||||
depends_on "autoconf"
|
||||
depends_on "openssl@1.1"
|
||||
depends_on "openssl@3"
|
||||
depends_on "pkg-config"
|
||||
depends_on "readline"
|
||||
|
||||
uses_from_macos "python" => :test
|
||||
uses_from_macos "bzip2"
|
||||
uses_from_macos "libffi"
|
||||
uses_from_macos "ncurses"
|
||||
uses_from_macos "xz"
|
||||
uses_from_macos "zlib"
|
||||
|
||||
on_linux do
|
||||
depends_on "python@3.10" => :test
|
||||
end
|
||||
|
||||
def install
|
||||
inreplace "libexec/pyenv", "/usr/local", HOMEBREW_PREFIX
|
||||
inreplace "libexec/pyenv-rehash", "$(command -v pyenv)", opt_bin/"pyenv"
|
||||
@@ -52,13 +50,13 @@ class Pyenv < Formula
|
||||
share.install prefix/"man"
|
||||
|
||||
# Do not manually install shell completions. See:
|
||||
# - https://github.com/pyenv/pyenv/issues/1056#issuecomment-356818337
|
||||
# - https://github.com/Homebrew/homebrew-core/pull/22727
|
||||
# - pyenv/pyenv#1056#issuecomment-356818337
|
||||
# - Homebrew/homebrew-core#22727
|
||||
end
|
||||
|
||||
test do
|
||||
# Create a fake python version and executable.
|
||||
pyenv_root = Pathname(shell_output("pyenv root").strip)
|
||||
pyenv_root = Pathname(shell_output("#{bin}/pyenv root").strip)
|
||||
python_bin = pyenv_root/"versions/1.2.3/bin"
|
||||
foo_script = python_bin/"foo"
|
||||
foo_script.write "echo hello"
|
||||
@@ -67,13 +65,13 @@ class Pyenv < Formula
|
||||
# Test versions.
|
||||
versions = shell_output("eval \"$(#{bin}/pyenv init --path)\" " \
|
||||
"&& eval \"$(#{bin}/pyenv init -)\" " \
|
||||
"&& pyenv versions").split("\n")
|
||||
"&& #{bin}/pyenv versions").split("\n")
|
||||
assert_equal 2, versions.length
|
||||
assert_match(/\* system/, versions[0])
|
||||
assert_equal(" 1.2.3", versions[1])
|
||||
|
||||
# Test rehash.
|
||||
system "pyenv", "rehash"
|
||||
system bin/"pyenv", "rehash"
|
||||
refute_match "Cellar", (pyenv_root/"shims/foo").read
|
||||
assert_equal "hello", shell_output("eval \"$(#{bin}/pyenv init --path)\" " \
|
||||
"&& eval \"$(#{bin}/pyenv init -)\" " \
|
||||
12
coin/provisioning/qtci-macos-11-arm/23-homebrew.sh
Executable file
12
coin/provisioning/qtci-macos-11-arm/23-homebrew.sh
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/usr/bin/env bash
|
||||
# Copyright (C) 2023 The Qt Company Ltd.
|
||||
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
|
||||
# Will install homebrew package manager for macOS.
|
||||
# WARNING: Requires commandlinetools
|
||||
|
||||
|
||||
set -e
|
||||
|
||||
BASEDIR=$(dirname "$0")
|
||||
"$BASEDIR/../common/macos/homebrew_for_arm_mac.sh"
|
||||
49
coin/provisioning/qtci-macos-11-arm/24-pyenv.sh
Executable file
49
coin/provisioning/qtci-macos-11-arm/24-pyenv.sh
Executable file
@@ -0,0 +1,49 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
#############################################################################
|
||||
##
|
||||
## Copyright (C) 2021 The Qt Company Ltd.
|
||||
## Copyright (C) 2017 Pelagicore AG
|
||||
## Contact: https://www.qt.io/licensing/
|
||||
##
|
||||
## This file is part of the provisioning scripts of the Qt Toolkit.
|
||||
##
|
||||
## $QT_BEGIN_LICENSE:LGPL$
|
||||
## Commercial License Usage
|
||||
## Licensees holding valid commercial Qt licenses may use this file in
|
||||
## accordance with the commercial license agreement provided with the
|
||||
## Software or, alternatively, in accordance with the terms contained in
|
||||
## a written agreement between you and The Qt Company. For licensing terms
|
||||
## and conditions see https://www.qt.io/terms-conditions. For further
|
||||
## information use the contact form at https://www.qt.io/contact-us.
|
||||
##
|
||||
## GNU Lesser General Public License Usage
|
||||
## Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
## General Public License version 3 as published by the Free Software
|
||||
## Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
## packaging of this file. Please review the following information to
|
||||
## ensure the GNU Lesser General Public License version 3 requirements
|
||||
## will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
##
|
||||
## GNU General Public License Usage
|
||||
## Alternatively, this file may be used under the terms of the GNU
|
||||
## General Public License version 2.0 or (at your option) the GNU General
|
||||
## Public license version 3 or any later version approved by the KDE Free
|
||||
## Qt Foundation. The licenses are as published by the Free Software
|
||||
## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
## included in the packaging of this file. Please review the following
|
||||
## information to ensure the GNU General Public License requirements will
|
||||
## be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
## https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
##
|
||||
## $QT_END_LICENSE$
|
||||
##
|
||||
#############################################################################
|
||||
|
||||
# This script installs python3
|
||||
|
||||
# shellcheck source=../unix/SetEnvVar.sh
|
||||
source "${BASH_SOURCE%/*}/../common/unix/SetEnvVar.sh"
|
||||
|
||||
# Try with default
|
||||
/opt/homebrew/bin/brew install pyenv
|
||||
@@ -8,8 +8,6 @@
|
||||
# shellcheck source=../common/unix/SetEnvVar.sh
|
||||
source "${BASH_SOURCE%/*}/../common/unix/SetEnvVar.sh"
|
||||
|
||||
brew install --formula "${BASH_SOURCE%/*}/pyenv.rb"
|
||||
|
||||
pyenv install 3.9.7
|
||||
|
||||
/Users/qt/.pyenv/versions/3.9.7/bin/pip3 install --user install virtualenv wheel html5lib
|
||||
|
||||
@@ -1,82 +0,0 @@
|
||||
class Pyenv < Formula
|
||||
desc "Python version management"
|
||||
homepage "https://github.com/pyenv/pyenv"
|
||||
url "https://github.com/pyenv/pyenv/archive/v2.2.0.tar.gz"
|
||||
sha256 "ef62a5d0a0d582b38497ae8d24a2a417d4a21c42811123c08082541a7092825d"
|
||||
license "MIT"
|
||||
version_scheme 1
|
||||
head "https://github.com/pyenv/pyenv.git", branch: "master"
|
||||
|
||||
livecheck do
|
||||
url :stable
|
||||
strategy :github_latest
|
||||
end
|
||||
|
||||
bottle do
|
||||
sha256 cellar: :any, arm64_monterey: "1d326dcae6327e1a62a8026e80665a0d995eec0d26c27f417ef34a9b75a2e2a7"
|
||||
sha256 cellar: :any, arm64_big_sur: "38f17626731a50f95ce1ad71495de2d260706a1420a19f2f29e7c935525c8c01"
|
||||
sha256 cellar: :any, monterey: "b02075ca6820755aee0956795c7decbfac56562ba66fec06bea193116cef5de6"
|
||||
sha256 cellar: :any, big_sur: "880bf4a355cc3da07562b82bac1bf7d0f4bcde6c613f5ea691f50d4e013b1bf8"
|
||||
sha256 cellar: :any, catalina: "5f7f283d3029f6293a52fc5449cf6aae8be5976f605318c9afa300be3e7d88f8"
|
||||
sha256 cellar: :any_skip_relocation, x86_64_linux: "fb8949a118e2b8012383fe822148778944d24fe7eab36655fad6e1f1d506e2ad"
|
||||
end
|
||||
|
||||
depends_on "autoconf"
|
||||
depends_on "openssl@1.1"
|
||||
depends_on "pkg-config"
|
||||
depends_on "readline"
|
||||
|
||||
uses_from_macos "bzip2"
|
||||
uses_from_macos "libffi"
|
||||
uses_from_macos "ncurses"
|
||||
uses_from_macos "xz"
|
||||
uses_from_macos "zlib"
|
||||
|
||||
on_linux do
|
||||
depends_on "python@3.10" => :test
|
||||
end
|
||||
|
||||
def install
|
||||
inreplace "libexec/pyenv", "/usr/local", HOMEBREW_PREFIX
|
||||
inreplace "libexec/pyenv-rehash", "$(command -v pyenv)", opt_bin/"pyenv"
|
||||
inreplace "pyenv.d/rehash/source.bash", "$(command -v pyenv)", opt_bin/"pyenv"
|
||||
|
||||
system "src/configure"
|
||||
system "make", "-C", "src"
|
||||
|
||||
prefix.install Dir["*"]
|
||||
%w[pyenv-install pyenv-uninstall python-build].each do |cmd|
|
||||
bin.install_symlink "#{prefix}/plugins/python-build/bin/#{cmd}"
|
||||
end
|
||||
|
||||
share.install prefix/"man"
|
||||
|
||||
# Do not manually install shell completions. See:
|
||||
# - https://github.com/pyenv/pyenv/issues/1056#issuecomment-356818337
|
||||
# - https://github.com/Homebrew/homebrew-core/pull/22727
|
||||
end
|
||||
|
||||
test do
|
||||
# Create a fake python version and executable.
|
||||
pyenv_root = Pathname(shell_output("pyenv root").strip)
|
||||
python_bin = pyenv_root/"versions/1.2.3/bin"
|
||||
foo_script = python_bin/"foo"
|
||||
foo_script.write "echo hello"
|
||||
chmod "+x", foo_script
|
||||
|
||||
# Test versions.
|
||||
versions = shell_output("eval \"$(#{bin}/pyenv init --path)\" " \
|
||||
"&& eval \"$(#{bin}/pyenv init -)\" " \
|
||||
"&& pyenv versions").split("\n")
|
||||
assert_equal 2, versions.length
|
||||
assert_match(/\* system/, versions[0])
|
||||
assert_equal(" 1.2.3", versions[1])
|
||||
|
||||
# Test rehash.
|
||||
system "pyenv", "rehash"
|
||||
refute_match "Cellar", (pyenv_root/"shims/foo").read
|
||||
assert_equal "hello", shell_output("eval \"$(#{bin}/pyenv init --path)\" " \
|
||||
"&& eval \"$(#{bin}/pyenv init -)\" " \
|
||||
"&& PYENV_VERSION='1.2.3' foo").chomp
|
||||
end
|
||||
end
|
||||
12
coin/provisioning/qtci-macos-12-arm/23-homebrew.sh
Executable file
12
coin/provisioning/qtci-macos-12-arm/23-homebrew.sh
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/usr/bin/env bash
|
||||
# Copyright (C) 2023 The Qt Company Ltd.
|
||||
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
|
||||
# Will install homebrew package manager for macOS.
|
||||
# WARNING: Requires commandlinetools
|
||||
|
||||
|
||||
set -e
|
||||
|
||||
BASEDIR=$(dirname "$0")
|
||||
"$BASEDIR/../common/macos/homebrew_for_arm_mac.sh"
|
||||
49
coin/provisioning/qtci-macos-12-arm/24-pyenv.sh
Executable file
49
coin/provisioning/qtci-macos-12-arm/24-pyenv.sh
Executable file
@@ -0,0 +1,49 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
#############################################################################
|
||||
##
|
||||
## Copyright (C) 2021 The Qt Company Ltd.
|
||||
## Copyright (C) 2017 Pelagicore AG
|
||||
## Contact: https://www.qt.io/licensing/
|
||||
##
|
||||
## This file is part of the provisioning scripts of the Qt Toolkit.
|
||||
##
|
||||
## $QT_BEGIN_LICENSE:LGPL$
|
||||
## Commercial License Usage
|
||||
## Licensees holding valid commercial Qt licenses may use this file in
|
||||
## accordance with the commercial license agreement provided with the
|
||||
## Software or, alternatively, in accordance with the terms contained in
|
||||
## a written agreement between you and The Qt Company. For licensing terms
|
||||
## and conditions see https://www.qt.io/terms-conditions. For further
|
||||
## information use the contact form at https://www.qt.io/contact-us.
|
||||
##
|
||||
## GNU Lesser General Public License Usage
|
||||
## Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
## General Public License version 3 as published by the Free Software
|
||||
## Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
## packaging of this file. Please review the following information to
|
||||
## ensure the GNU Lesser General Public License version 3 requirements
|
||||
## will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
##
|
||||
## GNU General Public License Usage
|
||||
## Alternatively, this file may be used under the terms of the GNU
|
||||
## General Public License version 2.0 or (at your option) the GNU General
|
||||
## Public license version 3 or any later version approved by the KDE Free
|
||||
## Qt Foundation. The licenses are as published by the Free Software
|
||||
## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
## included in the packaging of this file. Please review the following
|
||||
## information to ensure the GNU General Public License requirements will
|
||||
## be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
## https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
##
|
||||
## $QT_END_LICENSE$
|
||||
##
|
||||
#############################################################################
|
||||
|
||||
# This script installs python3
|
||||
|
||||
# shellcheck source=../unix/SetEnvVar.sh
|
||||
source "${BASH_SOURCE%/*}/../common/unix/SetEnvVar.sh"
|
||||
|
||||
# Try with default
|
||||
/opt/homebrew/bin/brew install pyenv
|
||||
@@ -1,30 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
# Copyright (C) 2021 The Qt Company Ltd.
|
||||
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
|
||||
# Will install homebrew package manager for macOS.
|
||||
# WARNING: Requires commandlinetools
|
||||
|
||||
|
||||
set -e
|
||||
|
||||
. "$(dirname "$0")"/../common/unix/DownloadURL.sh
|
||||
. "$(dirname "$0")"/../common/unix/SetEnvVar.sh
|
||||
|
||||
|
||||
DownloadURL \
|
||||
http://ci-files01-hki.ci.qt.io/input/mac/homebrew/a822f0d0f1838c07e86b356fcd2bf93c7a11c2aa/install.sh \
|
||||
https://raw.githubusercontent.com/Homebrew/install/c744a716f9845988d01e6e238eee7117b8c366c9/install \
|
||||
3210da71e12a699ab3bba43910a6d5fc64b92000 \
|
||||
/tmp/homebrew_install.sh
|
||||
|
||||
DownloadURL "http://ci-files01-hki.ci.qt.io/input/semisecure/sign/pw" "http://ci-files01-hki.ci.qt.io/input/semisecure/sign/pw" "aae58d00d0a1b179a09f21cfc67f9d16fb95ff36" "/Users/qt/pw"
|
||||
{ pw=$(cat "/Users/qt/pw"); } 2> /dev/null
|
||||
sudo chmod 755 /tmp/homebrew_install.sh
|
||||
{ (echo "$pw" | /tmp/homebrew_install.sh); } 2> /dev/null
|
||||
rm -f "/Users/qt/pw"
|
||||
|
||||
# No need to manually do `brew update`, the homebrew installer script does it.
|
||||
### brew update
|
||||
|
||||
SetEnvVar "PATH" "\$PATH:/opt/homebrew/bin"
|
||||
@@ -8,8 +8,6 @@
|
||||
# shellcheck source=../common/unix/SetEnvVar.sh
|
||||
source "${BASH_SOURCE%/*}/../common/unix/SetEnvVar.sh"
|
||||
|
||||
brew install --formula "${BASH_SOURCE%/*}/pyenv.rb"
|
||||
|
||||
pyenv install 3.9.7
|
||||
|
||||
/Users/qt/.pyenv/versions/3.9.7/bin/pip3 install --user install virtualenv wheel html5lib
|
||||
|
||||
@@ -1,82 +0,0 @@
|
||||
class Pyenv < Formula
|
||||
desc "Python version management"
|
||||
homepage "https://github.com/pyenv/pyenv"
|
||||
url "https://github.com/pyenv/pyenv/archive/v2.2.0.tar.gz"
|
||||
sha256 "ef62a5d0a0d582b38497ae8d24a2a417d4a21c42811123c08082541a7092825d"
|
||||
license "MIT"
|
||||
version_scheme 1
|
||||
head "https://github.com/pyenv/pyenv.git", branch: "master"
|
||||
|
||||
livecheck do
|
||||
url :stable
|
||||
strategy :github_latest
|
||||
end
|
||||
|
||||
bottle do
|
||||
sha256 cellar: :any, arm64_monterey: "1d326dcae6327e1a62a8026e80665a0d995eec0d26c27f417ef34a9b75a2e2a7"
|
||||
sha256 cellar: :any, arm64_big_sur: "38f17626731a50f95ce1ad71495de2d260706a1420a19f2f29e7c935525c8c01"
|
||||
sha256 cellar: :any, monterey: "b02075ca6820755aee0956795c7decbfac56562ba66fec06bea193116cef5de6"
|
||||
sha256 cellar: :any, big_sur: "880bf4a355cc3da07562b82bac1bf7d0f4bcde6c613f5ea691f50d4e013b1bf8"
|
||||
sha256 cellar: :any, catalina: "5f7f283d3029f6293a52fc5449cf6aae8be5976f605318c9afa300be3e7d88f8"
|
||||
sha256 cellar: :any_skip_relocation, x86_64_linux: "fb8949a118e2b8012383fe822148778944d24fe7eab36655fad6e1f1d506e2ad"
|
||||
end
|
||||
|
||||
depends_on "autoconf"
|
||||
depends_on "openssl@1.1"
|
||||
depends_on "pkg-config"
|
||||
depends_on "readline"
|
||||
|
||||
uses_from_macos "bzip2"
|
||||
uses_from_macos "libffi"
|
||||
uses_from_macos "ncurses"
|
||||
uses_from_macos "xz"
|
||||
uses_from_macos "zlib"
|
||||
|
||||
on_linux do
|
||||
depends_on "python@3.10" => :test
|
||||
end
|
||||
|
||||
def install
|
||||
inreplace "libexec/pyenv", "/usr/local", HOMEBREW_PREFIX
|
||||
inreplace "libexec/pyenv-rehash", "$(command -v pyenv)", opt_bin/"pyenv"
|
||||
inreplace "pyenv.d/rehash/source.bash", "$(command -v pyenv)", opt_bin/"pyenv"
|
||||
|
||||
system "src/configure"
|
||||
system "make", "-C", "src"
|
||||
|
||||
prefix.install Dir["*"]
|
||||
%w[pyenv-install pyenv-uninstall python-build].each do |cmd|
|
||||
bin.install_symlink "#{prefix}/plugins/python-build/bin/#{cmd}"
|
||||
end
|
||||
|
||||
share.install prefix/"man"
|
||||
|
||||
# Do not manually install shell completions. See:
|
||||
# - https://github.com/pyenv/pyenv/issues/1056#issuecomment-356818337
|
||||
# - https://github.com/Homebrew/homebrew-core/pull/22727
|
||||
end
|
||||
|
||||
test do
|
||||
# Create a fake python version and executable.
|
||||
pyenv_root = Pathname(shell_output("pyenv root").strip)
|
||||
python_bin = pyenv_root/"versions/1.2.3/bin"
|
||||
foo_script = python_bin/"foo"
|
||||
foo_script.write "echo hello"
|
||||
chmod "+x", foo_script
|
||||
|
||||
# Test versions.
|
||||
versions = shell_output("eval \"$(#{bin}/pyenv init --path)\" " \
|
||||
"&& eval \"$(#{bin}/pyenv init -)\" " \
|
||||
"&& pyenv versions").split("\n")
|
||||
assert_equal 2, versions.length
|
||||
assert_match(/\* system/, versions[0])
|
||||
assert_equal(" 1.2.3", versions[1])
|
||||
|
||||
# Test rehash.
|
||||
system "pyenv", "rehash"
|
||||
refute_match "Cellar", (pyenv_root/"shims/foo").read
|
||||
assert_equal "hello", shell_output("eval \"$(#{bin}/pyenv init --path)\" " \
|
||||
"&& eval \"$(#{bin}/pyenv init -)\" " \
|
||||
"&& PYENV_VERSION='1.2.3' foo").chomp
|
||||
end
|
||||
end
|
||||
16
coin/provisioning/qtci-macos-13-arm/23-homebrew.sh
Executable file
16
coin/provisioning/qtci-macos-13-arm/23-homebrew.sh
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/usr/bin/env bash
|
||||
# Copyright (C) 2023 The Qt Company Ltd.
|
||||
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
|
||||
# Will install homebrew package manager for macOS.
|
||||
# WARNING: Requires commandlinetools
|
||||
|
||||
|
||||
set -e
|
||||
|
||||
BASEDIR=$(dirname "$0")
|
||||
"$BASEDIR/../common/macos/homebrew_for_arm_mac.sh"
|
||||
# Can we force reading bash env this late?
|
||||
echo "if [ -f ~/.bashrc ]; then
|
||||
. ~/.bashrc
|
||||
fi" >> .profile
|
||||
49
coin/provisioning/qtci-macos-13-arm/24-pyenv.sh
Executable file
49
coin/provisioning/qtci-macos-13-arm/24-pyenv.sh
Executable file
@@ -0,0 +1,49 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
#############################################################################
|
||||
##
|
||||
## Copyright (C) 2021 The Qt Company Ltd.
|
||||
## Copyright (C) 2017 Pelagicore AG
|
||||
## Contact: https://www.qt.io/licensing/
|
||||
##
|
||||
## This file is part of the provisioning scripts of the Qt Toolkit.
|
||||
##
|
||||
## $QT_BEGIN_LICENSE:LGPL$
|
||||
## Commercial License Usage
|
||||
## Licensees holding valid commercial Qt licenses may use this file in
|
||||
## accordance with the commercial license agreement provided with the
|
||||
## Software or, alternatively, in accordance with the terms contained in
|
||||
## a written agreement between you and The Qt Company. For licensing terms
|
||||
## and conditions see https://www.qt.io/terms-conditions. For further
|
||||
## information use the contact form at https://www.qt.io/contact-us.
|
||||
##
|
||||
## GNU Lesser General Public License Usage
|
||||
## Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
## General Public License version 3 as published by the Free Software
|
||||
## Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
## packaging of this file. Please review the following information to
|
||||
## ensure the GNU Lesser General Public License version 3 requirements
|
||||
## will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
##
|
||||
## GNU General Public License Usage
|
||||
## Alternatively, this file may be used under the terms of the GNU
|
||||
## General Public License version 2.0 or (at your option) the GNU General
|
||||
## Public license version 3 or any later version approved by the KDE Free
|
||||
## Qt Foundation. The licenses are as published by the Free Software
|
||||
## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
## included in the packaging of this file. Please review the following
|
||||
## information to ensure the GNU General Public License requirements will
|
||||
## be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
## https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
##
|
||||
## $QT_END_LICENSE$
|
||||
##
|
||||
#############################################################################
|
||||
|
||||
# This script installs python3
|
||||
|
||||
# shellcheck source=../unix/SetEnvVar.sh
|
||||
source "${BASH_SOURCE%/*}/../common/unix/SetEnvVar.sh"
|
||||
|
||||
# Try with default
|
||||
/opt/homebrew/bin/brew install pyenv
|
||||
@@ -1,30 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
# Copyright (C) 2021 The Qt Company Ltd.
|
||||
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
|
||||
# Will install homebrew package manager for macOS.
|
||||
# WARNING: Requires commandlinetools
|
||||
|
||||
|
||||
set -e
|
||||
|
||||
. "$(dirname "$0")"/../common/unix/DownloadURL.sh
|
||||
. "$(dirname "$0")"/../common/unix/SetEnvVar.sh
|
||||
|
||||
|
||||
DownloadURL \
|
||||
http://ci-files01-hki.ci.qt.io/input/mac/homebrew/a822f0d0f1838c07e86b356fcd2bf93c7a11c2aa/install.sh \
|
||||
https://raw.githubusercontent.com/Homebrew/install/c744a716f9845988d01e6e238eee7117b8c366c9/install \
|
||||
3210da71e12a699ab3bba43910a6d5fc64b92000 \
|
||||
/tmp/homebrew_install.sh
|
||||
|
||||
DownloadURL "http://ci-files01-hki.ci.qt.io/input/semisecure/sign/pw" "http://ci-files01-hki.ci.qt.io/input/semisecure/sign/pw" "aae58d00d0a1b179a09f21cfc67f9d16fb95ff36" "/Users/qt/pw"
|
||||
{ pw=$(cat "/Users/qt/pw"); } 2> /dev/null
|
||||
sudo chmod 755 /tmp/homebrew_install.sh
|
||||
{ (echo "$pw" | /tmp/homebrew_install.sh); } 2> /dev/null
|
||||
rm -f "/Users/qt/pw"
|
||||
|
||||
# No need to manually do `brew update`, the homebrew installer script does it.
|
||||
### brew update
|
||||
|
||||
SetEnvVar "PATH" "\$PATH:/opt/homebrew/bin"
|
||||
@@ -8,8 +8,6 @@
|
||||
# shellcheck source=../common/unix/SetEnvVar.sh
|
||||
source "${BASH_SOURCE%/*}/../common/unix/SetEnvVar.sh"
|
||||
|
||||
brew install "${BASH_SOURCE%/*}/pyenv.rb"
|
||||
|
||||
pyenv install 3.9.7
|
||||
|
||||
/Users/qt/.pyenv/versions/3.9.7/bin/pip3 install --user install virtualenv wheel html5lib
|
||||
|
||||
16
coin/provisioning/qtci-macos-14-arm/23-homebrew.sh
Executable file
16
coin/provisioning/qtci-macos-14-arm/23-homebrew.sh
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/usr/bin/env bash
|
||||
# Copyright (C) 2023 The Qt Company Ltd.
|
||||
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
|
||||
# Will install homebrew package manager for macOS.
|
||||
# WARNING: Requires commandlinetools
|
||||
|
||||
|
||||
set -e
|
||||
|
||||
BASEDIR=$(dirname "$0")
|
||||
"$BASEDIR/../common/macos/homebrew_for_arm_mac.sh"
|
||||
# Can we force reading bash env this late?
|
||||
echo "if [ -f ~/.bashrc ]; then
|
||||
. ~/.bashrc
|
||||
fi" >> .profile
|
||||
@@ -1,30 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
# Copyright (C) 2021 The Qt Company Ltd.
|
||||
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
|
||||
# Will install homebrew package manager for macOS.
|
||||
# WARNING: Requires commandlinetools
|
||||
|
||||
|
||||
set -e
|
||||
|
||||
. "$(dirname "$0")"/../common/unix/DownloadURL.sh
|
||||
. "$(dirname "$0")"/../common/unix/SetEnvVar.sh
|
||||
|
||||
|
||||
DownloadURL \
|
||||
http://ci-files01-hki.ci.qt.io/input/mac/homebrew/a822f0d0f1838c07e86b356fcd2bf93c7a11c2aa/install.sh \
|
||||
https://raw.githubusercontent.com/Homebrew/install/c744a716f9845988d01e6e238eee7117b8c366c9/install \
|
||||
3210da71e12a699ab3bba43910a6d5fc64b92000 \
|
||||
/tmp/homebrew_install.sh
|
||||
|
||||
DownloadURL "http://ci-files01-hki.ci.qt.io/input/semisecure/sign/pw" "http://ci-files01-hki.ci.qt.io/input/semisecure/sign/pw" "aae58d00d0a1b179a09f21cfc67f9d16fb95ff36" "/Users/qt/pw"
|
||||
{ pw=$(cat "/Users/qt/pw"); } 2> /dev/null
|
||||
sudo chmod 755 /tmp/homebrew_install.sh
|
||||
{ (echo "$pw" | /tmp/homebrew_install.sh); } 2> /dev/null
|
||||
rm -f "/Users/qt/pw"
|
||||
|
||||
# No need to manually do `brew update`, the homebrew installer script does it.
|
||||
### brew update
|
||||
|
||||
SetEnvVar "PATH" "\$PATH:/opt/homebrew/bin"
|
||||
49
coin/provisioning/qtci-macos-14-arm/24-pyenv.sh
Executable file
49
coin/provisioning/qtci-macos-14-arm/24-pyenv.sh
Executable file
@@ -0,0 +1,49 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
#############################################################################
|
||||
##
|
||||
## Copyright (C) 2021 The Qt Company Ltd.
|
||||
## Copyright (C) 2017 Pelagicore AG
|
||||
## Contact: https://www.qt.io/licensing/
|
||||
##
|
||||
## This file is part of the provisioning scripts of the Qt Toolkit.
|
||||
##
|
||||
## $QT_BEGIN_LICENSE:LGPL$
|
||||
## Commercial License Usage
|
||||
## Licensees holding valid commercial Qt licenses may use this file in
|
||||
## accordance with the commercial license agreement provided with the
|
||||
## Software or, alternatively, in accordance with the terms contained in
|
||||
## a written agreement between you and The Qt Company. For licensing terms
|
||||
## and conditions see https://www.qt.io/terms-conditions. For further
|
||||
## information use the contact form at https://www.qt.io/contact-us.
|
||||
##
|
||||
## GNU Lesser General Public License Usage
|
||||
## Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
## General Public License version 3 as published by the Free Software
|
||||
## Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
## packaging of this file. Please review the following information to
|
||||
## ensure the GNU Lesser General Public License version 3 requirements
|
||||
## will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
##
|
||||
## GNU General Public License Usage
|
||||
## Alternatively, this file may be used under the terms of the GNU
|
||||
## General Public License version 2.0 or (at your option) the GNU General
|
||||
## Public license version 3 or any later version approved by the KDE Free
|
||||
## Qt Foundation. The licenses are as published by the Free Software
|
||||
## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
## included in the packaging of this file. Please review the following
|
||||
## information to ensure the GNU General Public License requirements will
|
||||
## be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
## https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
##
|
||||
## $QT_END_LICENSE$
|
||||
##
|
||||
#############################################################################
|
||||
|
||||
# This script installs python3
|
||||
|
||||
# shellcheck source=../unix/SetEnvVar.sh
|
||||
source "${BASH_SOURCE%/*}/../common/unix/SetEnvVar.sh"
|
||||
|
||||
# Try with default
|
||||
/opt/homebrew/bin/brew install pyenv
|
||||
@@ -8,8 +8,6 @@
|
||||
# shellcheck source=../common/unix/SetEnvVar.sh
|
||||
source "${BASH_SOURCE%/*}/../common/unix/SetEnvVar.sh"
|
||||
|
||||
brew install pyenv
|
||||
|
||||
pyenv install 3.9.7
|
||||
|
||||
/Users/qt/.pyenv/versions/3.9.7/bin/pip3 install --user install virtualenv wheel html5lib
|
||||
|
||||
Reference in New Issue
Block a user