Skip to content
This repository was archived by the owner on Dec 4, 2024. It is now read-only.

Commit cd6c352

Browse files
committed
Implemented packaging.
1 parent b023465 commit cd6c352

File tree

2 files changed

+63
-7
lines changed

2 files changed

+63
-7
lines changed

onnxgraphqt/__main__.py

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,18 +48,25 @@ def main():
4848

4949
app.exec_()
5050

51-
if __name__ == "__main__":
52-
proc0 = multiprocessing.Process(target=main, daemon=False)
53-
proc0.start()
54-
print(f"start GUI [{proc0.pid}]")
5551

52+
def mainWrapper():
5653
from . import layout_backend, LayoutBackend
54+
5755
if layout_backend == LayoutBackend.node_dagre:
5856
from .run_dagre_server import run as run_dagre_server
57+
proc0 = multiprocessing.Process(target=main, daemon=False)
58+
proc0.start()
59+
print(f"start GUI [{proc0.pid}]")
60+
5961
proc1 = run_dagre_server()
6062

61-
proc0.join()
62-
proc0.close()
63+
proc0.join()
64+
proc0.close()
6365

64-
if layout_backend == LayoutBackend.node_dagre:
6566
proc1.terminate()
67+
else:
68+
return main()
69+
70+
71+
if __name__ == "__main__":
72+
mainWrapper()

pyproject.toml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
[build-system]
2+
requires = ["setuptools>=61.2.0", "wheel", "setuptools_scm[toml]>=3.4.3"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "OnnxGraphQt"
7+
readme = "README.md"
8+
description = "An ONNX model visualizer and editor"
9+
authors = [{name = "fateshelled"}]
10+
license = {text = "MIT"}
11+
classifiers = [
12+
"Development Status :: 4 - Beta",
13+
"Environment :: Other Environment",
14+
"Intended Audience :: Developers",
15+
"License :: Public Domain",
16+
"Operating System :: OS Independent",
17+
"Programming Language :: Python",
18+
"Programming Language :: Python :: 3",
19+
"Programming Language :: Python :: 3 :: Only",
20+
"Topic :: Software Development :: Libraries :: Python Modules",
21+
]
22+
keywords = ["ONNX", "surgeon"]
23+
urls = {Homepage = "https://github.com/fateshelled/OnnxGraphQt"}
24+
requires-python = ">=3.4"
25+
dependencies = [
26+
"PySide2",
27+
"numpy",
28+
"onnx",
29+
"onnx-simplifier",
30+
"protobuf >= 3.20.0",
31+
"onnx_graphsurgeon", # https://github.com/NVIDIA/TensorRT/tree/master/tools/onnx-graphsurgeon
32+
"NodeGraphQt", # https://github.com/jchanvfx/NodeGraphQt
33+
"simple-onnx-processing-tools",
34+
"networkx",
35+
"pygraphviz",
36+
]
37+
38+
dynamic = ["version"]
39+
40+
[project.scripts]
41+
onnxgraphqt = "onnxgraphqt.__main__:mainWrapper"
42+
43+
[tool.setuptools]
44+
zip-safe = true
45+
46+
[tool.setuptools.packages.find]
47+
include = ["onnxgraphqt", "onnxgraphqt.*"]
48+
49+
[tool.setuptools_scm]

0 commit comments

Comments
 (0)