Skip to content

Commit

Permalink
Style fixes: flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
greenc-FNAL committed Nov 29, 2023
1 parent 2e10d8c commit b1b30c6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 27 deletions.
18 changes: 0 additions & 18 deletions var/spack/repos/builtin/packages/catch2/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ class Catch2(CMakePackage):
maintainers("ax3l", "greenc-FNAL")

# In-Development

version("develop", branch="devel")

# Releases
Expand Down Expand Up @@ -121,23 +120,6 @@ class Catch2(CMakePackage):
)
variant("shared", when="@3:", default=False, description="Build shared library")

def patch(self):
filter_file(
r"#include <vector>",
"#include <vector>\n#include <cstdint>",
"src/catch2/internal/catch_string_manip.hpp",
)
filter_file(
r"#include <vector>",
"#include <vector>\n#include <cstdint>",
"src/catch2/internal/catch_xmlwriter.hpp",
)
filter_file(
r"#include <vector>",
"#include <vector>\n#include <cstdint>",
"src/catch2/catch_test_case_info.hpp",
)

def patch(self):
filter_file(
r"#include \<catch2",
Expand Down
10 changes: 4 additions & 6 deletions var/spack/repos/builtin/packages/protobuf/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,8 @@ def cmake_args(self):
if not self.spec.satisfies("cxxstd=14") and self.compiler.name == "clang":
args.extend(
[
"-DCMAKE_CXX_FLAGS=-std=c++{0} -D_LIBCPP_ENABLE_CXX17_REMOVED_FEATURES=1".format(
self.spec.variants["cxxstd"].value
)
f'-DCMAKE_CXX_FLAGS=-std=c++{self.spec.variants["cxxstd"].value}'
" -D_LIBCPP_ENABLE_CXX17_REMOVED_FEATURES=1"
]
)

Expand All @@ -168,9 +167,8 @@ def cmake_args(self):
if not cxxstd == 14 and self.compiler.name == "clang":
args.extend(
[
"-DCMAKE_CXX_FLAGS=-std=c++{0} -D_LIBCPP_ENABLE_CXX17_REMOVED_FEATURES=1".format(
cxxstd
)
f"-DCMAKE_CXX_FLAGS=-std=c++{cxxstd}"
" -D_LIBCPP_ENABLE_CXX17_REMOVED_FEATURES=1"
]
)

Expand Down
6 changes: 3 additions & 3 deletions var/spack/repos/builtin/packages/rust/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@ def setup_build_environment(self, env):
certs = join_path(self.spec["openssl"].prefix, "etc/openssl/cert.pem")
env.set("CARGO_HTTP_CAINFO", certs)

# Set CARGO_HOME.
env.set("CARGO_HOME", os.path.join(os.path.dirname(self.stage.path), ".cargo"))

def configure(self, spec, prefix):
opts = []

Expand Down Expand Up @@ -145,9 +148,6 @@ def configure(self, spec, prefix):

configure(*flags)

def setup_build_environment(self, env):
env.set("CARGO_HOME", os.path.join(os.path.dirname(self.stage.path), ".cargo"))

def build(self, spec, prefix):
python("./x.py", "build")

Expand Down

0 comments on commit b1b30c6

Please sign in to comment.