mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-01 18:25:00 +00:00
aider: Added __version__ variable to aider/__init__.py and imported it in setup.py.
# Context: USER: is it safe/sensible to put __version__ into `aider/__init__.py` and have setup.py import that to learn the version? ASSISTANT: Yes, it is safe and sensible to put the `__version__` variable in `aider/__init__.py` and have `setup.py` import it to learn the version. This is a common practice in Python projects to maintain a single source of truth for the package version. Here's how you can modify the `aider/__init__.py` and `setup.py` files: ```python aider/__init__.py <<<<<<< ORIGINAL ======= __version__ = "0.6.2" >>>>>>> UPDATED ``` ```python setup.py <<<<<<< ORIGINAL import re 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) setup( name="aider-chat", version="0.6.2", ======= from aider import __version__ 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) setup( name="aider-chat", version=__version__, >>>>>>> UPDATED ``` This way, you can maintain the version in `aider/__init__.py` and `setup.py` will always use the correct version.
This commit is contained in:
parent
373b2e3b35
commit
79f6be2163
2 changed files with 3 additions and 2 deletions
|
@ -0,0 +1 @@
|
|||
__version__ = "0.6.2"
|
Loading…
Add table
Add a link
Reference in a new issue