Skip to content

Instantly share code, notes, and snippets.

@ra-tolson
Created May 2, 2017 18:44
Show Gist options
  • Save ra-tolson/9f60055d9a5662c13ed097c03cd3f0f0 to your computer and use it in GitHub Desktop.
Save ra-tolson/9f60055d9a5662c13ed097c03cd3f0f0 to your computer and use it in GitHub Desktop.
a stash I had for working on 245; just a beginning
diff --git a/dev_requirements.txt b/dev_requirements.txt
index 08821ed..31c38d5 100644
--- a/dev_requirements.txt
+++ b/dev_requirements.txt
@@ -1,4 +1,3 @@
--r requirements.txt
pytest
pytest-timeout
pytest-mock
diff --git a/install.sh b/install.sh
index b9159f5..e779bd7 100755
--- a/install.sh
+++ b/install.sh
@@ -1,5 +1,10 @@
#!/bin/bash
+# `install.sh` to perform a dev install.
+# `install.sh orm` for a dev install that includes the ORM (at present installs Django).
+
+# TODO validate arguments here
+
set -e
# this script needs to run in the clone dir
@@ -40,6 +45,19 @@ echo === install GIPS itself ===
# TODO --process-dependency-links is deprecated
pip install --process-dependency-links -e .
+echo === install optional components ===
+for opt in "$@"; do
+ case "$opt" in
+ orm)
+ pip install -e '.[orm]'
+ ;;
+ *)
+ echo >/dev/stderr Unkonwn option: "'$1'"
+ exit 1
+ ;;
+ esac
+done
+
# help user with configuration
echo "Install complete. GIPS configuration:"
if ! gips_config print; then
diff --git a/requirements.txt b/requirements.txt
deleted file mode 100644
index 01f266a..0000000
--- a/requirements.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-six>=1.9.0
-requests
-django==1.10
-netCDF4
diff --git a/setup.py b/setup.py
index 27cd422..b79856b 100755
--- a/setup.py
+++ b/setup.py
@@ -57,12 +57,19 @@ setup(
install_requires=[
'Py6S>=1.5.0',
'shapely',
+ # must be installed manually prior to installing gips; see install.sh
'gippy>=0.3.8',
'python-dateutil',
'pydap',
'pysolar==0.6',
'landsat-util==0.8.0ircwaves0',
+ 'netCDF4',
+ 'requests',
+ 'six>=1.9.0',
],
+ extras_require={
+ 'orm': ['django==1.10'],
+ },
dependency_links=[
'http://github.com/ircwaves/landsat-util/tarball/landsat_util#egg=landsat-util-0.8.0ircwaves0'
],
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment