From dc70fd1e4b62c06c9c08f1a1ac1c40c9a2f3168f Mon Sep 17 00:00:00 2001
From: Christoph Knote <christoph.knote@med.uni-augsburg.de>
Date: Mon, 14 Mar 2022 10:47:49 +0100
Subject: [PATCH] Moving to poetry

---
 MANIFEST.in              |  6 ------
 pyproject.toml           | 46 ++++++++++++++++++++++++++++++++++++----
 src/boxmox/experiment.py |  7 +++---
 3 files changed, 45 insertions(+), 14 deletions(-)
 delete mode 100644 MANIFEST.in

diff --git a/MANIFEST.in b/MANIFEST.in
deleted file mode 100644
index 5c96aca..0000000
--- a/MANIFEST.in
+++ /dev/null
@@ -1,6 +0,0 @@
-exclude src/boxmox/_site_specific.py
-recursive-include examples *
-include CHANGES.md
-include INSTALL.md
-include README.md
-include LICENSE.txt
diff --git a/pyproject.toml b/pyproject.toml
index 7c36e66..0f7b629 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,5 +1,43 @@
-[build-system]
-requires = [
-    "numpy", "f90nml", "pyparsing", "setuptools"
+[tool.poetry]
+name = "boxmox"
+version = "1.2.0"
+description = "BOXMOX python interface"
+license = "GPL-3.0-or-later"
+authors = ["Christoph Knote <christoph.knote@med.uni-augsburg.de>"]
+readme = "README.md"
+homepage = "https://mbees.med.uni-augsburg.de/"
+repository = "https://mbees.med.uni-augsburg.de/gitlab/mbees/boxmox_pypackage"
+classifiers = [
+    "Programming Language :: Python :: 3"
+    "Development Status :: 5 - Production/Stable"
+    "Environment :: Console"
+    "Intended Audience :: Developers"
+    "Intended Audience :: Education"
+    "Intended Audience :: End Users/Desktop"
+    "Intended Audience :: Science/Research"
+    "License :: OSI Approved :: GNU General Public License v3 (GPLv3)"
+    "Operating System :: POSIX"
+    "Topic :: Education"
+    "Topic :: Scientific/Engineering"
+    "Topic :: Utilities"
+]
+packages = [
+    { include = "boxmox", from = "src" },
 ]
-build-backend = "setuptools.build_meta"
+
+[tool.poetry.urls]
+issues = "http://mbees.med.uni-augsburg.de/gitlab/mbees/boxmox_pypackage/issues"
+
+
+[tool.poetry.dependencies]
+python = "^3.10"
+numpy  = ">= 1.2"
+f90nml = ">= 1.3"
+pyparsing = ">= 3"
+
+[tool.poetry.dev-dependencies]
+pytest = "^5.2"
+
+[build-system]
+requires = ["poetry-core>=1.0.0"]
+build-backend = "poetry.core.masonry.api"
diff --git a/src/boxmox/experiment.py b/src/boxmox/experiment.py
index 1e1543a..6fec027 100644
--- a/src/boxmox/experiment.py
+++ b/src/boxmox/experiment.py
@@ -16,8 +16,7 @@ except:
     pass
 from . import FluxParser
 
-work_path = _installation.validate()
-
+workPath=os.environ['BOXMOX_WORK_PATH']
 examplesPath=os.path.join(os.environ['KPP_HOME'], "case_studies")
 
 class ExampleData:
@@ -106,7 +105,7 @@ class Experiment:
         self.mechanism = mechanism
 
         #: Absolute file system path of the experiment
-        self.path = os.path.join(work_path, self.name)
+        self.path = os.path.join(workPath, self.name)
 
         #: Input files
         self.input       = {}
@@ -326,7 +325,7 @@ class ExperimentFromExample(Experiment):
         self.name = str(uuid.uuid4())
         self.example = example
 
-        self.path = os.path.join(work_path, self.name)
+        self.path = os.path.join(workPath, self.name)
 
         self.log         = None
 
-- 
GitLab