now with proper package building
This commit is contained in:
parent
8fb17b22fd
commit
9baf1e44d3
@ -1,27 +0,0 @@
|
|||||||
#!/usr/bin/env python3
|
|
||||||
|
|
||||||
import sys
|
|
||||||
import pathlib
|
|
||||||
sys.path.append(str(pathlib.Path(__file__).absolute().parent.parent / 'src'))
|
|
||||||
|
|
||||||
from nmreval.configs import check_for_config
|
|
||||||
|
|
||||||
# does a directory for config stuff exist? create it if not
|
|
||||||
check_for_config()
|
|
||||||
|
|
||||||
# pyqtgraph warns on Mac if QApplication is created when it is imported
|
|
||||||
# import pyqtgraph
|
|
||||||
|
|
||||||
from nmreval.lib.logger import handle_exception
|
|
||||||
sys.excepthook = handle_exception
|
|
||||||
|
|
||||||
from gui_qt import App
|
|
||||||
|
|
||||||
app = App(['Team Rocket FTW!'])
|
|
||||||
|
|
||||||
from gui_qt.main.mainwindow import NMRMainWindow
|
|
||||||
|
|
||||||
mplQt = NMRMainWindow()
|
|
||||||
mplQt.show()
|
|
||||||
|
|
||||||
sys.exit(app.exec())
|
|
@ -1,54 +1,53 @@
|
|||||||
[metadata]
|
[build-system]
|
||||||
name = nmreval
|
requires = ["setuptools", "wheel", "setuptools-scm"]
|
||||||
version = 0.1
|
build-backend = "setuptools.build_meta"
|
||||||
description = Evaluation of data
|
|
||||||
long_description = file: README.md
|
[project]
|
||||||
author = Dominik Demuth
|
name = "nmreval"
|
||||||
author_email = dominik.demuth@physik.tu-darmstadt.de
|
version = "0.1"
|
||||||
install_requires = [
|
description = "Evaluation of NMR and orther data"
|
||||||
'numpy',
|
authors = [
|
||||||
'scipy',
|
{ name = "Dominik Demuth", email = "dominik.demuth@pkm.tu-darmstadt.de" },
|
||||||
'matplotlib',
|
|
||||||
'bsddb3',
|
|
||||||
'pyqtgraph',
|
|
||||||
'pyqt',
|
|
||||||
'h5py',
|
|
||||||
]
|
]
|
||||||
keywords = ['nmr', 'physics', 'science']
|
maintainers = [
|
||||||
|
{ name = "Dominik Demuth", email = "dominik.demuth@pkm.tu-darmstadt.de" },
|
||||||
|
]
|
||||||
|
requires-python = ">=3.7"
|
||||||
classifiers = [
|
classifiers = [
|
||||||
'Development Status :: 3 - Alpha',
|
"Development Status :: 3 - Alpha",
|
||||||
'Intended Audience :: End Users/Desktop',
|
"Intended Audience :: Science/Research",
|
||||||
'Intended Audience :: Science/Research',
|
"Topic :: Scientific/Engineering :: Physics",
|
||||||
'Topic :: Scientific/Engineering :: Physics',
|
"License :: OSI Approved :: BSD License",
|
||||||
'Topic :: Scientific/Engineering :: Visualization',
|
"Programming Language :: Python :: 3",
|
||||||
'Programming Language :: Python :: 3',
|
"Programming Language :: Python :: 3.7",
|
||||||
'Programming Language :: Python :: 3.7',
|
"Programming Language :: Python :: 3.8",
|
||||||
'Programming Language :: Python :: 3.8',
|
"Programming Language :: Python :: 3.9",
|
||||||
'Programming Language :: Python :: 3.9',
|
"Programming Language :: Python :: 3.10",
|
||||||
'Programming Language :: Python :: 3.10',
|
"Programming Language :: Python :: 3.10",
|
||||||
'Programming Language :: Python :: 3 :: only',
|
"Programming Language :: Python :: 3.11",
|
||||||
|
"Programming Language :: Python :: 3.12",
|
||||||
|
"Programming Language :: Python :: 3 :: only",
|
||||||
|
"Operating System :: POSIX :: Linux"
|
||||||
]
|
]
|
||||||
|
keywords = ["nmr", "physics", "science"]
|
||||||
license = { text = "BSD 3-Clause License" }
|
license = { text = "BSD 3-Clause License" }
|
||||||
|
dependencies = [
|
||||||
|
"numpy",
|
||||||
|
"scipy",
|
||||||
|
"h5py",
|
||||||
|
"PyQt5",
|
||||||
|
"pyqtgraph",
|
||||||
|
]
|
||||||
|
|
||||||
[tool.setuptools]
|
[project.optional-dependencies]
|
||||||
include_package_data = true
|
legacy = ["bsddb3"]
|
||||||
|
|
||||||
|
[project.urls]
|
||||||
|
Repository = "https://gitea.pkm.physik.tu-darmstadt.de/IPKM/nmreval"
|
||||||
|
Issues = "https://gitea.pkm.physik.tu-darmstadt.de/IPKM/nmreval/issues"
|
||||||
|
|
||||||
[tool.setuptools.packages]
|
[project.gui-scripts]
|
||||||
find = {}
|
nmreval = "gui_qt.cli:main"
|
||||||
scripts = bin/evaluate.py
|
|
||||||
|
|
||||||
[tool.setuptools.packages.find]
|
[tool.setuptools.packages.find]
|
||||||
include =[
|
where = ["src"]
|
||||||
'nmreval*',
|
|
||||||
'gui_qt*',
|
|
||||||
'resources*',
|
|
||||||
]
|
|
||||||
|
|
||||||
[tool.setuptools.package_data]
|
|
||||||
* = *.txt, *.npz, *.png, *.json
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,8 +0,0 @@
|
|||||||
matplotlib
|
|
||||||
numpy
|
|
||||||
scipy
|
|
||||||
PyQt5
|
|
||||||
h5py
|
|
||||||
pyqtgraph
|
|
||||||
bsddb3
|
|
||||||
requests
|
|
4
setup.py
4
setup.py
@ -1,4 +0,0 @@
|
|||||||
# Always prefer setuptools over distutils
|
|
||||||
from setuptools import setup
|
|
||||||
|
|
||||||
setup()
|
|
28
src/gui_qt/cli.py
Normal file
28
src/gui_qt/cli.py
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
|
||||||
|
def main():
|
||||||
|
import sys
|
||||||
|
from nmreval.configs import check_for_config
|
||||||
|
|
||||||
|
# does a directory for config stuff exist? create it if not
|
||||||
|
check_for_config()
|
||||||
|
|
||||||
|
# pyqtgraph warns on Mac if QApplication is created when it is imported
|
||||||
|
# import pyqtgraph
|
||||||
|
|
||||||
|
from nmreval.lib.logger import handle_exception
|
||||||
|
sys.excepthook = handle_exception
|
||||||
|
|
||||||
|
from gui_qt import App
|
||||||
|
|
||||||
|
app = App(['Team Rocket FTW!'])
|
||||||
|
|
||||||
|
from gui_qt.main.mainwindow import NMRMainWindow
|
||||||
|
|
||||||
|
mplQt = NMRMainWindow()
|
||||||
|
mplQt.show()
|
||||||
|
|
||||||
|
sys.exit(app.exec())
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
main()
|
Loading…
Reference in New Issue
Block a user