diff options
author | Tobias Brox <tobias@redpill-linpro.com> | 2020-06-07 17:52:56 +0200 |
---|---|---|
committer | Tobias Brox <tobias@redpill-linpro.com> | 2020-06-07 17:52:56 +0200 |
commit | c044055375ee75fede2c391ed753f13f3c7e829b (patch) | |
tree | 07e67e6ab30abbecacbd6508e44114a711e9f002 | |
parent | 8bbb76a658f700dee3c28118e4a2f19057657380 (diff) | |
download | calendar-cli-c044055375ee75fede2c391ed753f13f3c7e829b.zip |
bugfix
-rwxr-xr-x | calendar-cli.py | 1 | ||||
-rw-r--r-- | setup.py | 19 |
2 files changed, 6 insertions, 14 deletions
diff --git a/calendar-cli.py b/calendar-cli.py index ae5105c..a140798 100755 --- a/calendar-cli.py +++ b/calendar-cli.py @@ -27,6 +27,7 @@ from datetime import time as time_ import dateutil.parser from dateutil.rrule import rrulestr from icalendar import Calendar,Event,Todo,Journal,Alarm +import vobject import caldav import uuid import json @@ -5,21 +5,12 @@ import os from setuptools import setup, find_packages -## TODO: "import imp" will not work from python 3.3, ref -## 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. -## 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 ... +import calendar_cli as my_script + metadata = {} -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 +for attribute in ('version', 'author', 'author_email', 'license'): + if hasattr(my_script, '__%s__' % attribute): + metadata[attribute] = getattr(my_script, '__%s__' % attribute) setup( name='calendar-cli', |