Skip to content

Commit

Permalink
Make symlinks even when no git.
Browse files Browse the repository at this point in the history
  • Loading branch information
ketch committed Jul 26, 2013
1 parent d63608c commit 1eadb4d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,14 +231,18 @@ def dev_setup(subpackages):
"waiting 5s and trying again [fail %d/20]" % fails
time.sleep(5)

print "Git development environment initialized for:", package


def make_symlinks(subpackages):
for package, package_dict in subpackages.items():
for subpackage, src_dir in package_dict['python_src_dir']:
symlink(os.path.join(package, src_dir, subpackage),
os.path.join('clawpack', subpackage))
if 'fortran_src_dir' in package_dict:
symlink(os.path.join(package, package_dict['fortran_src_dir']),
os.path.join('clawpack', package, 'src'))

print "Git development environment initialized for:", package

def setup_package(setup_dict, subpackages):
from numpy.distutils.core import setup
Expand All @@ -254,6 +258,7 @@ def setup_package(setup_dict, subpackages):
try:
if os.path.exists('.git'):
dev_setup(subpackages)
make_symlinks(subpackages)
setup(configuration=configuration,
**setup_dict)
finally:
Expand Down

0 comments on commit 1eadb4d

Please sign in to comment.