2020-01-26 21:58:28 +01:00
|
|
|
#!/usr/bin/env python
|
2020-02-01 00:19:50 +01:00
|
|
|
"""Setup file for bumbleestatus bar to allow pip install of full package"""
|
2020-01-26 21:58:28 +01:00
|
|
|
# -*- coding: utf8 - *-
|
2020-02-01 00:19:50 +01:00
|
|
|
from setuptools import setup
|
|
|
|
import versioneer
|
2020-01-26 21:58:28 +01:00
|
|
|
|
|
|
|
with open('requirements/base.txt') as f:
|
2020-02-01 00:19:50 +01:00
|
|
|
INSTALL_REQS = [line for line in f.read().split('\n') if line]
|
2020-01-26 21:58:28 +01:00
|
|
|
|
|
|
|
# Module packages
|
|
|
|
def read_module(filename):
|
2020-02-01 00:19:50 +01:00
|
|
|
"""Read each in a module's requirements and parse it for extras"""
|
|
|
|
with open('requirements/modules/{}.txt'.format(filename)) as fname:
|
|
|
|
return [rline for rline in fname.read().split('\n') if rline]
|
2020-01-26 21:58:28 +01:00
|
|
|
|
|
|
|
EXTRAS_REQUIREMENTS_MAP = {
|
|
|
|
"battery-upower": read_module("battery_upower_reqs"),
|
|
|
|
"cpu": read_module("cpu"),
|
|
|
|
"cpu2": read_module("cpu2"),
|
|
|
|
"currency": read_module("currency"),
|
|
|
|
"docker_ps": read_module("docker_ps"),
|
|
|
|
"dunst": read_module("dunst"),
|
|
|
|
"getcrypto": read_module("getcrypto"),
|
|
|
|
"git": read_module("git"),
|
|
|
|
"github": read_module("github"),
|
|
|
|
"hddtemp": read_module("hddtemp"),
|
|
|
|
"layout-xkb": read_module("layout_xkb"),
|
|
|
|
"memory": read_module("memory"),
|
|
|
|
"network_traffic": read_module("network_traffic"),
|
|
|
|
"nic": read_module("nic"),
|
|
|
|
"pihole": read_module("pihole"),
|
|
|
|
"rss": read_module("rss"),
|
|
|
|
"spaceapi": read_module("spaceapi"),
|
|
|
|
"spotify": read_module("spotify"),
|
|
|
|
"stock": read_module("stock"),
|
|
|
|
"sun": read_module("sun"),
|
|
|
|
"system": read_module("system"),
|
|
|
|
"taskwarrior": read_module("taskwarrior"),
|
|
|
|
"title": read_module("title"),
|
|
|
|
"traffic": read_module("traffic"),
|
|
|
|
"weather": read_module("weather"),
|
|
|
|
"yubikey": read_module("yubikey"),
|
|
|
|
}
|
|
|
|
|
2020-02-01 14:04:34 +01:00
|
|
|
import glob
|
2020-01-26 21:58:28 +01:00
|
|
|
setup(
|
2020-02-01 00:19:50 +01:00
|
|
|
install_requires=INSTALL_REQS,
|
2020-01-26 21:58:28 +01:00
|
|
|
extras_require=EXTRAS_REQUIREMENTS_MAP,
|
2020-02-01 00:19:50 +01:00
|
|
|
version=versioneer.get_version(),
|
|
|
|
cmdclass=versioneer.get_cmdclass(),
|
2020-01-26 21:58:28 +01:00
|
|
|
zip_safe=False,
|
2020-02-01 14:04:34 +01:00
|
|
|
data_files=[('share/bumblebee-status/themes', glob.glob('themes/*.json')),
|
|
|
|
('share/bumblebee-status/themes/icons', glob.glob('themes/icons/*.json'))
|
|
|
|
]
|
2020-01-26 21:58:28 +01:00
|
|
|
)
|