Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Functions | Variables
setup Namespace Reference

Functions

 IsWindows ()
 
 Main (argv)
 

Variables

 SRC_ROOT
 
 FLUTTER_DIR = os.path.join(SRC_ROOT, 'flutter')
 

Detailed Description

Sets up githooks.

Function Documentation

◆ IsWindows()

setup.IsWindows ( )

Definition at line 20 of file setup.py.

20def IsWindows():
21 os_id = sys.platform
22 return os_id.startswith('win32') or os_id.startswith('cygwin')
23
24

◆ Main()

setup.Main (   argv)

Definition at line 25 of file setup.py.

25def Main(argv):
26 git = 'git'
27 githooks = os.path.join(FLUTTER_DIR, 'tools', 'githooks')
28 if IsWindows():
29 git = 'git.bat'
30 result = subprocess.run([
31 git,
32 'config',
33 'core.hooksPath',
34 githooks,
35 ], cwd=FLUTTER_DIR)
36 return result.returncode
37
38

Variable Documentation

◆ FLUTTER_DIR

setup.FLUTTER_DIR = os.path.join(SRC_ROOT, 'flutter')

Definition at line 17 of file setup.py.

◆ SRC_ROOT

setup.SRC_ROOT
Initial value:
1= os.path.dirname(
2 os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
3)

Definition at line 14 of file setup.py.