diff options
| author | Loic Guegan <manzerbredes@mailbox.org> | 2022-09-09 19:59:42 +0200 |
|---|---|---|
| committer | Loic Guegan <manzerbredes@mailbox.org> | 2022-09-09 19:59:42 +0200 |
| commit | 54d88bce8f0ae07fb4672f66fe0fed3f0edb4fcc (patch) | |
| tree | e18c1079d69f8728eda6359b6b7c342998b116ec | |
| parent | 0e1e51d1ee7392d22336e9bf0067a895741e8866 (diff) | |
Improve package architecture
| -rw-r--r-- | .gitignore | 3 | ||||
| -rw-r--r-- | esds/__init__.py | 1 | ||||
| -rw-r--r-- | esds/debug.py | 4 | ||||
| -rw-r--r-- | pyproject.toml | 7 | ||||
| -rw-r--r-- | setup.cfg | 6 |
5 files changed, 16 insertions, 5 deletions
@@ -1,4 +1,5 @@ __pycache__ esds.debug dist -esds.egg*
\ No newline at end of file +esds.egg* +build
\ No newline at end of file diff --git a/esds/__init__.py b/esds/__init__.py index 2ffc1cf..4ef2e06 100644 --- a/esds/__init__.py +++ b/esds/__init__.py @@ -1,4 +1,5 @@ __all__ = ["simulator", "node", "plugins", "helpers", "rcode", "debug"] +__version__ = "0.0.1" from esds.simulator import Simulator from esds.rcode import RCode diff --git a/esds/debug.py b/esds/debug.py index 66a781a..111b3a7 100644 --- a/esds/debug.py +++ b/esds/debug.py @@ -1,5 +1,6 @@ import sys,time,json import numpy as np +import esds def serialize_int64(obj): if isinstance(obj, np.int64): @@ -14,7 +15,8 @@ class Debug: self.logs=list() header={ "debug_version": 1, - "python_version" : sys.version, + "python_version": sys.version, + "esds_version": esds.__version__, "simulation_started_at": simulator.startat, "number_of_nodes": len(simulator.nodes), "manual_breakpoints": breakpoints, diff --git a/pyproject.toml b/pyproject.toml index 3c16784..e540da4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,10 +1,13 @@ [project] name = "esds" -version = "0.0.1" +dynamic = ["version"] [build-system] requires = ["setuptools"] build-backend = "setuptools.build_meta" [tool.setuptools] -packages = ["esds"]
\ No newline at end of file +packages = ["esds"] + +[tool.setuptools.dynamic] +version = {attr = "esds.__version__"} @@ -1,6 +1,6 @@ [metadata] name = esds -version = 0.0.1 +version = attr: esds.__version__ author = Loic Guegan maintainer = Loic Guegan description = Extensible Simulator of Distributed Systems @@ -9,3 +9,7 @@ license = GNU LGPLv3 [options] install_requires = numpy +packages=find: + +[options.packages.find] +exclude = manual
\ No newline at end of file |
