From 365e640328bb443a30f5cfa910853d7077500b90 Mon Sep 17 00:00:00 2001
From: Jason R Laura <jlaura@hemis.wr.usgs.gov>
Date: Wed, 8 Jun 2016 14:19:37 -0700
Subject: [PATCH] builds should not bush to anaconda

---
 build.py        | 18 +++---------------
 conda/build.sh  |  2 ++
 conda/meta.yaml | 30 ++++++++++++++++++++++++++++++
 3 files changed, 35 insertions(+), 15 deletions(-)
 create mode 100644 conda/build.sh
 create mode 100644 conda/meta.yaml

diff --git a/build.py b/build.py
index a10fb72..08635c4 100644
--- a/build.py
+++ b/build.py
@@ -18,31 +18,19 @@ conda = sh.Command('conda')
 
 def build_and_publish(path, channel):
     binfile = conda.build("--output", path).strip()
-    print "Building..."
     conda.build(path)
-    print "Upload to Anaconda.org..."
     binstar.upload(binfile, force=True, channel=channel)
 
 
-def conda_paths(project_name):
-    conda_recipes_dir = os.path.join(project_name, 'conda')
-
-    if not os.path.isdir(conda_recipes_dir):
-        sys.exit('no such dir: {}'.format(conda_recipes_dir))
-
-    for name in sorted(os.listdir(conda_recipes_dir)):
-        yield os.path.join(conda_recipes_dir, name)
-
-
 def main():
     parser = ArgumentParser()
     parser.add_argument('-p', '--project', required=True)
     parser.add_argument('-c', '--channel', required=False, default='main')
     parser.add_argument('-s', '--site', required=False, default=None)
+    parser.add_argument('-b', '--build_dir', required=False, default='conda')
     args = parser.parse_args()
-
-    for conda_path in conda_paths(args.project):
-        build_and_publish(conda_path, channel=args.channel)
+    
+    build_and_publish(args.build_dir, channel=args.channel)
     return 0
 
 
diff --git a/conda/build.sh b/conda/build.sh
new file mode 100644
index 0000000..4dad93a
--- /dev/null
+++ b/conda/build.sh
@@ -0,0 +1,2 @@
+#!/bin/bash
+$PYTHON setup.py install
diff --git a/conda/meta.yaml b/conda/meta.yaml
new file mode 100644
index 0000000..c0f1d40
--- /dev/null
+++ b/conda/meta.yaml
@@ -0,0 +1,30 @@
+package:
+  name: plio
+  version: 0.1.0
+
+source: 
+  git_url: https://github.com/USGS-Astrogeology/plio.git
+
+requirements:
+  build: 
+    - python 
+    - numpy
+    - pvl
+    - protobuf 3.0.0b2
+    - gdal >=2
+    - h5py
+    - pandas
+    - sqlalchemy
+    - pyyaml
+  run:
+    - python
+    - numpy
+    - pvl
+    - protobuf 3.0.0b2
+    - gdal >=2
+    - h5py
+    - pandas
+    - sqlalchemy
+    - pyyaml
+
+
-- 
GitLab