Commit d88f8ac6 by plusvic

Fix bug when running setup.py from its own directory

parent c28922e0
...@@ -95,7 +95,10 @@ class BuildCommand(build): ...@@ -95,7 +95,10 @@ class BuildCommand(build):
def run(self): def run(self):
"""Execute the build command.""" """Execute the build command."""
os.chdir(os.path.dirname(__file__)) base_dir = os.path.dirname(__file__)
if base_dir:
os.chdir(base_dir)
sources = ['yara-python.c'] sources = ['yara-python.c']
exclusions = ['yara/libyara/modules/pe_utils.c'] exclusions = ['yara/libyara/modules/pe_utils.c']
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment