diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index b3d7b7a127..5574eea2df 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -47,7 +47,7 @@ jobs: shell: pwsh run: | pip install twine - python setup.py sdist bdist_wheel --name "autogen" + python setup_autogen.py sdist bdist_wheel - name: Publish autogen to PyPI env: TWINE_USERNAME: ${{ secrets.AUTOGEN_PYPI_USERNAME }} @@ -58,7 +58,7 @@ jobs: shell: pwsh run: | pip install twine - python setup.py sdist bdist_wheel --name "ag2" + python setup_ag2.py sdist bdist_wheel - name: Publish ag2 to PyPI env: TWINE_USERNAME: ${{ secrets.AUTOGEN_PYPI_USERNAME }} @@ -68,7 +68,7 @@ jobs: - name: Build pyautogen shell: pwsh run: | - python setup.py sdist bdist_wheel --name "pyautogen" + python setup.py sdist bdist_wheel - name: Publish pyautogen to PyPI env: TWINE_USERNAME: ${{ secrets.PYAUTOGEN_PYPI_USERNAME }} diff --git a/README.md b/README.md index 3dbb061510..d39ecbe6a5 100644 --- a/README.md +++ b/README.md @@ -25,19 +25,11 @@ > We invite collaborators from all organizations and individuals to join the development. -:fire: :tada: AG2 is available via `ag2` (or its alias `autogen` or `pyautogen`) on PyPI! Starting with version 0.3.2, you can now install AG2 using: -``` -pip install ag2 -``` -or +:fire: :tada: AG2 is available via `pyautogen` (or its alias `autogen` or `ag2`) on PyPI! + ``` pip install pyautogen ``` -or -``` -pip install autogen -``` - 📄 **License:** We adopt the Apache 2.0 license from v0.3. This enhances our commitment to open-source collaboration while providing additional protections for contributors and users alike. diff --git a/setup.py b/setup.py index 79336ab8a5..d8b1446932 100644 --- a/setup.py +++ b/setup.py @@ -113,17 +113,8 @@ "bedrock": ["boto3>=1.34.149"], } - -if "--name" in sys.argv: - index = sys.argv.index("--name") - sys.argv.pop(index) # Removes --name - package_name = sys.argv.pop(index) # Removes the value after --name -else: - package_name = "ag2" - - setuptools.setup( - name=package_name, + name="pyautogen", version=__version__, author="Chi Wang & Qingyun Wu", author_email="support@ag2.ai", diff --git a/setup_ag2.py b/setup_ag2.py new file mode 100644 index 0000000000..209ec33488 --- /dev/null +++ b/setup_ag2.py @@ -0,0 +1,35 @@ +# Copyright (c) 2023 - 2024, Owners of https://github.com/ag2ai +# +# SPDX-License-Identifier: Apache-2.0 + +import os + +import setuptools + +here = os.path.abspath(os.path.dirname(__file__)) + +with open("README.md", "r", encoding="UTF-8") as fh: + long_description = fh.read() + +# Get the code version +version = {} +with open(os.path.join(here, "autogen/version.py")) as fp: + exec(fp.read(), version) +__version__ = version["__version__"] + +setuptools.setup( + name="ag2", + version=__version__, + description="Alias package for pyautogen", + install_requires=["pyautogen==" + __version__], + url="https://github.com/ag2ai/ag2", + author="Chi Wang & Qingyun Wu", + author_email="support@ag2.ai", + classifiers=[ + "Programming Language :: Python :: 3", + "License :: OSI Approved :: Apache Software License", + "Operating System :: OS Independent", + ], + license="Apache Software License 2.0", + python_requires=">=3.8,<3.14", +) diff --git a/setup_autogen.py b/setup_autogen.py new file mode 100644 index 0000000000..67925bf5ca --- /dev/null +++ b/setup_autogen.py @@ -0,0 +1,35 @@ +# Copyright (c) 2023 - 2024, Owners of https://github.com/ag2ai +# +# SPDX-License-Identifier: Apache-2.0 + +import os + +import setuptools + +here = os.path.abspath(os.path.dirname(__file__)) + +with open("README.md", "r", encoding="UTF-8") as fh: + long_description = fh.read() + +# Get the code version +version = {} +with open(os.path.join(here, "autogen/version.py")) as fp: + exec(fp.read(), version) +__version__ = version["__version__"] + +setuptools.setup( + name="autogen", + version=__version__, + description="Alias package for pyautogen", + install_requires=["pyautogen==" + __version__], + url="https://github.com/ag2ai/ag2", + author="Chi Wang & Qingyun Wu", + author_email="support@ag2.ai", + classifiers=[ + "Programming Language :: Python :: 3", + "License :: OSI Approved :: Apache Software License", + "Operating System :: OS Independent", + ], + license="Apache Software License 2.0", + python_requires=">=3.8,<3.14", +)