2020-05-09 21:22:00 +02:00
|
|
|
#!/usr/bin/env python
|
|
|
|
"""Setup file for bumbleestatus bar to allow pip install of full package"""
|
|
|
|
# -*- coding: utf8 - *-
|
2022-01-05 09:34:27 +01:00
|
|
|
from setuptools import setup, find_packages
|
2020-05-09 21:22:00 +02:00
|
|
|
import versioneer
|
|
|
|
|
2020-05-09 21:24:28 +02:00
|
|
|
with open("requirements/base.txt") as f:
|
|
|
|
INSTALL_REQS = [line for line in f.read().split("\n") if line]
|
2020-05-09 21:22:00 +02:00
|
|
|
|
|
|
|
# Module packages
|
|
|
|
def read_module(filename):
|
|
|
|
"""Read each in a module's requirements and parse it for extras"""
|
2020-05-09 21:24:28 +02:00
|
|
|
with open("requirements/modules/{}.txt".format(filename)) as fname:
|
|
|
|
return [rline for rline in fname.read().split("\n") if rline]
|
|
|
|
|
2020-05-09 21:22:00 +02: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"),
|
|
|
|
"getcrypto": read_module("getcrypto"),
|
|
|
|
"git": read_module("git"),
|
|
|
|
"github": read_module("github"),
|
|
|
|
"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"),
|
|
|
|
}
|
|
|
|
|
|
|
|
import glob
|
|
|
|
|
|
|
|
setup(
|
2020-05-09 21:24:28 +02:00
|
|
|
# packages=["bumblebee-status-packages"],
|
|
|
|
# package_dir={"bumblebee-status-packages": "."},
|
2020-05-09 21:22:00 +02:00
|
|
|
install_requires=INSTALL_REQS,
|
|
|
|
extras_require=EXTRAS_REQUIREMENTS_MAP,
|
|
|
|
version=versioneer.get_version(),
|
|
|
|
cmdclass=versioneer.get_cmdclass(),
|
|
|
|
zip_safe=False,
|
2020-05-10 13:01:40 +02:00
|
|
|
test_suite="tests",
|
2020-05-09 21:24:28 +02:00
|
|
|
data_files=[
|
|
|
|
("share/bumblebee-status/themes", glob.glob("themes/*.json")),
|
|
|
|
("share/bumblebee-status/themes/icons", glob.glob("themes/icons/*.json")),
|
2020-05-10 12:52:20 +02:00
|
|
|
("share/bumblebee-status/utility", glob.glob("bin/*")),
|
2022-09-21 05:15:38 +02:00
|
|
|
("share/man/man1", glob.glob("man/*.1")),
|
2020-05-09 21:24:28 +02:00
|
|
|
],
|
2022-01-05 09:34:27 +01:00
|
|
|
packages=find_packages(exclude=["tests", "tests.*"])
|
2020-05-09 21:22:00 +02:00
|
|
|
)
|