-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
executable file
·41 lines (33 loc) · 1.11 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/usr/bin/env python3
import sys
from setuptools import setup
from setuptools.command.install import install
import subprocess
import glob
class PostInstallCommand(install):
"""Post-installation for installation mode."""
def run(self):
install.run(self)
subprocess.check_call(["update-desktop-database", "/usr/local/share/applications"])
print('''
To add GNOME keybindings (given that set-gnome-keybinding.py is installed), run:
set-gnome-keybinding.py "Start clocking new task" "timetracker --new" "F7"
set-gnome-keybinding.py "Toggle clocking" "timetracker --toggle" "F8"
''', file=sys.stderr)
setup(
cmdclass={
'install': PostInstallCommand,
},
name='timetracker',
version='0.1',
description='Track time spent on tasks',
license='GPLv3',
scripts=['scripts/timetracker'],
packages=['timetracker'],
data_files=[
('/usr/local/share/timetracker/icons', glob.glob('icons/*')),
('/usr/local/share/timetracker/ui', glob.glob('ui/*')),
('/usr/local/share/applications', ['data/timetracker.desktop']),
],
requires=['gi'],
)