Skip to content

Commit

Permalink
Removed redundant recipe_dir attribute of recipes
Browse files Browse the repository at this point in the history
  • Loading branch information
inclement committed Nov 3, 2017
1 parent 57892d5 commit 9242bea
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions pythonforandroid/recipe.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,19 +225,19 @@ def apply_patch(self, filename, arch):
build directory.
"""
info("Applying patch {}".format(filename))
filename = join(self.recipe_dir, filename)
filename = join(self.get_recipe_dir(), filename)
shprint(sh.patch, "-t", "-d", self.get_build_dir(arch), "-p1",
"-i", filename, _tail=10)

def copy_file(self, filename, dest):
info("Copy {} to {}".format(filename, dest))
filename = join(self.recipe_dir, filename)
filename = join(self.get_recipe_dir(), filename)
dest = join(self.build_dir, dest)
shutil.copy(filename, dest)

def append_file(self, filename, dest):
info("Append {} to {}".format(filename, dest))
filename = join(self.recipe_dir, filename)
filename = join(self.get_recipe_dir(), filename)
dest = join(self.build_dir, dest)
with open(filename, "rb") as fd:
data = fd.read()
Expand Down Expand Up @@ -638,7 +638,6 @@ def get_recipe(cls, name, ctx):
if len(logger.handlers) > 1:
logger.removeHandler(logger.handlers[1])
recipe = mod.recipe
recipe.recipe_dir = dirname(recipe_file)
recipe.ctx = ctx
cls.recipes[name] = recipe
return recipe
Expand Down

0 comments on commit 9242bea

Please sign in to comment.