Correction of a problem with wheel package.
This commit is contained in:
@@ -1,6 +1,9 @@
|
|||||||
|
[build-system]
|
||||||
|
requires = ["setuptools", "wheel"]
|
||||||
|
build-backend = "setuptools.build_meta"
|
||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "pyappengine"
|
name = "pyappengine"
|
||||||
version = "0.1"
|
|
||||||
authors = [
|
authors = [
|
||||||
{ name="François Dausseur", email="fdausseur@free.fr" },
|
{ name="François Dausseur", email="fdausseur@free.fr" },
|
||||||
]
|
]
|
||||||
@@ -15,5 +18,10 @@ classifiers = [
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"systemd-python",
|
"systemd-python",
|
||||||
]
|
]
|
||||||
|
dynamic = ["version"]
|
||||||
|
|
||||||
[project.urls]
|
[project.urls]
|
||||||
"Homepage" = "https://git.beafrancois.fr/Foue/pyappengine"
|
"Homepage" = "https://git.beafrancois.fr/Foue/pyappengine"
|
||||||
|
|
||||||
|
[tool.setuptools.dynamic]
|
||||||
|
version = {file = ["VERSION"]}
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
#!/usr/bin/python3
|
#!/usr/bin/python3
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
import sys
|
||||||
import traceback
|
import traceback
|
||||||
from configparser import ConfigParser
|
from configparser import ConfigParser
|
||||||
import logging
|
import logging
|
||||||
@@ -204,6 +205,7 @@ class CommandsLoader:
|
|||||||
def __init__(self, config: ConfigParser, log: logging.Handler, modpath: str):
|
def __init__(self, config: ConfigParser, log: logging.Handler, modpath: str):
|
||||||
self.config = config
|
self.config = config
|
||||||
self.modpath = modpath
|
self.modpath = modpath
|
||||||
|
sys.path.append(os.path.join(modpath))
|
||||||
Commands.defmod = self.config["general"].get("default")
|
Commands.defmod = self.config["general"].get("default")
|
||||||
precmd = self.config["general"].get("methods_prefix")
|
precmd = self.config["general"].get("methods_prefix")
|
||||||
if not precmd is None:
|
if not precmd is None:
|
||||||
@@ -242,7 +244,11 @@ class CommandsLoader:
|
|||||||
self.cmods = cmds
|
self.cmods = cmds
|
||||||
|
|
||||||
def _load_module(self, name: str):
|
def _load_module(self, name: str):
|
||||||
|
try:
|
||||||
module = import_module(name)
|
module = import_module(name)
|
||||||
|
except ModuleNotFoundError:
|
||||||
|
raise Exception(f"""The module "{name}" could not be loaded.""")
|
||||||
|
|
||||||
members = inspect.getmembers(module, inspect.isclass)
|
members = inspect.getmembers(module, inspect.isclass)
|
||||||
conf = None
|
conf = None
|
||||||
if name[len(self.precmds):] in self.config.sections():
|
if name[len(self.precmds):] in self.config.sections():
|
||||||
|
|||||||
Reference in New Issue
Block a user