From dfaafe6b36fced7011d46dc644ee7208bebbe90e Mon Sep 17 00:00:00 2001 From: piEsposito Date: Tue, 4 Jun 2024 14:23:43 -0300 Subject: [PATCH] use poetry --- .github/workflows/pythonpublish.yml | 4 ++-- pyproject.toml | 18 ++++++++++++++++++ setup.py | 27 --------------------------- 3 files changed, 20 insertions(+), 29 deletions(-) create mode 100644 pyproject.toml delete mode 100644 setup.py diff --git a/.github/workflows/pythonpublish.yml b/.github/workflows/pythonpublish.yml index aafdb82..a681962 100644 --- a/.github/workflows/pythonpublish.yml +++ b/.github/workflows/pythonpublish.yml @@ -28,10 +28,10 @@ jobs: python-version: '3.x' - name: Install dependencies run: | - python -m pip install --upgrade pip + python -m pip install --upgrade pip poetry pip install setuptools wheel twine - name: Build run: | - python setup.py sdist bdist_wheel + poetry build - name: Publish package distributions to PyPI uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..01e83e8 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,18 @@ +[tool.poetry] +name = "tiny-ai-client" +version = "0.0.3" +description = "Tiny AI client for LLMs. As simple as it gets." +authors = ["piEsposito "] +license = "Apache 2.0" +readme = "README.md" + +[tool.poetry.dependencies] +python = ">=3.10" +pydantic = "2.7.3" +openai = "1.31.0" +anthropic = "0.28.0" + + +[build-system] +requires = ["poetry-core"] +build-backend = "poetry.core.masonry.api" diff --git a/setup.py b/setup.py deleted file mode 100644 index af9da2b..0000000 --- a/setup.py +++ /dev/null @@ -1,27 +0,0 @@ -from os import path - -from setuptools import find_packages, setup - -this_directory = path.abspath(path.dirname(__file__)) -with open(path.join(this_directory, "README.md"), encoding="utf-8") as f: - long_desc = f.read() - -with open(path.join(this_directory, "requirements.txt"), encoding="utf-8") as f: - install_requires = f.read() - -setup( - name="tiny-ai-client", - packages=find_packages(), - version="0.0.2", - description="Tiny AI client for LLMs. As simple as it gets.", - author="Pi Esposito", - url="https://github.com/piEsposito/tiny_ai_client", - long_description=long_desc, - long_description_content_type="text/markdown", - install_requires=install_requires, - classifiers=[ - "Development Status :: 3 - Alpha", - "Intended Audience :: Developers", - "Programming Language :: Python :: 3.11", - ], -)