From d323068d8ebf8144e029bf61c13ddf2ab1ca8a08 Mon Sep 17 00:00:00 2001 From: Paul Rouget Date: Tue, 17 Jul 2018 09:52:37 +0200 Subject: [PATCH 01/25] use local saltstack formula --- .travis/install_salt.sh | 4 +- .travis/saltstack.rb | 123 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 126 insertions(+), 1 deletion(-) create mode 100644 .travis/saltstack.rb diff --git a/.travis/install_salt.sh b/.travis/install_salt.sh index 4667c929..9aa0f56f 100755 --- a/.travis/install_salt.sh +++ b/.travis/install_salt.sh @@ -47,7 +47,9 @@ install_salt() { if brew list | grep 'saltstack' >/dev/null; then brew unlink saltstack fi - brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/9e3a66b6b7ca978bfea86897dcc3391c37f9f0ef/Formula/saltstack.rb + # Was: https://raw.githubusercontent.com/Homebrew/homebrew-core/9e3a66b6b7ca978bfea86897dcc3391c37f9f0ef/Formula/saltstack.rb + # We use our own copy of that old formula. We replaced EOS.undent with EOS to be compatible with the latest homebrew version + brew install --build-from-source .travis/saltstack.rb # In case we had the same version previously, we need to relink brew link saltstack else diff --git a/.travis/saltstack.rb b/.travis/saltstack.rb new file mode 100644 index 00000000..458d6d6d --- /dev/null +++ b/.travis/saltstack.rb @@ -0,0 +1,123 @@ +class Saltstack < Formula + include Language::Python::Virtualenv + + desc "Dynamic infrastructure communication bus" + homepage "http://www.saltstack.org" + url "https://files.pythonhosted.org/packages/1d/75/b969c2495ae6ccbf8b76f6a121027f3ee8cfab9d9a1086e9ccf07d10deae/salt-2016.3.3.tar.gz" + sha256 "5906038594f1b9b3ac41714774fbd78f0af80d2f3ffe1c1bf20308032d7d52b6" + head "https://github.com/saltstack/salt.git", branch: "develop", shallow: false + + bottle do + cellar :any + sha256 "699ff488110e31e12bcc075eaaefe735fc5b2515021158f7fecd8ace82c08286" => :sierra + sha256 "2e6a1bd9a2a9e291a100437209eaa5e2295c44d3f3b1b724b5f1d10b7c871dba" => :el_capitan + sha256 "28de29e0eadbe4aba2307860337cb43f161d7f42aac590e9307ff8f94dfa52ad" => :yosemite + sha256 "aeb6a3ebfe71e1ba3d83012158849ae704f557e9aebfc6a34f4337354dddb3d2" => :mavericks + end + + depends_on "swig" => :build + depends_on :python if MacOS.version <= :snow_leopard + depends_on "zeromq" + depends_on "libyaml" + depends_on "openssl" # For M2Crypto + + resource "Jinja2" do + url "https://files.pythonhosted.org/packages/f2/2f/0b98b06a345a761bec91a079ccae392d282690c2d8272e708f4d10829e22/Jinja2-2.8.tar.gz" + sha256 "bc1ff2ff88dbfacefde4ddde471d1417d3b304e8df103a7a9437d47269201bf4" + end + + resource "M2Crypto" do + url "https://files.pythonhosted.org/packages/9c/58/7e8d8c04995a422c3744929721941c400af0a2a8b8633f129d92f313cfb8/M2Crypto-0.25.1.tar.gz" + sha256 "ac303a1881307a51c85ee8b1d87844d9866ee823b4fdbc52f7e79187c2d9acef" + end + + resource "MarkupSafe" do + url "https://files.pythonhosted.org/packages/c0/41/bae1254e0396c0cc8cf1751cb7d9afc90a602353695af5952530482c963f/MarkupSafe-0.23.tar.gz" + sha256 "a4ec1aff59b95a14b45eb2e23761a0179e98319da5a7eb76b56ea8cdc7b871c3" + end + + resource "PyYAML" do + url "https://files.pythonhosted.org/packages/75/5e/b84feba55e20f8da46ead76f14a3943c8cb722d40360702b2365b91dec00/PyYAML-3.11.tar.gz" + sha256 "c36c938a872e5ff494938b33b14aaa156cb439ec67548fcab3535bb78b0846e8" + end + + resource "backports.ssl_match_hostname" do + url "https://files.pythonhosted.org/packages/76/21/2dc61178a2038a5cb35d14b61467c6ac632791ed05131dda72c20e7b9e23/backports.ssl_match_hostname-3.5.0.1.tar.gz" + sha256 "502ad98707319f4a51fa2ca1c677bd659008d27ded9f6380c79e8932e38dcdf2" + end + + resource "backports_abc" do + url "https://files.pythonhosted.org/packages/f5/d0/1d02695c0dd4f0cf01a35c03087c22338a4f72e24e2865791ebdb7a45eac/backports_abc-0.4.tar.gz" + sha256 "8b3e4092ba3d541c7a2f9b7d0d9c0275b21c6a01c53a61c731eba6686939d0a5" + end + + resource "certifi" do + url "https://files.pythonhosted.org/packages/41/bf/88a3269c7c95fc94a2c581c4b1b3d3ec21af7a268d6a3a4e54578adccfd6/certifi-2016.8.8.tar.gz" + sha256 "99864ed602d8a9d212e339b15ffa438895002eda7b7db20dca5309dac9605ae9" + end + + resource "futures" do + url "https://files.pythonhosted.org/packages/55/db/97c1ca37edab586a1ae03d6892b6633d8eaa23b23ac40c7e5bbc55423c78/futures-3.0.5.tar.gz" + sha256 "0542525145d5afc984c88f914a0c85c77527f65946617edb5274f72406f981df" + end + + resource "msgpack-python" do + url "https://files.pythonhosted.org/packages/21/27/8a1d82041c7a2a51fcc73675875a5f9ea06c2663e02fcfeb708be1d081a0/msgpack-python-0.4.8.tar.gz" + sha256 "1a2b19df0f03519ec7f19f826afb935b202d8979b0856c6fb3dc28955799f886" + end + + resource "pycrypto" do + url "https://files.pythonhosted.org/packages/60/db/645aa9af249f059cc3a368b118de33889219e0362141e75d4eaf6f80f163/pycrypto-2.6.1.tar.gz" + sha256 "f2ce1e989b272cfcb677616763e0a2e7ec659effa67a88aa92b3a65528f60a3c" + end + + resource "pyzmq" do + url "https://files.pythonhosted.org/packages/ab/3a/5826efd93ebbbdc33203f70c6ceebab1b58ac6cb1e1ab131cc6b990b4cfa/pyzmq-15.4.0.tar.gz" + sha256 "9d1d69da7ee78dce8721a1617c7938ded1cd1df76a6c1abf19acebb1a5ccc2bf" + end + + resource "requests" do + url "https://files.pythonhosted.org/packages/2e/ad/e627446492cc374c284e82381215dcd9a0a87c4f6e90e9789afefe6da0ad/requests-2.11.1.tar.gz" + sha256 "5acf980358283faba0b897c73959cecf8b841205bb4b2ad3ef545f46eae1a133" + end + + resource "singledispatch" do + url "https://files.pythonhosted.org/packages/d9/e9/513ad8dc17210db12cb14f2d4d190d618fb87dd38814203ea71c87ba5b68/singledispatch-3.4.0.3.tar.gz" + sha256 "5b06af87df13818d14f08a028e42f566640aef80805c3b50c5056b086e3c2b9c" + end + + resource "six" do + url "https://files.pythonhosted.org/packages/b3/b2/238e2590826bfdd113244a40d9d3eb26918bd798fc187e2360a8367068db/six-1.10.0.tar.gz" + sha256 "105f8d68616f8248e24bf0e9372ef04d3cc10104f1980f54d57b2ce73a5ad56a" + end + + resource "tornado" do + url "https://files.pythonhosted.org/packages/96/5d/ff472313e8f337d5acda5d56e6ea79a43583cc8771b34c85a1f458e197c3/tornado-4.4.1.tar.gz" + sha256 "371d0cf3d56c47accc66116a77ad558d76eebaa8458a6b677af71ca606522146" + end + + def resources + super - [resource("M2Crypto")] + end + + def install + venv = virtualenv_install_with_resources + resource("M2Crypto").stage do + inreplace "setup.py", "self.openssl = '/usr'", + "self.openssl = '#{Formula["openssl"].opt_prefix}'" + venv.pip_install Pathname.pwd + end + prefix.install libexec/"share" # man pages + (etc/"saltstack").install (buildpath/"conf").children # sample config files + end + + def caveats; <<-EOS + Sample configuration files have been placed in #{etc}/saltstack. + Saltstack will not use these by default. + EOS + end + + test do + assert_match version.to_s, shell_output("#{bin}/salt --version") + end +end From b1c052d8edf52c7fba9b235827fae8f0730f790b Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Wed, 18 Jul 2018 09:07:22 -0400 Subject: [PATCH 02/25] Try removing hack about installed pip versions. --- python/init.sls | 3 --- 1 file changed, 3 deletions(-) diff --git a/python/init.sls b/python/init.sls index fbcb6298..f66c6787 100644 --- a/python/init.sls +++ b/python/init.sls @@ -55,8 +55,5 @@ virtualenv: pip.installed: - pkgs: - virtualenv == 14.0.6 - {% if grains['os'] == 'MacOS' %} - - ignore_installed: True - {% endif %} - require: - pkg: pip From e137808c78717afe35dac9a96e9fad6760f4ec7f Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Wed, 18 Jul 2018 09:51:16 -0400 Subject: [PATCH 03/25] Reload modules after installing pip. --- python/init.sls | 1 + 1 file changed, 1 insertion(+) diff --git a/python/init.sls b/python/init.sls index f66c6787..55d6b0b0 100644 --- a/python/init.sls +++ b/python/init.sls @@ -5,6 +5,7 @@ python2: - pkgs: - python@2 - refresh: True + - reload_modules: True python3: pkg.installed: From 84bf909eccfc70fe71ead8a7d94a6d1fd158939b Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Wed, 18 Jul 2018 11:53:37 -0400 Subject: [PATCH 04/25] Try downgrading xcode image. --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4af138f2..d833a7ea 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,7 +25,7 @@ matrix: - SALT_NODE_ID=servo-mac1 - SALT_FROM_SCRATCH=true os: osx - osx_image: xcode8.3 + osx_image: xcode8 - env: - SALT_NODE_ID=servo-linux1 - SALT_FROM_SCRATCH=true @@ -49,7 +49,7 @@ matrix: - SALT_NODE_ID=servo-mac1 - SALT_FROM_SCRATCH=false os: osx - osx_image: xcode8.3 + osx_image: xcode8 - env: - SALT_NODE_ID=servo-linux1 - SALT_FROM_SCRATCH=false From cfecf0fb59b350b97488253cc47f3d1d44c820f8 Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Wed, 18 Jul 2018 12:04:45 -0400 Subject: [PATCH 05/25] Remove mac-specific homebrew changes --- .travis/dispatch.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.travis/dispatch.sh b/.travis/dispatch.sh index 6d7831c8..4d874bc2 100755 --- a/.travis/dispatch.sh +++ b/.travis/dispatch.sh @@ -97,8 +97,13 @@ fi # Accommodate homebrew changes to python 2/3 formulas. if [[ "${SALT_NODE_ID}" =~ servo-mac.* ]]; then - brew update - brew upgrade python + #travis_fold_start 'update_homebrew' 'Updating homebrew' + #brew update + #travis_fold_end 'update_homebrew' + #travis_fold_start 'upgrade_python' 'Upgrading python2->python3' + #brew upgrade python + #travis_fold_end + fi if [[ "${SALT_NODE_ID}" == "test" ]]; then From ce3f2e5fec95ddd5fc61cb710e3a28d121c51a2e Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Wed, 18 Jul 2018 12:08:09 -0400 Subject: [PATCH 06/25] Fix syntax error --- .travis/dispatch.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.travis/dispatch.sh b/.travis/dispatch.sh index 4d874bc2..e181f07f 100755 --- a/.travis/dispatch.sh +++ b/.travis/dispatch.sh @@ -96,15 +96,14 @@ if (( EUID != 0 )); then fi # Accommodate homebrew changes to python 2/3 formulas. -if [[ "${SALT_NODE_ID}" =~ servo-mac.* ]]; then +#if [[ "${SALT_NODE_ID}" =~ servo-mac.* ]]; then #travis_fold_start 'update_homebrew' 'Updating homebrew' #brew update #travis_fold_end 'update_homebrew' #travis_fold_start 'upgrade_python' 'Upgrading python2->python3' #brew upgrade python - #travis_fold_end - -fi + #travis_fold_end +#fi if [[ "${SALT_NODE_ID}" == "test" ]]; then # Run test suite separately for parallelism From 7ffe5166969ce72ae18794ca4cb417cebf555045 Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Wed, 18 Jul 2018 12:18:51 -0400 Subject: [PATCH 07/25] Try removing python before installing anything --- .travis/dispatch.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.travis/dispatch.sh b/.travis/dispatch.sh index e181f07f..52fe0137 100755 --- a/.travis/dispatch.sh +++ b/.travis/dispatch.sh @@ -96,14 +96,17 @@ if (( EUID != 0 )); then fi # Accommodate homebrew changes to python 2/3 formulas. -#if [[ "${SALT_NODE_ID}" =~ servo-mac.* ]]; then +if [[ "${SALT_NODE_ID}" =~ servo-mac.* ]]; then #travis_fold_start 'update_homebrew' 'Updating homebrew' #brew update #travis_fold_end 'update_homebrew' #travis_fold_start 'upgrade_python' 'Upgrading python2->python3' #brew upgrade python - #travis_fold_end -#fi + #travis_fold_end + travis_fold_start 'remove_python' 'Removing python' + brew uninstall python --force + travis_fold_end 'remove_python' +fi if [[ "${SALT_NODE_ID}" == "test" ]]; then # Run test suite separately for parallelism From 64c26d3707a5bd35e4a21ee9392ecd8e34d96e9b Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Wed, 18 Jul 2018 12:27:16 -0400 Subject: [PATCH 08/25] Force python uninstallation --- .travis/dispatch.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis/dispatch.sh b/.travis/dispatch.sh index 52fe0137..f10ef4a5 100755 --- a/.travis/dispatch.sh +++ b/.travis/dispatch.sh @@ -104,7 +104,7 @@ if [[ "${SALT_NODE_ID}" =~ servo-mac.* ]]; then #brew upgrade python #travis_fold_end travis_fold_start 'remove_python' 'Removing python' - brew uninstall python --force + brew uninstall python --ignore-dependencies --force travis_fold_end 'remove_python' fi From 763e549bc2fe37c1c76bb7f5408c0cba76d96261 Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Wed, 18 Jul 2018 13:01:59 -0400 Subject: [PATCH 09/25] Set explicit path for python. --- .travis/dispatch.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis/dispatch.sh b/.travis/dispatch.sh index f10ef4a5..837a9045 100755 --- a/.travis/dispatch.sh +++ b/.travis/dispatch.sh @@ -105,6 +105,7 @@ if [[ "${SALT_NODE_ID}" =~ servo-mac.* ]]; then #travis_fold_end travis_fold_start 'remove_python' 'Removing python' brew uninstall python --ignore-dependencies --force + export PATH="/usr/local/opt/python@2/libexec/bin:$PATH" travis_fold_end 'remove_python' fi From ae756ee6602f1a13f27a5a22d6e5e31e33ac2e25 Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Wed, 18 Jul 2018 17:56:49 -0400 Subject: [PATCH 10/25] Try forcing pip installation on macOS. --- python/init.sls | 3 +++ 1 file changed, 3 insertions(+) diff --git a/python/init.sls b/python/init.sls index 55d6b0b0..2c5451d3 100644 --- a/python/init.sls +++ b/python/init.sls @@ -49,6 +49,9 @@ pip: - python@2 # pip is included with python in homebrew {% endif %} - reload_modules: True + {% if grains['os'] == 'MacOS' %} + - ignore_installed: True + {% endif %} # virtualenv == 14.0.6 package creates virtualenv and virtualenv-3.5 executables # note that the version of the second may change between virtualenv versions From 0fe3c6130d4c509a9556dbdf681c74c427c14d06 Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Thu, 19 Jul 2018 10:58:14 -0400 Subject: [PATCH 11/25] Try installing python2 outside of salt --- .travis/dispatch.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis/dispatch.sh b/.travis/dispatch.sh index 837a9045..96f3f4e7 100755 --- a/.travis/dispatch.sh +++ b/.travis/dispatch.sh @@ -105,6 +105,7 @@ if [[ "${SALT_NODE_ID}" =~ servo-mac.* ]]; then #travis_fold_end travis_fold_start 'remove_python' 'Removing python' brew uninstall python --ignore-dependencies --force + brew install python@2 export PATH="/usr/local/opt/python@2/libexec/bin:$PATH" travis_fold_end 'remove_python' fi From 14756a8cf7571af18d82314c08c3180cf37f4994 Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Thu, 19 Jul 2018 11:05:53 -0400 Subject: [PATCH 12/25] Update homebrew before installing --- .travis/dispatch.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.travis/dispatch.sh b/.travis/dispatch.sh index 96f3f4e7..6194f431 100755 --- a/.travis/dispatch.sh +++ b/.travis/dispatch.sh @@ -97,17 +97,19 @@ fi # Accommodate homebrew changes to python 2/3 formulas. if [[ "${SALT_NODE_ID}" =~ servo-mac.* ]]; then - #travis_fold_start 'update_homebrew' 'Updating homebrew' - #brew update - #travis_fold_end 'update_homebrew' + travis_fold_start 'update_homebrew' 'Updating homebrew' + brew update + travis_fold_end 'update_homebrew' #travis_fold_start 'upgrade_python' 'Upgrading python2->python3' #brew upgrade python #travis_fold_end travis_fold_start 'remove_python' 'Removing python' brew uninstall python --ignore-dependencies --force + travis_fold_end 'remove_python' + travis_fold_start 'install_python2' 'Installing python2' brew install python@2 export PATH="/usr/local/opt/python@2/libexec/bin:$PATH" - travis_fold_end 'remove_python' + travis_fold_end 'install_python2' fi if [[ "${SALT_NODE_ID}" == "test" ]]; then From 7c59200ac286c063652f8bee7acfa63a1376480c Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Thu, 19 Jul 2018 11:21:57 -0400 Subject: [PATCH 13/25] Try upgrading pip --- .travis/dispatch.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis/dispatch.sh b/.travis/dispatch.sh index 6194f431..b9522d13 100755 --- a/.travis/dispatch.sh +++ b/.travis/dispatch.sh @@ -108,7 +108,8 @@ if [[ "${SALT_NODE_ID}" =~ servo-mac.* ]]; then travis_fold_end 'remove_python' travis_fold_start 'install_python2' 'Installing python2' brew install python@2 - export PATH="/usr/local/opt/python@2/libexec/bin:$PATH" + pip install --upgrade pip setuptools + #export PATH="/usr/local/opt/python@2/libexec/bin:$PATH" travis_fold_end 'install_python2' fi From 1b97f74755169d25f0350b9c39cd9cc654de83e7 Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Thu, 19 Jul 2018 17:03:35 -0400 Subject: [PATCH 14/25] Try making homebrew formula depend on python2 --- .travis/saltstack.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis/saltstack.rb b/.travis/saltstack.rb index 458d6d6d..7dff16e7 100644 --- a/.travis/saltstack.rb +++ b/.travis/saltstack.rb @@ -16,7 +16,8 @@ class Saltstack < Formula end depends_on "swig" => :build - depends_on :python if MacOS.version <= :snow_leopard + #depends_on :python if MacOS.version <= :snow_leopard + depends_on "python@2" depends_on "zeromq" depends_on "libyaml" depends_on "openssl" # For M2Crypto From 53725f11e9cc82cf0843b66798a53a5b06d9b0ad Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Fri, 20 Jul 2018 10:32:02 -0400 Subject: [PATCH 15/25] Try upgrading then removing python --- .travis/dispatch.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.travis/dispatch.sh b/.travis/dispatch.sh index b9522d13..ee05ee54 100755 --- a/.travis/dispatch.sh +++ b/.travis/dispatch.sh @@ -100,17 +100,17 @@ if [[ "${SALT_NODE_ID}" =~ servo-mac.* ]]; then travis_fold_start 'update_homebrew' 'Updating homebrew' brew update travis_fold_end 'update_homebrew' - #travis_fold_start 'upgrade_python' 'Upgrading python2->python3' - #brew upgrade python - #travis_fold_end + travis_fold_start 'upgrade_python' 'Upgrading python2->python3' + brew upgrade python + travis_fold_end travis_fold_start 'remove_python' 'Removing python' brew uninstall python --ignore-dependencies --force travis_fold_end 'remove_python' - travis_fold_start 'install_python2' 'Installing python2' - brew install python@2 - pip install --upgrade pip setuptools + #travis_fold_start 'install_python2' 'Installing python2' + #brew install python@2 + #pip install --upgrade pip setuptools #export PATH="/usr/local/opt/python@2/libexec/bin:$PATH" - travis_fold_end 'install_python2' + #travis_fold_end 'install_python2' fi if [[ "${SALT_NODE_ID}" == "test" ]]; then From 88e847fab6dbd48cb8b344797d2083480bd8f805 Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Fri, 20 Jul 2018 10:45:50 -0400 Subject: [PATCH 16/25] Fix syntax error --- .travis/dispatch.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis/dispatch.sh b/.travis/dispatch.sh index ee05ee54..f08124af 100755 --- a/.travis/dispatch.sh +++ b/.travis/dispatch.sh @@ -102,7 +102,7 @@ if [[ "${SALT_NODE_ID}" =~ servo-mac.* ]]; then travis_fold_end 'update_homebrew' travis_fold_start 'upgrade_python' 'Upgrading python2->python3' brew upgrade python - travis_fold_end + travis_fold_end 'upgrade_python' travis_fold_start 'remove_python' 'Removing python' brew uninstall python --ignore-dependencies --force travis_fold_end 'remove_python' From e20e36a7f0872a06771211ac87ba8bae32e0d0ad Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Fri, 20 Jul 2018 11:07:31 -0400 Subject: [PATCH 17/25] Try including salt python in path --- .travis/dispatch.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis/dispatch.sh b/.travis/dispatch.sh index f08124af..d8984b33 100755 --- a/.travis/dispatch.sh +++ b/.travis/dispatch.sh @@ -106,10 +106,10 @@ if [[ "${SALT_NODE_ID}" =~ servo-mac.* ]]; then travis_fold_start 'remove_python' 'Removing python' brew uninstall python --ignore-dependencies --force travis_fold_end 'remove_python' + export PATH="/usr/local/Cellar/saltstack/2016.3.3/libexec/bin:$PATH" #travis_fold_start 'install_python2' 'Installing python2' #brew install python@2 #pip install --upgrade pip setuptools - #export PATH="/usr/local/opt/python@2/libexec/bin:$PATH" #travis_fold_end 'install_python2' fi From 82ec884beda20a80fe4a70e8fe6d980e04f7d5f9 Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Fri, 20 Jul 2018 12:23:23 -0400 Subject: [PATCH 18/25] Ignore existing virtualenv installations on mac. --- python/init.sls | 3 +++ 1 file changed, 3 insertions(+) diff --git a/python/init.sls b/python/init.sls index 2c5451d3..72a8e484 100644 --- a/python/init.sls +++ b/python/init.sls @@ -61,3 +61,6 @@ virtualenv: - virtualenv == 14.0.6 - require: - pkg: pip + {% if grains['os'] == 'MacOS' %} + - ignore_installed: True + {% endif %} From 4913272a5b2f856da9891756d54a55d4c0b3b2dc Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Fri, 20 Jul 2018 12:51:15 -0400 Subject: [PATCH 19/25] upgrade openssl --- .travis/dispatch.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.travis/dispatch.sh b/.travis/dispatch.sh index d8984b33..318215be 100755 --- a/.travis/dispatch.sh +++ b/.travis/dispatch.sh @@ -106,6 +106,9 @@ if [[ "${SALT_NODE_ID}" =~ servo-mac.* ]]; then travis_fold_start 'remove_python' 'Removing python' brew uninstall python --ignore-dependencies --force travis_fold_end 'remove_python' + travis_fold_start 'upgrade_ssl' 'Upgrading openssl' + brew upgrade openssl + travis_fold_end 'upgrade_ssl' export PATH="/usr/local/Cellar/saltstack/2016.3.3/libexec/bin:$PATH" #travis_fold_start 'install_python2' 'Installing python2' #brew install python@2 From cc72071ae805233dbeb794ef4a8c055317689f83 Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Fri, 20 Jul 2018 13:05:00 -0400 Subject: [PATCH 20/25] upgrade more ssl --- .travis/dispatch.sh | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/.travis/dispatch.sh b/.travis/dispatch.sh index 318215be..57d98a41 100755 --- a/.travis/dispatch.sh +++ b/.travis/dispatch.sh @@ -100,20 +100,25 @@ if [[ "${SALT_NODE_ID}" =~ servo-mac.* ]]; then travis_fold_start 'update_homebrew' 'Updating homebrew' brew update travis_fold_end 'update_homebrew' + travis_fold_start 'upgrade_python' 'Upgrading python2->python3' brew upgrade python travis_fold_end 'upgrade_python' + travis_fold_start 'remove_python' 'Removing python' brew uninstall python --ignore-dependencies --force travis_fold_end 'remove_python' + + travis_fold_start 'install_python2' 'Installing python2' + brew install python@2 + #pip install --upgrade pip setuptools + travis_fold_end 'install_python2' + travis_fold_start 'upgrade_ssl' 'Upgrading openssl' - brew upgrade openssl + brew upgrade openssl || brew install openssl || true + pip install pyOpenSSL travis_fold_end 'upgrade_ssl' - export PATH="/usr/local/Cellar/saltstack/2016.3.3/libexec/bin:$PATH" - #travis_fold_start 'install_python2' 'Installing python2' - #brew install python@2 - #pip install --upgrade pip setuptools - #travis_fold_end 'install_python2' + #export PATH="/usr/local/Cellar/saltstack/2016.3.3/libexec/bin:$PATH" fi if [[ "${SALT_NODE_ID}" == "test" ]]; then From 70f2da11d319ffa94f5b5418f10235f113e52846 Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Fri, 20 Jul 2018 15:28:51 -0400 Subject: [PATCH 21/25] Don't depend on python@2 from salt formula --- .travis/saltstack.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis/saltstack.rb b/.travis/saltstack.rb index 7dff16e7..4e7800b1 100644 --- a/.travis/saltstack.rb +++ b/.travis/saltstack.rb @@ -16,8 +16,8 @@ class Saltstack < Formula end depends_on "swig" => :build - #depends_on :python if MacOS.version <= :snow_leopard - depends_on "python@2" + depends_on :python if MacOS.version <= :snow_leopard + #depends_on "python@2" depends_on "zeromq" depends_on "libyaml" depends_on "openssl" # For M2Crypto From 965c913eafe46ca733c5286cdbe98be1c4e224e1 Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Fri, 20 Jul 2018 15:29:25 -0400 Subject: [PATCH 22/25] Don't install python@2 directly --- .travis/dispatch.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis/dispatch.sh b/.travis/dispatch.sh index 57d98a41..27d39827 100755 --- a/.travis/dispatch.sh +++ b/.travis/dispatch.sh @@ -109,10 +109,10 @@ if [[ "${SALT_NODE_ID}" =~ servo-mac.* ]]; then brew uninstall python --ignore-dependencies --force travis_fold_end 'remove_python' - travis_fold_start 'install_python2' 'Installing python2' - brew install python@2 + #travis_fold_start 'install_python2' 'Installing python2' + #brew install python@2 #pip install --upgrade pip setuptools - travis_fold_end 'install_python2' + #travis_fold_end 'install_python2' travis_fold_start 'upgrade_ssl' 'Upgrading openssl' brew upgrade openssl || brew install openssl || true From 3ef835c8b8e1f72ec10031842b476f10a9a1438c Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Fri, 20 Jul 2018 16:08:29 -0400 Subject: [PATCH 23/25] don't remove python? --- .travis/dispatch.sh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.travis/dispatch.sh b/.travis/dispatch.sh index 27d39827..ed681cfb 100755 --- a/.travis/dispatch.sh +++ b/.travis/dispatch.sh @@ -105,20 +105,20 @@ if [[ "${SALT_NODE_ID}" =~ servo-mac.* ]]; then brew upgrade python travis_fold_end 'upgrade_python' - travis_fold_start 'remove_python' 'Removing python' - brew uninstall python --ignore-dependencies --force - travis_fold_end 'remove_python' - - #travis_fold_start 'install_python2' 'Installing python2' - #brew install python@2 - #pip install --upgrade pip setuptools - #travis_fold_end 'install_python2' - travis_fold_start 'upgrade_ssl' 'Upgrading openssl' brew upgrade openssl || brew install openssl || true pip install pyOpenSSL travis_fold_end 'upgrade_ssl' #export PATH="/usr/local/Cellar/saltstack/2016.3.3/libexec/bin:$PATH" + + #travis_fold_start 'remove_python' 'Removing python' + #brew uninstall python --ignore-dependencies --force + #travis_fold_end 'remove_python' + + #travis_fold_start 'install_python2' 'Installing python2' + #brew install python@2 + #pip install --upgrade pip setuptools + #travis_fold_end 'install_python2' fi if [[ "${SALT_NODE_ID}" == "test" ]]; then From f6c006e81b85f673ee870dd4928f8ae8ebebc4f6 Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Fri, 20 Jul 2018 16:25:19 -0400 Subject: [PATCH 24/25] Use pip before upgrading --- .travis/dispatch.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.travis/dispatch.sh b/.travis/dispatch.sh index ed681cfb..8dae9cf8 100755 --- a/.travis/dispatch.sh +++ b/.travis/dispatch.sh @@ -101,16 +101,16 @@ if [[ "${SALT_NODE_ID}" =~ servo-mac.* ]]; then brew update travis_fold_end 'update_homebrew' - travis_fold_start 'upgrade_python' 'Upgrading python2->python3' - brew upgrade python - travis_fold_end 'upgrade_python' - travis_fold_start 'upgrade_ssl' 'Upgrading openssl' brew upgrade openssl || brew install openssl || true pip install pyOpenSSL travis_fold_end 'upgrade_ssl' #export PATH="/usr/local/Cellar/saltstack/2016.3.3/libexec/bin:$PATH" + travis_fold_start 'upgrade_python' 'Upgrading python2->python3' + brew upgrade python + travis_fold_end 'upgrade_python' + #travis_fold_start 'remove_python' 'Removing python' #brew uninstall python --ignore-dependencies --force #travis_fold_end 'remove_python' From f08d85c5a8e50bf3e11f11b3a325a0b03f9ad083 Mon Sep 17 00:00:00 2001 From: Josh Matthews Date: Fri, 20 Jul 2018 17:19:30 -0400 Subject: [PATCH 25/25] Install python2 and show off pip --- .travis/dispatch.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.travis/dispatch.sh b/.travis/dispatch.sh index 8dae9cf8..1bfb27d0 100755 --- a/.travis/dispatch.sh +++ b/.travis/dispatch.sh @@ -115,10 +115,14 @@ if [[ "${SALT_NODE_ID}" =~ servo-mac.* ]]; then #brew uninstall python --ignore-dependencies --force #travis_fold_end 'remove_python' - #travis_fold_start 'install_python2' 'Installing python2' - #brew install python@2 + travis_fold_start 'install_python2' 'Installing python2' + brew install python@2 #pip install --upgrade pip setuptools - #travis_fold_end 'install_python2' + travis_fold_end 'install_python2' + + travis_fold_start 'demo_pip' 'Demonstrating pip viability' + python -m pip + travis_fold_end 'demo_pip' fi if [[ "${SALT_NODE_ID}" == "test" ]]; then