Skip to content

Commit

Permalink
Merge pull request beeware#636 from tbeadle/ouroboros_build
Browse files Browse the repository at this point in the history
Clean up determination of ouroboros dir.
  • Loading branch information
freakboy3742 authored Aug 18, 2017
2 parents cd3bc6c + 32fe332 commit b302123
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions tools/compile_stdlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,15 +137,19 @@
def ouroboros_repo_folder():
"""Return the folder where the ouroboros repo was cloned.
If the repo doesn't exist, clone it.
If the repo doesn't exist, return None. It should get cloned by
update_repo.
"""
path = os.path.join(os.path.dirname(os.path.dirname(REPO_ROOT)), 'ouroboros')
if os.path.isdir(os.path.join(path, '.git')):
return path

path = os.path.join(os.path.dirname(REPO_ROOT), 'ouroboros')
if not os.path.isdir(os.path.join(path, '.git')):
return path
for dirpath in (
os.path.dirname(os.path.dirname(REPO_ROOT)),
os.path.dirname(REPO_ROOT),
):
path = os.path.join(dirpath, 'ouroboros')
if os.path.isdir(os.path.join(path, '.git')):
return path
else:
return None


def native_modules(target):
Expand Down

0 comments on commit b302123

Please sign in to comment.