From 0e6c0cf6e638692c9857d32b686e79b53b7e09d6 Mon Sep 17 00:00:00 2001 From: Romain Dorgueil Date: Wed, 3 May 2017 18:20:47 +0200 Subject: [PATCH] Tuning the dependency management model. --- Makefile | 2 +- requirements.txt | 15 ++++++++++----- setup.py | 32 +++++++++++++++----------------- 3 files changed, 26 insertions(+), 23 deletions(-) diff --git a/Makefile b/Makefile index 6763f65..6db0f7c 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ # This file has been auto-generated. # All changes will be lost, see Projectfile. # -# Updated at 2017-05-02 20:38:38.468986 +# Updated at 2017-05-03 18:02:59.359160 PACKAGE ?= bonobo PYTHON ?= $(shell which python) diff --git a/requirements.txt b/requirements.txt index 0fa8267..b11cfa3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,12 @@ -e . -colorama ==0.3.9 -fs ==2.0.3 -psutil ==5.2.2 -requests ==2.13.0 -stevedore ==1.21.0 +appdirs==1.4.3 +colorama==0.3.9 +enum34==1.1.6 +fs==2.0.3 +pbr==3.0.0 +psutil==5.2.2 +pytz==2017.2 +requests==2.13.0 +six==1.10.0 +stevedore==1.21.0 diff --git a/setup.py b/setup.py index 24eec0b..4cd8d82 100644 --- a/setup.py +++ b/setup.py @@ -1,22 +1,11 @@ # This file is autogenerated by edgy.project code generator. # All changes will be overwritten. -import os from setuptools import setup, find_packages +from codecs import open +from os import path -root_dir = os.path.dirname(os.path.abspath(__file__)) - -tolines = lambda c: list(filter(None, map(lambda s: s.strip(), c.split('\n')))) - - -def read(filename, flt=None): - try: - with open(filename) as f: - content = f.read().strip() - return flt(content) if callable(flt) else content - except EnvironmentError: - return '' - +here = path.abspath(path.dirname(__file__)) # Py3 compatibility hacks, borrowed from IPython. try: @@ -28,9 +17,18 @@ except NameError: exec(compile(open(fname).read(), fname, "exec"), globs, locs) +# Get the long description from the README file +with open(path.join(here, 'README.rst'), encoding='utf-8') as f: + long_description = f.read() + +# Get the classifiers from the classifiers file +tolines = lambda c: list(filter(None, map(lambda s: s.strip(), c.split('\n')))) +with open(path.join(here, 'classifiers.txt'), encoding='utf-8') as f: + classifiers = tolines(f.read()) + version_ns = {} try: - execfile(os.path.join(root_dir, 'bonobo/_version.py'), version_ns) + execfile(path.join(here, 'bonobo/_version.py'), version_ns) except EnvironmentError: version = 'dev' else: @@ -47,8 +45,8 @@ setup( 'requests >=2.0,<3.0', 'stevedore >=1.21,<2.0' ], version=version, - long_description=read('README.rst'), - classifiers=read('classifiers.txt', tolines), + long_description=long_description, + classifiers=classifiers, packages=find_packages(exclude=['ez_setup', 'example', 'test']), include_package_data=True, data_files=[('share/jupyter/nbextensions/bonobo-jupyter', [