Skip to content

Commit

Permalink
New release 20181116 (#712)
Browse files Browse the repository at this point in the history
* New release

* New release

* New release
  • Loading branch information
berggren authored Nov 16, 2018
1 parent 35d2f5a commit 18b1b38
Show file tree
Hide file tree
Showing 6 changed files with 566 additions and 35 deletions.
36 changes: 1 addition & 35 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@
sudo python setup.py install
"""

import os.path
import sys
import time

from setuptools import find_packages
from setuptools import setup
try: # for pip >= 10
Expand All @@ -31,44 +27,14 @@
from pip.download import PipSession
from pip.req import parse_requirements

timesketch_version = u'20180613'
timesketch_version = u'20181116'

timesketch_description = (
u'Timesketch is a web based tool for collaborative forensic timeline '
u'analysis. Using sketches you and your collaborators can easily organize '
u'timelines and analyze them all at the same time. Add meaning to '
u'your raw data with rich annotations, comments, tags and stars.')

def check_before_upload():
"""Warn user if frontend build is not present or is not recent.
Make sure that .js and .css bundles included in the PyPI package are up to
date.
Raises:
UserWarning
"""
this_dir = os.path.dirname(__file__)
frontend_dist_dir = os.path.join(
this_dir, 'timesketch', 'static', 'dist',
)
js = os.path.join(frontend_dist_dir, 'bundle.js')
css = os.path.join(frontend_dist_dir, 'bundle.css')
if not (os.path.isfile(js) and os.path.isfile(css)):
raise UserWarning(
"Build the frontend before uploading to PyPI!"
+ " (see docs/Developers-Guide.md)"
)
mtime = min(os.path.getmtime(js), os.path.getmtime(css))
if time.time() - mtime > 180:
raise UserWarning(
"Frontend build is older than 3 minutes, please rebuild!"
+ " (see docs/Developers-Guide.md)"
)

if 'upload' in sys.argv:
check_before_upload()

setup(
name=u'timesketch',
version=timesketch_version,
Expand Down
Loading

0 comments on commit 18b1b38

Please sign in to comment.