|
1 | 1 | [build-system] |
2 | | -requires = ["setuptools >= 64"] |
| 2 | +# Use 'hatchling' or 'setuptools' for the build backend. |
| 3 | +# We'll stick with setuptools as you had it, but define the metadata in pyproject.toml |
| 4 | +# You could easily switch to hatchling or flit here. |
| 5 | +requires = ["setuptools>=64.0.0", "setuptools_scm>=8"] # setuptools_scm is good practice for versioning |
3 | 6 | build-backend = "setuptools.build_meta" |
4 | 7 |
|
| 8 | +[project] |
| 9 | +name = "llms-wrapper" |
| 10 | +version = "0.0.0" # This will be managed by setuptools_scm or your existing version.py |
| 11 | +description = "Package for simple usage of diverse LLMs and configuring them using human readable config files" |
| 12 | +readme = "README.md" |
| 13 | +authors = [ |
| 14 | + { name = "Johann Petrak", email = "johann.petrak@gmail.com" }, |
| 15 | +] |
| 16 | +license = { text = "Apache Software License" } |
| 17 | +requires-python = ">=3.11" |
| 18 | +# The 'dependencies' section lists your core requirements (REQUIREMENTS_DEFAULT) |
| 19 | +# The full list of dependencies is moved to requirements.txt (see section 2) for better uv integration |
| 20 | +# However, for an installable package, this must be defined here for pip/uv install -e . |
| 21 | +dependencies = [ |
| 22 | + "litellm", |
| 23 | + "tenacity", |
| 24 | + "hjson", |
| 25 | + "loguru", |
| 26 | + "docstring_parser", |
| 27 | +] |
| 28 | + |
| 29 | +# This is where your optional dependency groups (extras_require) are defined. |
| 30 | +[project.optional-dependencies] |
| 31 | +# Note: You can keep 'all' if you want, but it's often better to let users combine the groups. |
| 32 | +dev = [ |
| 33 | + "pdoc3", |
| 34 | + "pytest", |
| 35 | + "pytest-cov", |
| 36 | + "ipython", |
| 37 | + "jupyter", |
| 38 | + "jupyterlab", |
| 39 | + "ipykernel", |
| 40 | + "notebook", |
| 41 | +] |
| 42 | +webchat = [ |
| 43 | + "pyperclip", |
| 44 | + "python-fasthtml", |
| 45 | +] |
| 46 | +phoenix = [ |
| 47 | + "openinference-instrumentation-litellm", |
| 48 | + "arize-phoenix-otel", |
| 49 | +] |
| 50 | +all = [ |
| 51 | + # Include all other optional dependencies here, similar to your setup.py |
| 52 | + "llms-wrapper[dev,webchat,phoenix]", |
| 53 | +] |
| 54 | + |
| 55 | +[project.urls] |
| 56 | +# Documentation = "" # Uncomment and fill if needed |
| 57 | +# Source = "" # Uncomment and fill if needed |
| 58 | + |
| 59 | +[project.scripts] |
| 60 | +# entry_points={"console_scripts": [...] } is moved here |
| 61 | +llms_wrapper_test = "llms_wrapper.llms_wrapper_test:main" |
| 62 | +llms_wrapper_llminfo = "llms_wrapper.llms_wrapper_llminfo:main" |
| 63 | +llms_wrapper_webchat = "llms_wrapper.llms_wrapper_webchat:main" |
| 64 | + |
| 65 | +[project.classifiers] |
| 66 | +# Classifiers from setup.py |
| 67 | +dynamic = ["classifiers"] |
| 68 | +# Use dynamic if you want to pull from setuptools_scm or other plugins |
| 69 | +# Otherwise, manually list: |
| 70 | +# classifiers = [ |
| 71 | +# "Development Status :: 4 - Beta", |
| 72 | +# "License :: OSI Approved :: Apache Software License", |
| 73 | +# "Programming Language :: Python :: 3.11", |
| 74 | +# # ... other classifiers |
| 75 | +# ] |
| 76 | + |
| 77 | + |
| 78 | +# Tool-specific configuration sections |
| 79 | +# --- |
| 80 | +[tool.setuptools] |
| 81 | +# Instead of `packages=find_packages()`, you use `packages = ["llms_wrapper"]` |
| 82 | +# or configure setuptools to find them |
| 83 | +packages = ["llms_wrapper"] |
| 84 | + |
| 85 | +# [tool.setuptools.dynamic] |
| 86 | +# version = {attr = "llms_wrapper.version.__version__"} |
| 87 | +# Use this if you want to read version from version.py as you did before |
| 88 | +# Alternatively, use setuptools_scm for Git-based versioning (recommended). |
| 89 | + |
| 90 | +[tool.pytest.ini_options] |
| 91 | +# Configuration from setup.cfg |
| 92 | +log_cli = true |
| 93 | +log_cli_level = "WARN" |
| 94 | +addopts = "-r A" |
| 95 | +norecursedirs = [ |
| 96 | + "dist", |
| 97 | + "build", |
| 98 | + "docs", |
| 99 | + "examples", |
| 100 | +] |
0 commit comments