Skip to content

Commit

Permalink
workaround 'setup.py develop' package_dir issue
Browse files Browse the repository at this point in the history
When installing development mode using `python setup.py develop`
the egg-link path links to the root directory of the repo. It's
a known limitation with setuptools develop mode. Fix is to
store the package sources at the top level of the repo (where
setup.py is).
  • Loading branch information
calmrat committed Sep 5, 2015
1 parent 135da74 commit a35de28
Show file tree
Hide file tree
Showing 23 changed files with 10 additions and 3 deletions.
File renamed without changes.
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@
# acceptable version schema: major.minor[.patch][sub]
__version__ = '.'.join([version, release])
__pkg__ = 'status_report'
__pkgdir__ = {'status_report': 'source/status_report'}
__pkgdir__ = {}
__pkgs__ = [
'status_report',
'status_report.plugins',
]
__provides__ = ['status_report']
__desc__ = 'Status Report - Comfortable CLI Activity Status Reporting'
__scripts__ = ['source/status-report']
__scripts__ = ['bin/status-report']
__irequires__ = [
'python_dateutil==2.4.2',
'urllib2_kerberos',
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
9 changes: 8 additions & 1 deletion source/status_report/utils.py → status_report/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,14 @@
import codecs
import logging
import datetime
import time
import StringIO
import unicodedata
import ConfigParser
from pprint import pformat as pretty
from dateutil.relativedelta import MO as MONDAY
from dateutil.relativedelta import relativedelta as delta
from dateutil.parser import parse as dt_parse

# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Constants
Expand Down Expand Up @@ -514,7 +516,8 @@ def __init__(self, date=None):
elif date.lower() == "yesterday":
self.date = TODAY - delta(days=1)
else:
self.date = datetime.date(*[int(i) for i in date.split("-")])
#self.date = datetime.date(*[int(i) for i in date.split("-")])
self.date = dt_parse(date)
self.datetime = datetime.datetime(
self.date.year, self.date.month, self.date.day, 0, 0, 0)

Expand All @@ -526,6 +529,10 @@ def __unicode__(self):
""" String format for printing """
return unicode(self.date)

def as_timestamp(self):
""" unix timestamp """
return int(time.mktime(self.date.timetuple()))

@staticmethod
def this_week():
""" Return start and end date of the current week. """
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit a35de28

Please sign in to comment.