From 5e5dce93ad398c5df89a071179fee0f977e520cf Mon Sep 17 00:00:00 2001 From: Cathy Yeh Date: Mon, 13 Nov 2017 13:12:26 -0800 Subject: conda-build meta.yaml, .package_install_steps.py --- conda-build/.package_install_steps.py | 29 +++++++++++++++++++++++++++++ conda-build/meta.yaml | 31 +++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 conda-build/.package_install_steps.py create mode 100644 conda-build/meta.yaml diff --git a/conda-build/.package_install_steps.py b/conda-build/.package_install_steps.py new file mode 100644 index 0000000..4e22bb8 --- /dev/null +++ b/conda-build/.package_install_steps.py @@ -0,0 +1,29 @@ +import os +from setuptools import setup, find_packages +from yaml import load +import jinja2 + + +def load_meta_data(fname): + with open(fname) as input_fp: + # note that EDITABLE_FLAG is not required because we getting it from environ + template = jinja2.Template(input_fp.read(), undefined=jinja2.StrictUndefined) + return load(template.render(**os.environ)) + + +def main(): + meta_data = load_meta_data('conda-build/meta.yaml') + setup( + name=meta_data['package']['name'], + version=meta_data['package']['version'], + include_package_data=True, + zip_safe=False, + entry_points={ + 'console_scripts': meta_data['build'].get('entry_points', []) + }, + packages=find_packages() + ) + + +if __name__ == '__main__': + main() diff --git a/conda-build/meta.yaml b/conda-build/meta.yaml new file mode 100644 index 0000000..b7d065b --- /dev/null +++ b/conda-build/meta.yaml @@ -0,0 +1,31 @@ +package: + name: beliefs + version: {{ VERSION }} + +source: + git_url: .. + +build: + script: python .package_install_steps.py install + script_env: + - VERSION + +requirements: + build: + - python + - setuptools + - jinja2 + - pyyaml + + run: + - python + - jinja2 + - pyyaml + - pytest + - numpy + - networkx >=1.11 + +anaconda_upload: True + +about: + home: https://github.com/drivergroup/beliefs/ -- cgit v1.2.3