From 5d879b61011ce0d793e302608c66ba870212d6e7 Mon Sep 17 00:00:00 2001 From: Tobias Brox Date: Fri, 1 May 2015 11:52:05 +0200 Subject: more work on vtodo, adding support for editing and adding categories. plus some other minor fixes --- setup.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'setup.py') diff --git a/setup.py b/setup.py index b153da2..a3cebcb 100644 --- a/setup.py +++ b/setup.py @@ -9,13 +9,17 @@ from setuptools import setup, find_packages ## http://stackoverflow.com/questions/67631/how-to-import-a-module-given-the-full-path. ## Since we depend on caldav which depends on vobject which currently ## doesn't support python3, it's not an issue right now. -import imp -my_script = imp.load_source('my_script', './calendar-cli.py') +## but it is an issue that the purpose of this script is to enable installation of dependencies, +## and if the dependencies doesn't exist, this import breaks! TODO ... metadata = {} -for attribute in ('version', 'author', 'author_email', 'license'): - if hasattr(my_script, '__%s__' % attribute): - metadata[attribute] = getattr(my_script, '__%s__' % attribute) - +import imp +try: + my_script = imp.load_source('my_script', './calendar-cli.py') + for attribute in ('version', 'author', 'author_email', 'license'): + if hasattr(my_script, '__%s__' % attribute): + metadata[attribute] = getattr(my_script, '__%s__' % attribute) +except: + pass setup( name='calendar-cli', -- cgit v1.2.3