Skip to content

Commit

Permalink
Merge pull request #23 from MohammadrezaAmani/inui-1.0.0.1-query
Browse files Browse the repository at this point in the history
fit(CLI): add cli tools to code.
  • Loading branch information
MohammadrezaAmani authored Nov 24, 2024
2 parents cbda6cc + f3038ba commit 48e006e
Show file tree
Hide file tree
Showing 5 changed files with 77 additions and 15 deletions.
15 changes: 4 additions & 11 deletions .github/workflows/pipy_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,20 @@ on:
push:
branches:
- main

jobs:
build-n-publish:
name: Publish to PyPI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set up Python 3.12
uses: actions/setup-python@v3
with:
python-version: "3.12"

- name: Upgrade pip and install tools
run: |
python -m pip install --upgrade pip
python -m pip install build twine uv
- name: Build the package
run: uv build

- name: Install dependencies
run: python -m pip install setuptools wheel
- name: Build a binary wheel
run: python setup.py sdist bdist_wheel
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@master
with:
Expand Down
16 changes: 13 additions & 3 deletions inui/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
from inui import build
from inui.toinui import convert
import logging
from inui import __version__
import os

INUI_PATH = os.path.dirname(os.path.realpath(__file__))


logging.basicConfig(
level=logging.INFO, format="%(asctime)s - %(levelname)s - %(message)s"
Expand Down Expand Up @@ -78,7 +81,7 @@
},
],
},
"version": {"alias": ["v"], "help": "Version of INUI.", "args": []},
"version": {"aliases": ["v"], "help": "Version of INUI.", "args": []},
}


Expand Down Expand Up @@ -143,7 +146,14 @@ def main():
indent=args.indent,
)
if args.command == "version":
print(__version__)
print(__version__())


def __version__() -> str:
config_path = os.path.join(INUI_PATH, "__version__")
with open(config_path, encoding="utf-8") as f:
text = f.read()
return text.strip()


if __name__ == "__main__":
Expand Down
1 change: 1 addition & 0 deletions inui/__version__
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.0.0.5
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "inui"
version = "1.0.0.4"
version = "1.0.0.5"
description = "Powerful and Highly Customizable Python Library for UI"
readme = "README.md"
authors = [{ name = "Mohammadreza Amani", email = "[email protected]" }]
Expand Down
58 changes: 58 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
import codecs
import os

from setuptools import find_packages, setup

here = os.path.abspath(os.path.dirname(__file__))
with codecs.open(os.path.join(here, "README.md"), encoding="utf-8") as fh:
long_description = "\n" + fh.read()


INUI_PATH = os.path.join(os.path.dirname(os.path.realpath(__file__)), "inui")


def __version__() -> str:
config_path = os.path.join(INUI_PATH, "__version__")
with open(config_path, encoding="utf-8") as f:
text = f.read()
return text.strip()


VERSION = "0.9.7.2"

PACKAGE_NAME = "inui"
DESCRIPTION = ""
LONG_DESCRIPTION = "Powerful and Highly Customizable Python Library for UI"
AUTHOR_NAME = "Mohammadreza Amani"
AUTHOR_EMAIL = "[email protected]"
PROJECT_URL = "https://github.com/MohammadrezaAmani/INUI/"
REQUIRED_PACKAGES = []
PROJECT_KEYWORDS = ["ui", "python", "html", "framework", "frontend", "bootstrap"]

CLASSIFIERS = [
"Development Status :: 1 - Planning",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3",
"Operating System :: Unix",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows",
]
setup(
name=PACKAGE_NAME,
version=VERSION,
author=AUTHOR_NAME,
author_email=AUTHOR_EMAIL,
description=DESCRIPTION,
url=PROJECT_URL,
long_description_content_type="text/markdown",
long_description=long_description,
packages=find_packages(),
install_requires=REQUIRED_PACKAGES,
keywords=PROJECT_KEYWORDS,
classifiers=CLASSIFIERS,
entry_points={
"console_scripts": [
"inui=inui.hotreload:main",
],
},
)

0 comments on commit 48e006e

Please sign in to comment.