-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
52 lines (37 loc) · 1.37 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
42
43
44
45
46
47
48
49
50
51
52
#!/bin/env python
import os
from setuptools import setup
def find_xdg_data_files(syspath, relativepath, pkgname, data_files=[]):
for (dirname, _, filenames) in os.walk(relativepath):
if filenames:
syspath = syspath.format(pkgname=pkgname)
subpath = dirname.split(relativepath)[1]
if subpath.startswith("/"):
subpath = subpath[1:]
files = [os.path.join(dirname, f) for f in filenames]
data_files.append((os.path.join(syspath, subpath), files))
return data_files
def find_data_files(data_map, pkgname):
data_files = []
for (syspath, relativepath) in data_map:
find_xdg_data_files(syspath, relativepath, pkgname, data_files)
return data_files
DATA_FILES = [
("share/{pkgname}/plugins", "data/plugins"),
("share/icons", "data/icons"),
]
setup(
author="Elio Esteves Duarte",
author_email="elio.esteves.duarte@gmail.com",
description="Tomate plugin that shows the session progress in the notification area",
include_package_data=True,
keywords="pomodoro,tomate",
license="GPL-3",
long_description=open("README.md").read(),
name="tomate-statusicon-plugin",
data_files=find_data_files(DATA_FILES, "tomate"),
url="https://github.com/eliostvs/tomate-statusicon-plugin",
version="0.10.1",
zip_safe=False,
py_modules=[],
)