summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorTobias Brox <t@tobixen.no>2015-05-01 11:52:05 +0200
committerTobias Brox <t@tobixen.no>2015-05-01 11:52:05 +0200
commit5d879b61011ce0d793e302608c66ba870212d6e7 (patch)
treec73825d85cb2a274d5865393ef3187d5b0962930 /setup.py
parent52c300127ac48555d467b6dbe436d483af872d84 (diff)
downloadcalendar-cli-5d879b61011ce0d793e302608c66ba870212d6e7.zip
more work on vtodo, adding support for editing and adding categories. plus some other minor fixes
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py16
1 files changed, 10 insertions, 6 deletions
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',