mirror of
https://github.com/clearlinux/autospec.git
synced 2026-08-20 05:55:52 +00:00
buildreq: Only parse Cargo.toml for cargo build patterns
Check if the default_pattern is cargo before attempting to use the Cargo.toml file for dependencies.
This commit is contained in:
committed by
Patrick McCarty
parent
986a4fc4b9
commit
06b2c7c079
@@ -457,6 +457,8 @@ class Requirements(object):
|
||||
Set the build requirements for building rust programs using cargo.
|
||||
"""
|
||||
config.set_build_pattern("cargo", 1)
|
||||
if config.default_pattern != "cargo":
|
||||
return
|
||||
self.add_buildreq("rustc")
|
||||
with util.open_auto(filename, "r") as ctoml:
|
||||
cargo = toml.loads(ctoml.read())
|
||||
|
||||
Reference in New Issue
Block a user