mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-29 00:35:00 +00:00
migrate to pyproject.toml
This commit is contained in:
parent
d4ae735d43
commit
aa6a538992
5 changed files with 61 additions and 76 deletions
4
.github/workflows/release.yml
vendored
4
.github/workflows/release.yml
vendored
|
@ -21,12 +21,12 @@ jobs:
|
|||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install setuptools wheel twine importlib-metadata==7.2.1
|
||||
pip install build setuptools wheel twine importlib-metadata==7.2.1
|
||||
|
||||
- name: Build and publish
|
||||
env:
|
||||
TWINE_USERNAME: __token__
|
||||
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
|
||||
run: |
|
||||
python setup.py sdist bdist_wheel
|
||||
python -m build
|
||||
twine upload dist/*
|
||||
|
|
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -5,6 +5,7 @@ aider.code-workspace
|
|||
.aider*
|
||||
aider_chat.egg-info/
|
||||
build
|
||||
dist/
|
||||
Gemfile.lock
|
||||
_site
|
||||
.jekyll-cache/
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
include requirements.txt
|
58
pyproject.toml
Normal file
58
pyproject.toml
Normal file
|
@ -0,0 +1,58 @@
|
|||
[project]
|
||||
name = "aider-chat"
|
||||
description = "Aider is AI pair programming in your terminal"
|
||||
readme = "README.md"
|
||||
classifiers = [
|
||||
"Development Status :: 4 - Beta",
|
||||
"Environment :: Console",
|
||||
"Intended Audience :: Developers",
|
||||
"License :: OSI Approved :: Apache Software License",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
"Programming Language :: Python :: 3.12",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python",
|
||||
"Topic :: Software Development",
|
||||
]
|
||||
requires-python = ">=3.9,<3.13"
|
||||
dynamic = ["dependencies", "optional-dependencies", "version"]
|
||||
|
||||
[project.urls]
|
||||
Homepage = "https://github.com/paul-gauthier/aider"
|
||||
|
||||
[project.scripts]
|
||||
aider = "aider.main:main"
|
||||
|
||||
[tool.setuptools.dynamic]
|
||||
version = { attr = "aider.__init__.__version__" }
|
||||
dependencies = { file = "requirements.txt" }
|
||||
|
||||
[tool.setuptools.dynamic.optional-dependencies]
|
||||
dev = { file = "requirements/requirements-dev.txt" }
|
||||
help = { file = "requirements/requirements-help.txt" }
|
||||
browser = { file = "requirements/requirements-browser.txt" }
|
||||
playwright = { file = "requirements/requirements-playwright.txt" }
|
||||
|
||||
[tool.setuptools.packages.find]
|
||||
include = ["aider*", "aider.website"]
|
||||
|
||||
[tool.setuptools.package-data]
|
||||
"aider" = ["queries/*.scm"]
|
||||
"aider.website" = ["**/*.md"]
|
||||
|
||||
[tool.setuptools.exclude-package-data]
|
||||
"aider.website" = [
|
||||
"examples/**",
|
||||
"_posts/**",
|
||||
"HISTORY.md",
|
||||
"docs/benchmarks*md",
|
||||
"docs/ctags.md",
|
||||
"docs/unified-diffs.md",
|
||||
"docs/leaderboards/index.md",
|
||||
"assets/**",
|
||||
]
|
||||
|
||||
[build-system]
|
||||
requires = ["setuptools>=68"]
|
||||
build-backend = "setuptools.build_meta"
|
73
setup.py
73
setup.py
|
@ -1,73 +0,0 @@
|
|||
import re
|
||||
from pathlib import Path
|
||||
|
||||
from setuptools import find_packages, setup
|
||||
|
||||
from aider import __version__
|
||||
from aider.help_pats import exclude_website_pats
|
||||
|
||||
|
||||
def get_requirements(suffix=""):
|
||||
if suffix:
|
||||
fname = "requirements-" + suffix + ".txt"
|
||||
fname = Path("requirements") / fname
|
||||
else:
|
||||
fname = Path("requirements.txt")
|
||||
|
||||
requirements = fname.read_text().splitlines()
|
||||
|
||||
return requirements
|
||||
|
||||
|
||||
requirements = get_requirements()
|
||||
|
||||
# README
|
||||
with open("README.md", "r", encoding="utf-8") as f:
|
||||
long_description = f.read()
|
||||
long_description = re.sub(r"\n!\[.*\]\(.*\)", "", long_description)
|
||||
# long_description = re.sub(r"\n- \[.*\]\(.*\)", "", long_description)
|
||||
|
||||
# Discover packages, plus the website
|
||||
packages = find_packages(exclude=["benchmark", "tests"])
|
||||
packages += ["aider.website"]
|
||||
|
||||
print("Packages:", packages)
|
||||
|
||||
extras = "dev help browser playwright".split()
|
||||
|
||||
setup(
|
||||
name="aider-chat",
|
||||
version=__version__,
|
||||
packages=packages,
|
||||
include_package_data=True,
|
||||
package_data={
|
||||
"aider": ["queries/*.scm"],
|
||||
"aider.website": ["**/*.md"],
|
||||
},
|
||||
exclude_package_data={"aider.website": exclude_website_pats},
|
||||
install_requires=requirements,
|
||||
extras_require={extra: get_requirements(extra) for extra in extras},
|
||||
python_requires=">=3.9,<3.13",
|
||||
entry_points={
|
||||
"console_scripts": [
|
||||
"aider = aider.main:main",
|
||||
],
|
||||
},
|
||||
description="Aider is AI pair programming in your terminal",
|
||||
long_description=long_description,
|
||||
long_description_content_type="text/markdown",
|
||||
url="https://github.com/paul-gauthier/aider",
|
||||
classifiers=[
|
||||
"Development Status :: 4 - Beta",
|
||||
"Environment :: Console",
|
||||
"Intended Audience :: Developers",
|
||||
"License :: OSI Approved :: Apache Software License",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
"Programming Language :: Python :: 3.12",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python",
|
||||
"Topic :: Software Development",
|
||||
],
|
||||
)
|
Loading…
Add table
Add a link
Reference in a new issue