From 57a97e8df1d72417a396fdf8d526fc78a058beb7 Mon Sep 17 00:00:00 2001 From: Steve Nyemba Date: Fri, 15 Aug 2025 17:07:34 -0500 Subject: [PATCH] bug fix: cli and installer (windows support) --- bin/smart-logger | 5 +++-- bin/smart-logger.bat | 2 ++ meta/__init__.py | 15 --------------- pyproject.toml | 30 +++++++++++++----------------- smart/__init__.py | 4 ++-- 5 files changed, 20 insertions(+), 36 deletions(-) create mode 100644 bin/smart-logger.bat delete mode 100644 meta/__init__.py diff --git a/bin/smart-logger b/bin/smart-logger index d531ef3..e5d0614 100755 --- a/bin/smart-logger +++ b/bin/smart-logger @@ -14,9 +14,10 @@ import smart.folder import smart.top import smart.logger import smart.files +from smart import meta import uuid import typer -import meta + import json import os import transport @@ -132,7 +133,7 @@ def apply_signup (email:str,key:str=None,provider:str='sqlite') : """ print () print (_msg) - pass + def post(_df,_table): """ Store data in a given location diff --git a/bin/smart-logger.bat b/bin/smart-logger.bat new file mode 100644 index 0000000..78e52b0 --- /dev/null +++ b/bin/smart-logger.bat @@ -0,0 +1,2 @@ +cd /D "%~dp0" +python smart-logger %1 %2 %3 %4 %5 %6 diff --git a/meta/__init__.py b/meta/__init__.py deleted file mode 100644 index 25ed952..0000000 --- a/meta/__init__.py +++ /dev/null @@ -1,15 +0,0 @@ -import os -__app_name__= "smart-logger" -__version__ = "1.10" -__author__ = "Steve L. Nyemba, info@the-phi.com" -__home__ = os.sep.join([os.environ['HOME'],'.smart-logger']) -__database__='smart_logs' -__license__= """ -Copyright 2017 - 2023, The Phi Technology - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -""" diff --git a/pyproject.toml b/pyproject.toml index 74dbce3..d7dc3e7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [build-system] -requires = ["setuptools>=45", "wheel"] +requires = ["setuptools>=61.0", "wheel"] build-backend = "setuptools.build_meta" [project] @@ -7,21 +7,12 @@ name = "smart-logger" # Replace with meta.__app_name__ dynamic = ["version"] description = "" # Add your project description here authors = [ - {name = "Your Name", email = "meta@the-phi.com"} # Replace with meta.__author__ + {name = "Steve L. Nyemba", email = "steve@the-phi.com"} # Replace with meta.__author__ ] license = {text = "MIT"} # Replace with meta.__license__ readme = "README.md" # Optional: add if you have a README requires-python = ">=3.7" -keywords = [ - "mongodb", - "couchdb", - "rabbitmq", - "file", - "read", - "write", - "s3", - "sqlite" -] +keywords = ["logs", "apps","folder","login"] classifiers = [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", @@ -40,14 +31,19 @@ transport = [ ] [project.urls] -Homepage = "https://dev.the-phi.com/git/steve/smart-top.git" -Repository = "https://dev.the-phi.com/git/steve/smart-top.git" +Homepage = "https://dev.the-phi.com/git/steve/smart-logger.git" +Repository = "https://dev.the-phi.com/git/steve/smart-logger.git" -[project.scripts] -smart-logger = "smart.logger:main" # Adjust the module path as needed +#[project.scripts] +#smart-logger = "smart.logger:main" # Adjust the module path as needed +[tool.setuptools] +include-package-data = true +zip-safe = false +script-files = ["bin/smart-logger","bin/smart-logger.bat"] [tool.setuptools.packages.find] -include = ["smart*","smart.meta", "smart.cmd", "smart.top", "smart.folder", "smart.logger", "smart.files"] +include = ["smart*"] + [tool.setuptools.dynamic] version = {attr = "smart.meta.__version__"} diff --git a/smart/__init__.py b/smart/__init__.py index 86296bf..c488320 100755 --- a/smart/__init__.py +++ b/smart/__init__.py @@ -148,5 +148,5 @@ def post(_df,_table): if hasattr(writer,'close') : writer.close() -if __name__ == '__main__' : - _cli() +#if __name__ == '__main__' : +# _cli()