diff --git a/build.py b/build.py index a10fb7253d84c00eca5249f05774273fde790f17..08635c4627a02cd8edf3cc46c2d2bb773426599e 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 0000000000000000000000000000000000000000..4dad93a1c02abe34b4326e6712b9d046abd2f4a8 --- /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 0000000000000000000000000000000000000000..c0f1d40f06d8ad73a9b009bc9805f48e7493327c --- /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 + +