GNUnet  0.11.x
Public Member Functions | Static Public Attributes
talerbuildconfig.YarnTool Class Reference
Inheritance diagram for talerbuildconfig.YarnTool:
[legend]
Collaboration diagram for talerbuildconfig.YarnTool:
[legend]

Public Member Functions

def args (self, parser)
 
def check (self, buildconfig)
 
- Public Member Functions inherited from talerbuildconfig.Tool
def args (self)
 
def check (self, buildconfig)
 

Static Public Attributes

string name = "yarn"
 
string description = "The yarn package manager for node"
 

Detailed Description

Definition at line 126 of file talerbuildconfig.py.

Member Function Documentation

◆ args()

def talerbuildconfig.YarnTool.args (   self,
  parser 
)

Definition at line 130 of file talerbuildconfig.py.

130  def args(self, parser):
131  parser.add_argument("--with-yarn", action="store")
132 

◆ check()

def talerbuildconfig.YarnTool.check (   self,
  buildconfig 
)

Definition at line 133 of file talerbuildconfig.py.

References talerbuildconfig.existence(), and talerbuildconfig.tool_version().

133  def check(self, buildconfig):
134  yarn_arg = buildconfig.args.with_yarn
135  if yarn_arg is not None:
136  buildconfig._set_tool("yarn", yarn_arg)
137  return True
138  if existence("yarn"):
139  p1 = subprocess.run(
140  ["yarn", "help"], stderr=subprocess.STDOUT, stdout=subprocess.PIPE
141  )
142  if "No such file or directory" in p1.stdout.decode("utf-8"):
143  if existence("cmdtest"):
144  buildconfig._warn(
145  "cmdtest is installed, this can lead to known issues with yarn."
146  )
147  buildconfig._error(
148  "You seem to have the wrong kind of 'yarn' installed.\n"
149  "Please remove the conflicting binary before proceeding"
150  )
151  return False
152  yarn_version = tool_version("yarn --version")
153  buildconfig._set_tool("yarn", "yarn", yarn_version)
154  return True
155  elif existence("yarnpkg"):
156  yarn_version = tool_version("yarnpkg --version")
157  buildconfig._set_tool("yarn", "yarnpkg", yarn_version)
158  return True
159  return False
160 
161 
Here is the call graph for this function:

Field Documentation

◆ name

string talerbuildconfig.YarnTool.name = "yarn"
static

Definition at line 127 of file talerbuildconfig.py.

◆ description

string talerbuildconfig.YarnTool.description = "The yarn package manager for node"
static

Definition at line 128 of file talerbuildconfig.py.


The documentation for this class was generated from the following file: