This repository was archived by the owner on Jun 5, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathsetup.py
More file actions
51 lines (36 loc) · 1.3 KB
/
setup.py
File metadata and controls
51 lines (36 loc) · 1.3 KB
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
#!/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"),
]
setup(
author="Elio Esteves Duarte",
author_email="elio.esteves.duarte@gmail.com",
description="Tomate plugin that shows screen notifications.",
include_package_data=True,
keywords="pomodoro,timer",
license="GPL-3",
long_description=open("README.md").read(),
name="tomate-notify-plugin",
data_files=find_data_files(DATA_FILES, "tomate"),
url="https://github.com/eliostvs/tomate-notify-plugin",
version="0.14.1",
zip_safe=False,
py_modules=[]
)