Migrate to setuptools (PEP 621)

Remove requirements.txt, move project files inside `src`
This commit is contained in:
Ashvith Shetty 2026-02-11 15:06:10 +05:30
parent 26021c8cd3
commit 62ae7f0fd1
5 changed files with 23 additions and 4 deletions

View file

@ -1,3 +1,24 @@
[build-system]
requires = ["setuptools>=82.0.0", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "throttled"
version = "0.11"
description = "Fix Intel CPU throttling on Linux"
readme = "README.md"
requires-python = ">=3.8"
dependencies = [
"dbus-python>=1.3.2",
"pygobject>=3.48.2",
]
[project.scripts]
throttled = "throttled:main"
[tool.setuptools.packages.find]
where = ["src"]
[tool.black]
line-length = 120
skip-string-normalization = true

View file

@ -1,3 +0,0 @@
configparser==7.0.0
dbus-python==1.3.2
PyGObject==3.48.2

View file

@ -0,0 +1 @@
from .throttled import main

View file

@ -22,7 +22,7 @@ from time import time
import dbus
from dbus.mainloop.glib import DBusGMainLoop
from gi.repository import GLib
from mmio import MMIO, MMIOError
from .mmio import MMIO, MMIOError
DEFAULT_SYSFS_POWER_PATH = '/sys/class/power_supply/AC*/online'
VOLTAGE_PLANES = {'CORE': 0, 'GPU': 1, 'CACHE': 2, 'UNCORE': 3, 'ANALOGIO': 4}