Module Expr Str Import alias Import alias Import alias Import alias ImportFrom alias Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Assign NameStore Str TryExcept body Import alias ImportFrom alias handlers ExceptHandler type NameLoad body Print Str NameLoad Expr Call AttributeLoad NameLoad attr Num FunctionDef arguments args defaults body Assign NameStore Call AttributeLoad NameLoad attr keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword NameLoad keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword NameLoad keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Str keyword NameLoad keyword Str If CompareLt Call NameLoad AttributeLoad NameLoad attr Num body Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Num Return Call NameLoad Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args defaults body If CompareLt Call NameLoad AttributeLoad NameLoad attr Call NameLoad Str body Print Call AttributeLoad Str attr AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args NameParam defaults body Return Call NameLoad GeneratorExp NameLoad comprehension NameStore Call NameLoad NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad If BoolOpAnd NameLoad UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Print Call AttributeLoad Str attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad Assign NameStore ListLoad For NameStore GeneratorExp Call NameLoad NameLoad keyword NameLoad comprehension NameStore NameLoad body For NameStore Call NameLoad NameLoad body If AttributeLoad NameLoad attr body If CompareIn AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Continue Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr NameLoad orelse If AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr NameLoad orelse Raise Call NameLoad Call AttributeLoad Str attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad body Expr Str Assign NameStore BoolOpOr NameLoad ListLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad Call NameLoad NameLoad keyword NameLoad Assign NameStore Dict For NameStore NameLoad body Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr If UnaryOpNot AttributeLoad NameLoad attr body Continue If CompareIn NameLoad NameLoad body Raise Call NameLoad BinOpMod Str NameLoad Assign SubscriptStore NameLoad Index NameLoad NameLoad Assign NameStore ListLoad Assign NameStore Call NameLoad For NameStore NameLoad body If CompareIn AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Continue If BoolOpAnd AttributeLoad NameLoad attr CompareNotIn AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call NameLoad AttributeLoad NameLoad attr orelse If AttributeLoad NameLoad attr body Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr If CompareIn NameLoad NameLoad body Assign NameStore Call NameLoad AttributeLoad SubscriptLoad NameLoad Index NameLoad attr orelse Assign NameStore Call NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore BinOpAdd Call AttributeLoad Str attr NameLoad Str With Call NameLoad NameLoad Str NameStore body Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr NameLoad Print Call AttributeLoad Str attr NameLoad decorator_list If CompareEq NameLoad Str body Expr Call NameLoad Assign NameStore Call NameLoad If SubscriptLoad NameLoad Index Str body Assign NameStore Call AttributeLoad SubscriptLoad NameLoad Index Str attr Str orelse Assign NameStore NameLoad Expr Call NameLoad keyword SubscriptLoad NameLoad Index Str keyword SubscriptLoad NameLoad Index Str keyword SubscriptLoad NameLoad Index Str keyword NameLoad
N/A N/A 
This script is used to automate generation of requirements.txt for st2 components.

The idea behind this script is that that each component has it's own requirements
"in-requirements.txt" file. in-requirements.txt is an input requirements file -
a requirements file with dependencies but WITHOUT any version restrictions.

In addition to this file, there's also the top-level "fixed-requirements.txt"
which pins production versions for the whole st2 stack. During production use
(building, packaging, etc) requirements.txt is generated from in-requirements.txt
where version of packages are fixed according to fixed-requirements.txt.
 N/A argparse N/A os N/A os.path N/A sys distutils.version StrictVersion N/A OSCWD N/A N/A N/A os path abspath N/A os curdir N/A GET_PIP     curl https://bootstrap.pypa.io/get-pip.py | python N/A N/A N/A pip pip.req parse_requirements N/A N/A N/A ImportError N/A N/A Download pip:
 GET_PIP N/A N/A N/A sys exit 1 parse_args N/A N/A N/A N/A N/A parser N/A N/A argparse ArgumentParser description Tool for requirements.txt generation. N/A N/A N/A parser add_argument -s --source-requirements nargs + required True help Specify paths to requirements file(s). In case several requirements files are given their content is merged. N/A N/A N/A parser add_argument -f --fixed-requirements required True help Specify path to fixed-requirements.txt file. N/A N/A N/A parser add_argument -o --output-file default requirements.txt help Specify path to the resulting requirements file. N/A N/A N/A parser add_argument --skip default None help Comma delimited list of requirements to not include in the generated file. N/A N/A N/A len N/A sys argv 2 N/A N/A N/A N/A parser print_help N/A N/A N/A sys exit 1 N/A N/A vars N/A N/A parser parse_args N/A check_pip_version N/A N/A N/A N/A N/A N/A N/A StrictVersion N/A pip __version__ N/A StrictVersion 6.1.0 N/A N/A N/A N/A Upgrade pip, your version `{0}' is outdated:
 format N/A pip __version__ GET_PIP N/A N/A N/A sys exit 1 N/A load_requirements N/A N/A file_path N/A N/A N/A N/A tuple N/A r N/A r N/A parse_requirements file_path session False N/A locate_file N/A N/A path must_exist N/A False N/A N/A N/A N/A N/A N/A os path isabs path N/A N/A path N/A N/A N/A os path join OSCWD path N/A N/A must_exist N/A N/A N/A N/A os path isfile path N/A N/A N/A N/A Error: couldn't locate file `{0}' format path N/A path N/A merge_source_requirements N/A N/A sources N/A N/A N/A 
    Read requirements source files and merge it's content.
     N/A projects N/A set N/A merged_requirements N/A N/A infile_path N/A N/A locate_file p must_exist True N/A p sources N/A N/A req N/A load_requirements infile_path N/A N/A N/A req req N/A N/A N/A N/A N/A req req project_name projects N/A N/A N/A N/A N/A projects add N/A N/A req req project_name N/A N/A N/A merged_requirements append req N/A N/A N/A req link N/A N/A N/A N/A merged_requirements append req N/A N/A N/A RuntimeError N/A N/A Unexpected requirement {0} format req N/A merged_requirements N/A write_requirements N/A N/A sources fixed_requirements output_file skip N/A None None None None N/A N/A 
    Write resulting requirements taking versions from the fixed_requirements.
     N/A skip N/A skip N/A N/A requirements N/A merge_source_requirements sources N/A fixed N/A load_requirements N/A locate_file fixed_requirements must_exist True N/A fixedreq_hash N/A N/A req fixed N/A N/A project_name N/A N/A req req project_name N/A N/A N/A req req N/A N/A N/A N/A project_name fixedreq_hash N/A N/A N/A ValueError N/A Duplicate definition for dependency "%s" project_name N/A N/A fixedreq_hash N/A project_name req N/A lines_to_write N/A N/A links N/A set N/A req requirements N/A N/A N/A N/A N/A req req project_name skip N/A N/A N/A N/A N/A req link N/A N/A req link links N/A N/A N/A N/A links add N/A req link N/A rline N/A str N/A req link N/A N/A N/A req req N/A N/A project N/A N/A req req project_name N/A N/A project fixedreq_hash N/A N/A rline N/A str N/A N/A fixedreq_hash N/A project req N/A N/A rline N/A str N/A req req N/A N/A N/A lines_to_write append rline N/A lines_to_write N/A sorted lines_to_write N/A data N/A N/A N/A join lines_to_write N/A N/A open output_file w fp N/A N/A N/A N/A fp write # Don't edit this file. It's generated automatically!
 N/A N/A N/A fp write data N/A N/A N/A Requirements written to: {0} format output_file N/A N/A N/A __name__ __main__ N/A N/A N/A check_pip_version N/A args N/A parse_args N/A N/A args N/A skip N/A N/A skip N/A N/A N/A args N/A skip split , N/A N/A skip None N/A N/A write_requirements sources N/A args N/A source_requirements fixed_requirements N/A args N/A fixed_requirements output_file N/A args N/A output_file skip skip