diff --git a/install.sh b/install.sh index 1d09102..62902df 100755 --- a/install.sh +++ b/install.sh @@ -15,8 +15,7 @@ echo "Installing dependencies..." echo "==========================" apt update && apt -y install python3 python3-pip git -pip3 install setuptools -python3 setup.py install --force +python3 -m pip install . cp ./assets/rpi_screenbrightness_mqtt.conf /etc/rpi_screenbrightness_mqtt.conf diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..ea0fcf7 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,43 @@ +[build-system] +requires = ["setuptools>=61.0"] +build-backend = "setuptools.build_meta" + +[project] +name = "rpi_screenbrightness_mqtt" +version = "0.6.0" +authors = [ + { name="Tobias Perschon", email="tobias@perschon.at" }, +] +description = "A simple service that conntects to an mqtt broker so you can control the backlight of an rpi (touch)screen via mqtt (and eg. homeassistant)" +readme = "README.md" +requires-python = ">=3.8" +classifiers = [ + "Programming Language :: Python :: 3", + "License :: OSI Approved :: GNU Affero General Public License v3", + "Operating System :: OS Independent", +] +dependencies = [ + "rpi-backlight==2.6.0", + "paho-mqtt==2.1.0" +] + +[project.urls] +Homepage = "https://github.com/tofuSCHNITZEL/rpi-screenbrightness-mqtt" +Issues = "https://github.com/tofuSCHNITZEL/rpi-screenbrightness-mqtt/issues" + +[tool.pylint.main] +ignore-patterns = ["^\\.#"] + +py-version = "3.11" + +[tool.pylint.basic] +no-docstring-rgx = "^_" + +[tool.pylint."messages control"] +disable = ["too-many-arguments", "too-many-instance-attributes", "raw-checker-failed", "bad-inline-option", "locally-disabled", "file-ignored", "suppressed-message", "useless-suppression", "deprecated-pragma", "use-symbolic-message-instead", "use-implicit-booleaness-not-comparison-to-string", "use-implicit-booleaness-not-comparison-to-zero"] + +[tool.pylint.variables] +ignored-argument-names = "_.*|^ignored_|^unused_" + +[tool.setuptools] +packages = ["rpi_screenbrightness_mqtt"] \ No newline at end of file diff --git a/setup.py b/setup.py deleted file mode 100644 index f7a1a57..0000000 --- a/setup.py +++ /dev/null @@ -1,13 +0,0 @@ -from setuptools import setup, find_packages - -setup( - name = 'rpi_screenbrightness_mqtt', - version = '0.6.0', - author = 'Tobias Perschon', - author_email = 'tobias@perschon.at', - description = 'A simple service that conntects to an mqtt broker so you can control the backlight of an rpi (touch)screen via mqtt (and eg. homeassistant)', - license = 'GNU GPLv3', - url = 'https://github.com/tofuSCHNITZEL/rpi-screenbrightness-mqtt', - install_requires = ['rpi-backlight', 'paho-mqtt'], - packages = find_packages() -)