1
0
forked from M-Labs/thermostat

pytec GUI: Set up packaging

Co-authored-by: Egor Savkin <es@m-labs.hk>
This commit is contained in:
atse 2024-10-28 17:52:00 +08:00
parent cfde82bdcd
commit 57ffb096ce
4 changed files with 50 additions and 4 deletions

View File

@ -61,12 +61,25 @@
pytec = pkgs.python3Packages.buildPythonPackage {
pname = "pytec";
version = "0.0.0";
format = "pyproject";
src = "${self}/pytec";
propagatedBuildInputs = with pkgs.python3Packages; [
nativeBuildInputs = [ pkgs.qt6.wrapQtAppsHook ];
propagatedBuildInputs =
[ pkgs.qt6.qtbase ]
++ (with pkgs.python3Packages; [
numpy
matplotlib
];
pyqtgraph
pyqt6
qasync
pglive
]);
dontWrapQtApps = true;
postFixup = ''
wrapQtApp "$out/bin/tec_qt"
'';
};
pglive = pkgs.python3Packages.buildPythonPackage rec {
@ -90,6 +103,11 @@
default = thermostat;
};
apps.x86_64-linux.thermostat_gui = {
type = "app";
program = "${self.packages.x86_64-linux.pytec}/bin/tec_qt";
};
hydraJobs = {
inherit thermostat;
};

4
pytec/MANIFEST.in Normal file
View File

@ -0,0 +1,4 @@
graft examples
include pytec/gui/resources/artiq.ico
include pytec/gui/view/param_tree.json
include pytec/gui/view/tec_qt.ui

18
pytec/pyproject.toml Normal file
View File

@ -0,0 +1,18 @@
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"
[project]
name = "pytec"
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]
tec_qt = "tec_qt:main"
[tool.setuptools]
packages.find = {}
py-modules = ["autotune", "plot", "tec_qt"]

View File

@ -9,4 +9,10 @@ setup(
license="GPLv3",
install_requires=["setuptools"],
packages=find_packages(),
entry_points={
"gui_scripts": [
"tec_qt = tec_qt:main",
]
},
py_modules=['autotune', 'plot', 'tec_qt'],
)