diff options
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | .gitmodules | 3 | ||||
| -rw-r--r-- | MANIFEST.in | 3 | ||||
| m--------- | relic | 0 | ||||
| -rw-r--r-- | setup.py | 23 | 
5 files changed, 25 insertions, 5 deletions
| @@ -2,5 +2,6 @@ RELIC-INFO  */version.py  build/  dist/ +relic/  *.EGG-INFO  __pycache__ diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 6d623ae..0000000 --- a/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "relic"] -	path = relic -	url = https://github.com/jhunkeler/relic.git diff --git a/MANIFEST.in b/MANIFEST.in index db2348e..5fd3a4a 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1 +1,4 @@  include RELIC-INFO +exclude verhawk/version.py +prune .git +prune relic diff --git a/relic b/relic deleted file mode 160000 -Subproject 0e534ef44ad30d8e2be5e8fa8ab7392e001cb7b @@ -1,6 +1,25 @@ -from setuptools import setup, find_packages +import os +import pkgutil  import sys -sys.path.insert(1, 'relic') +from setuptools import setup, find_packages +from subprocess import check_call, CalledProcessError + + +if not pkgutil.find_loader('relic'): +    relic_local = os.path.exists('relic') +    relic_submodule = (relic_local and +                       os.path.exists('.gitmodules') and +                       not os.listdir('relic')) +    try: +        if relic_submodule: +            check_call(['git', 'submodule', 'update', '--init', '--recursive']) +        elif not relic_local: +            check_call(['git', 'clone', 'https://github.com/spacetelescope/relic.git']) + +        sys.path.insert(1, 'relic') +    except CalledProcessError as e: +        print(e) +        exit(1)  import relic.release | 
