aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@users.noreply.github.com>2018-08-03 13:51:20 -0400
committerGitHub <noreply@github.com>2018-08-03 13:51:20 -0400
commit4f4a60cba3d46ba656a31a93710b1e069c2e04fb (patch)
tree178226d3effa9b7f517202be07693c477c5e512d
parent803ce780675d76b23ca142da201720eeb26863a2 (diff)
downloadverhawk-4f4a60cba3d46ba656a31a93710b1e069c2e04fb.tar.gz
Reimplement RELIC with latest standard method (#7)HEAD0.0.3master
-rw-r--r--.gitignore1
-rw-r--r--.gitmodules3
-rw-r--r--MANIFEST.in3
m---------relic0
-rw-r--r--setup.py23
5 files changed, 25 insertions, 5 deletions
diff --git a/.gitignore b/.gitignore
index f520061..aa5af58 100644
--- a/.gitignore
+++ b/.gitignore
@@ -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
diff --git a/setup.py b/setup.py
index 9ce4444..96c14b2 100644
--- a/setup.py
+++ b/setup.py
@@ -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