Skip to content

Commit

Permalink
Add documentation to the execute_step method.
Browse files Browse the repository at this point in the history
  • Loading branch information
davebx committed Jul 14, 2015
1 parent bbd31f7 commit f80c7f8
Showing 1 changed file with 16 additions and 0 deletions.
Expand Up @@ -885,6 +885,22 @@ def execute_step( self, tool_dependency, package_name, actions, action_dict, fil
Search and replace text in a file using regular expressions. Since this class is not used in the initial
download stage, no recipe step filtering is performed here, and None values are always returned for
filtered_actions and dir.
This step supports the full range of python's regular expression engine, including backreferences in
the replacement text.
Example:
<action type="regex_replace" filename="Makefile">
<regex>^CFLAGS(\s*)=\s*-g\s*-Wall\s*-O2\s*$$</regex>
<replacement>CFLAGS\1= -g -Wall -O2 -I$$(NCURSES_INCLUDE_PATH)/ncurses/ -I$$(NCURSES_INCLUDE_PATH) -L$$(NCURSES_LIB_PATH)</replacement>
</action>
Before:
CFLAGS = -g -Wall -O2
After:
CFLAGS = -g -Wall -O2 -I$(NCURSES_INCLUDE_PATH)/ncurses/ -I$(NCURSES_INCLUDE_PATH) -L$(NCURSES_LIB_PATH)
"""
log_file = os.path.join( install_environment.install_dir, basic_util.INSTALLATION_LOG )
if os.path.exists( log_file ):
Expand Down

0 comments on commit f80c7f8

Please sign in to comment.