From 911a4f630978063e977b6a431292f83e97d380a3 Mon Sep 17 00:00:00 2001 From: Xylar Asay-Davis Date: Tue, 14 May 2019 15:26:18 +0200 Subject: [PATCH] Add setup.py (#4) This will support Windows properly and allow conda-tree to be added to conda-forge. --- meta.yaml | 16 ++++++++++------ setup.py | 17 +++++++++++++++++ 2 files changed, 27 insertions(+), 6 deletions(-) create mode 100644 setup.py diff --git a/meta.yaml b/meta.yaml index b01295a..baa9288 100644 --- a/meta.yaml +++ b/meta.yaml @@ -1,25 +1,29 @@ package: name: conda-tree - version: "0.0.2" + version: "0.0.3" source: git_url: https://github.com/rvalieris/conda-tree.git - git_rev: v0.0.2 + git_rev: v0.0.3 requirements: host: - python + - pip + - setuptools run: + - python - networkx - conda build: - number: 1 + number: 0 noarch: generic - script: # See https://github.com/conda/conda-build/issues/3166 - - mkdir -p "$PREFIX/bin" - - cp conda-tree.py "$PREFIX/bin/conda-tree" + script: + - "{{ PYTHON }} -m pip install . --no-deps -vv" + entry_points: + - conda-tree = conda_tree:main test: commands: diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..e0a1716 --- /dev/null +++ b/setup.py @@ -0,0 +1,17 @@ +#!/usr/bin/env python + +from setuptools import setup +import shutil + + +# we need to rename the script because it's not a valid module name +shutil.copyfile('conda-tree.py', 'conda_tree.py') + +setup(name='conda-tree', + version='0.0.3', + description='conda dependency tree helper', + author='Renan Valieris', + url='https://github.com/rvalieris/conda-tree', + py_modules=['conda_tree'], + entry_points={ + 'console_scripts': ['conda-tree=conda_tree:main']})