From 130bde480e1508a7782ad68f08b4c44e53d3e09e Mon Sep 17 00:00:00 2001 From: atse Date: Mon, 25 Nov 2024 12:32:46 +0800 Subject: [PATCH] PyThermostat: Replace setup.py with pyproject.toml --- flake.nix | 1 + pythermostat/pyproject.toml | 21 +++++++++++++++++++++ pythermostat/setup.py | 21 --------------------- 3 files changed, 22 insertions(+), 21 deletions(-) create mode 100644 pythermostat/pyproject.toml delete mode 100644 pythermostat/setup.py diff --git a/flake.nix b/flake.nix index c846d21..eafafa2 100644 --- a/flake.nix +++ b/flake.nix @@ -61,6 +61,7 @@ pythermostat = pkgs.python3Packages.buildPythonPackage { pname = "pythermostat"; version = "0.0.0"; + format = "pyproject"; src = "${self}/pythermostat"; propagatedBuildInputs = diff --git a/pythermostat/pyproject.toml b/pythermostat/pyproject.toml new file mode 100644 index 0000000..5e37137 --- /dev/null +++ b/pythermostat/pyproject.toml @@ -0,0 +1,21 @@ +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" + +[project] +name = "pythermostat" +version = "0.0" +authors = [{name = "M-Labs"}] +description = "Control TEC" +urls.Repository = "https://git.m-labs.hk/M-Labs/thermostat" +license = {text = "GPLv3"} + +[project.gui-scripts] +thermostat_plot = "pythermostat.plot:main" + +[project.scripts] +thermostat_autotune = "pythermostat.autotune:main" +thermostat_test = "pythermostat.test:main" + +[tool.setuptools] +packages.find = {} diff --git a/pythermostat/setup.py b/pythermostat/setup.py deleted file mode 100644 index 7e34ea1..0000000 --- a/pythermostat/setup.py +++ /dev/null @@ -1,21 +0,0 @@ -from setuptools import setup, find_packages - -setup( - name="pythermostat", - version="0.0", - author="M-Labs", - url="https://git.m-labs.hk/M-Labs/thermostat", - description="Control TEC", - license="GPLv3", - install_requires=["setuptools"], - packages=find_packages(), - entry_points={ - "gui_scripts": [ - "thermostat_plot = pythermostat.plot:main", - ], - "console_scripts": [ - "thermostat_autotune = pythermostat.autotune:main", - "thermostat_test = pythermostat.test:main", - ] - }, -)