diff options
author | Cathy Yeh <cathy@driver.xyz> | 2017-11-13 13:12:26 -0800 |
---|---|---|
committer | Cathy Yeh <cathy@driver.xyz> | 2017-11-13 13:15:32 -0800 |
commit | 5e5dce93ad398c5df89a071179fee0f977e520cf (patch) | |
tree | c02d4cd6e0d8945a7db8984768601655bbac7adc | |
parent | ac7502a053995ae1e9217b443c73d969d5481283 (diff) | |
download | beliefs-5e5dce93ad398c5df89a071179fee0f977e520cf.tar.gz beliefs-5e5dce93ad398c5df89a071179fee0f977e520cf.tar.bz2 beliefs-5e5dce93ad398c5df89a071179fee0f977e520cf.zip |
conda-build
meta.yaml, .package_install_steps.py
-rw-r--r-- | conda-build/.package_install_steps.py | 29 | ||||
-rw-r--r-- | conda-build/meta.yaml | 31 |
2 files changed, 60 insertions, 0 deletions
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/ |