GitHub Actions: do not install six in CI (#37361)
* GitHub Actions: do not install six in CI * Remove workflow code that was commented out * Remove any use of "six" from packages
This commit is contained in:
parent
131e1c0937
commit
68a4b2e4e4
9 changed files with 19 additions and 104 deletions
2
.github/workflows/audit.yaml
vendored
2
.github/workflows/audit.yaml
vendored
|
@ -25,7 +25,7 @@ jobs:
|
|||
python-version: ${{inputs.python_version}}
|
||||
- name: Install Python packages
|
||||
run: |
|
||||
pip install --upgrade pip six setuptools pytest coverage[toml]
|
||||
pip install --upgrade pip setuptools pytest coverage[toml]
|
||||
- name: Package audits (with coverage)
|
||||
if: ${{ inputs.with_coverage == 'true' }}
|
||||
run: |
|
||||
|
|
8
.github/workflows/unit_tests.yaml
vendored
8
.github/workflows/unit_tests.yaml
vendored
|
@ -62,7 +62,7 @@ jobs:
|
|||
cmake bison libbison-dev kcov
|
||||
- name: Install Python packages
|
||||
run: |
|
||||
pip install --upgrade pip six setuptools pytest pytest-xdist pytest-cov
|
||||
pip install --upgrade pip setuptools pytest pytest-xdist pytest-cov
|
||||
pip install --upgrade flake8 "isort>=4.3.5" "mypy>=0.900" "click" "black"
|
||||
- name: Setup git configuration
|
||||
run: |
|
||||
|
@ -107,7 +107,7 @@ jobs:
|
|||
sudo apt-get install -y coreutils kcov csh zsh tcsh fish dash bash
|
||||
- name: Install Python packages
|
||||
run: |
|
||||
pip install --upgrade pip six setuptools pytest coverage[toml] pytest-xdist
|
||||
pip install --upgrade pip setuptools pytest coverage[toml] pytest-xdist
|
||||
- name: Setup git configuration
|
||||
run: |
|
||||
# Need this for the git tests to succeed.
|
||||
|
@ -163,7 +163,7 @@ jobs:
|
|||
sudo apt-get -y install coreutils cvs gfortran graphviz gnupg2 mercurial ninja-build kcov
|
||||
- name: Install Python packages
|
||||
run: |
|
||||
pip install --upgrade pip six setuptools pytest coverage[toml] pytest-cov clingo pytest-xdist
|
||||
pip install --upgrade pip setuptools pytest coverage[toml] pytest-cov clingo pytest-xdist
|
||||
- name: Setup git configuration
|
||||
run: |
|
||||
# Need this for the git tests to succeed.
|
||||
|
@ -193,7 +193,7 @@ jobs:
|
|||
python-version: ${{ matrix.python-version }}
|
||||
- name: Install Python packages
|
||||
run: |
|
||||
pip install --upgrade pip six setuptools
|
||||
pip install --upgrade pip setuptools
|
||||
pip install --upgrade pytest coverage[toml] pytest-xdist pytest-cov
|
||||
- name: Setup Homebrew packages
|
||||
run: |
|
||||
|
|
2
.github/workflows/valid-style.yml
vendored
2
.github/workflows/valid-style.yml
vendored
|
@ -44,7 +44,7 @@ jobs:
|
|||
cache: 'pip'
|
||||
- name: Install Python packages
|
||||
run: |
|
||||
python3 -m pip install --upgrade pip six setuptools types-six black==23.1.0 mypy isort clingo flake8
|
||||
python3 -m pip install --upgrade pip setuptools types-six black==23.1.0 mypy isort clingo flake8
|
||||
- name: Setup git configuration
|
||||
run: |
|
||||
# Need this for the git tests to succeed.
|
||||
|
|
81
.github/workflows/windows_python.yml
vendored
81
.github/workflows/windows_python.yml
vendored
|
@ -23,7 +23,7 @@ jobs:
|
|||
python-version: 3.9
|
||||
- name: Install Python packages
|
||||
run: |
|
||||
python -m pip install --upgrade pip six pywin32 setuptools pytest-cov clingo
|
||||
python -m pip install --upgrade pip pywin32 setuptools pytest-cov clingo
|
||||
- name: Create local develop
|
||||
run: |
|
||||
./.github/workflows/setup_git.ps1
|
||||
|
@ -47,7 +47,7 @@ jobs:
|
|||
python-version: 3.9
|
||||
- name: Install Python packages
|
||||
run: |
|
||||
python -m pip install --upgrade pip six pywin32 setuptools coverage pytest-cov clingo
|
||||
python -m pip install --upgrade pip pywin32 setuptools coverage pytest-cov clingo
|
||||
- name: Create local develop
|
||||
run: |
|
||||
./.github/workflows/setup_git.ps1
|
||||
|
@ -71,85 +71,10 @@ jobs:
|
|||
python-version: 3.9
|
||||
- name: Install Python packages
|
||||
run: |
|
||||
python -m pip install --upgrade pip six pywin32 setuptools coverage
|
||||
python -m pip install --upgrade pip pywin32 setuptools coverage
|
||||
- name: Build Test
|
||||
run: |
|
||||
spack compiler find
|
||||
spack external find cmake
|
||||
spack external find ninja
|
||||
spack -d install abseil-cpp
|
||||
# TODO: johnwparent - reduce the size of the installer operations
|
||||
# make-installer:
|
||||
# runs-on: windows-latest
|
||||
# steps:
|
||||
# - name: Disable Windows Symlinks
|
||||
# run: |
|
||||
# git config --global core.symlinks false
|
||||
# shell:
|
||||
# powershell
|
||||
# - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
|
||||
# with:
|
||||
# fetch-depth: 0
|
||||
# - uses: actions/setup-python@57ded4d7d5e986d7296eab16560982c6dd7c923b
|
||||
# with:
|
||||
# python-version: 3.9
|
||||
# - name: Install Python packages
|
||||
# run: |
|
||||
# python -m pip install --upgrade pip six pywin32 setuptools
|
||||
# - name: Add Light and Candle to Path
|
||||
# run: |
|
||||
# $env:WIX >> $GITHUB_PATH
|
||||
# - name: Run Installer
|
||||
# run: |
|
||||
# ./share/spack/qa/setup_spack_installer.ps1
|
||||
# spack make-installer -s . -g SILENT pkg
|
||||
# echo "installer_root=$((pwd).Path)" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
|
||||
# env:
|
||||
# ProgressPreference: SilentlyContinue
|
||||
# - uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb
|
||||
# with:
|
||||
# name: Windows Spack Installer Bundle
|
||||
# path: ${{ env.installer_root }}\pkg\Spack.exe
|
||||
# - uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb
|
||||
# with:
|
||||
# name: Windows Spack Installer
|
||||
# path: ${{ env.installer_root}}\pkg\Spack.msi
|
||||
# execute-installer:
|
||||
# needs: make-installer
|
||||
# runs-on: windows-latest
|
||||
# defaults:
|
||||
# run:
|
||||
# shell: pwsh
|
||||
# steps:
|
||||
# - uses: actions/setup-python@57ded4d7d5e986d7296eab16560982c6dd7c923b
|
||||
# with:
|
||||
# python-version: 3.9
|
||||
# - name: Install Python packages
|
||||
# run: |
|
||||
# python -m pip install --upgrade pip six pywin32 setuptools
|
||||
# - name: Setup installer directory
|
||||
# run: |
|
||||
# mkdir -p spack_installer
|
||||
# echo "spack_installer=$((pwd).Path)\spack_installer" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
|
||||
# - uses: actions/download-artifact@v3
|
||||
# with:
|
||||
# name: Windows Spack Installer Bundle
|
||||
# path: ${{ env.spack_installer }}
|
||||
# - name: Execute Bundled Installer
|
||||
# run: |
|
||||
# $proc = Start-Process ${{ env.spack_installer }}\spack.exe "/install /quiet" -Passthru
|
||||
# $handle = $proc.Handle # cache proc.Handle
|
||||
# $proc.WaitForExit();
|
||||
# $LASTEXITCODE
|
||||
# env:
|
||||
# ProgressPreference: SilentlyContinue
|
||||
# - uses: actions/download-artifact@v3
|
||||
# with:
|
||||
# name: Windows Spack Installer
|
||||
# path: ${{ env.spack_installer }}
|
||||
# - name: Execute MSI
|
||||
# run: |
|
||||
# $proc = Start-Process ${{ env.spack_installer }}\spack.msi "/quiet" -Passthru
|
||||
# $handle = $proc.Handle # cache proc.Handle
|
||||
# $proc.WaitForExit();
|
||||
# $LASTEXITCODE
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
from six import string_types
|
||||
|
||||
import spack.platforms
|
||||
from spack.package import *
|
||||
from spack.pkg.builtin.mock.multimethod_base import MultimethodBase
|
||||
|
@ -102,7 +100,7 @@ def has_a_default(self):
|
|||
|
||||
@when("target=" + target.name)
|
||||
def different_by_target(self):
|
||||
if isinstance(self.spec.architecture.target, string_types):
|
||||
if isinstance(self.spec.architecture.target, str):
|
||||
return self.spec.architecture.target
|
||||
else:
|
||||
return self.spec.architecture.target.name
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
from six.moves import builtins
|
||||
import builtins
|
||||
|
||||
from spack.package import *
|
||||
|
||||
|
|
|
@ -2,16 +2,13 @@
|
|||
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
import six
|
||||
|
||||
from spack.package import *
|
||||
|
||||
|
||||
def is_string(x):
|
||||
"""validate a string"""
|
||||
try:
|
||||
return isinstance(x, six.string_types)
|
||||
return isinstance(x, str)
|
||||
except ValueError:
|
||||
return False
|
||||
|
||||
|
|
|
@ -2,12 +2,9 @@
|
|||
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
import numbers
|
||||
import os
|
||||
|
||||
from six import iteritems
|
||||
from six.moves.urllib.parse import urlparse
|
||||
import urllib.parse
|
||||
|
||||
from spack.package import *
|
||||
|
||||
|
@ -97,7 +94,7 @@ class Pythia6(CMakePackage):
|
|||
"ttbar.lhe": "db772b69ab4e0300d973b57414523ac8e7fa8535eac49ee52a6b69b1c131983d",
|
||||
}
|
||||
|
||||
for example, checksum in iteritems(examples):
|
||||
for example, checksum in examples.items():
|
||||
resource(
|
||||
name=example,
|
||||
url="http://pythiasix.hepforge.org/examples/{0}".format(example),
|
||||
|
@ -114,8 +111,8 @@ class Pythia6(CMakePackage):
|
|||
"https://pythiasix.hepforge.org/pythia6-announcement.txt": "2a52def41f0c93e32e0db58dbcf072b987ebfbd32e42ccfc1f9382fcf65f1271",
|
||||
}
|
||||
|
||||
for docurl, checksum in iteritems(docs):
|
||||
doc = os.path.basename(urlparse(docurl).path)
|
||||
for docurl, checksum in docs.items():
|
||||
doc = os.path.basename(urllib.parse.urlparse(docurl).path)
|
||||
resource(
|
||||
name=doc,
|
||||
url=docurl,
|
||||
|
|
|
@ -5,8 +5,6 @@
|
|||
|
||||
import re
|
||||
|
||||
from six import iteritems
|
||||
|
||||
from spack.package import *
|
||||
|
||||
|
||||
|
@ -197,7 +195,7 @@ class Rust(Package):
|
|||
rust_prerelease_versions = ["beta", "nightly", "master"]
|
||||
|
||||
for prerelease_version in rust_prerelease_versions:
|
||||
for rust_target, rust_arch_list in iteritems(rust_archs):
|
||||
for rust_target, rust_arch_list in rust_archs.items():
|
||||
for rust_arch in rust_arch_list:
|
||||
# All pre-release builds are built with the latest beta
|
||||
# compiler.
|
||||
|
@ -226,8 +224,8 @@ class Rust(Package):
|
|||
# _host_ architecture, not the target architecture, in order to support
|
||||
# cross compiling. I'm not sure Spack provides a way to specify a
|
||||
# distinction in the when clause, though.
|
||||
for rust_version, rust_targets in iteritems(rust_releases):
|
||||
for rust_target, rust_sha256 in iteritems(rust_targets):
|
||||
for rust_version, rust_targets in rust_releases.items():
|
||||
for rust_target, rust_sha256 in rust_targets.items():
|
||||
for rust_arch in rust_archs[rust_target]:
|
||||
resource(
|
||||
name="rust-{version}-{target}".format(
|
||||
|
|
Loading…
Reference in a new issue