From db605880a3b91842e8f714605d8a62eb9de7201f Mon Sep 17 00:00:00 2001 From: CoolPlayLin Date: Fri, 10 Mar 2023 20:47:01 +0800 Subject: [PATCH 1/2] Improve setup.py --- .github/workflows/PyPi.yml | 2 +- requirements.txt | 3 +++ setup.py | 12 ++++++++++++ src/__init__.py | 1 + 4 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 requirements.txt diff --git a/.github/workflows/PyPi.yml b/.github/workflows/PyPi.yml index 89650e195..99519077e 100644 --- a/.github/workflows/PyPi.yml +++ b/.github/workflows/PyPi.yml @@ -29,7 +29,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install build + python -m pip install build - name: Build package run: python -m build - name: Publish package diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 000000000..f6d682795 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,3 @@ +asyncio +requests +websockets \ No newline at end of file diff --git a/setup.py b/setup.py index e0354181c..1534f64bf 100644 --- a/setup.py +++ b/setup.py @@ -11,8 +11,20 @@ packages=find_packages("src"), package_dir={"": "src"}, url="https://github.com/acheong08/EdgeGPT", + project_urls={ + "Bug Report": "https://github.com/acheong08/EdgeGPT/issues/new" + }, install_requires=["asyncio", "requests", "websockets"], long_description=open("README.md", encoding="utf-8").read(), long_description_content_type="text/markdown", py_modules=["EdgeGPT"], + classifiers=[ + "License :: OSI Approved :: GNU General Public License v2 (GPLv2)", + "Intended Audience :: Developers", + "Topic :: Software Development :: Libraries :: Python Modules", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + ] ) diff --git a/src/__init__.py b/src/__init__.py index e69de29bb..b9742821a 100644 --- a/src/__init__.py +++ b/src/__init__.py @@ -0,0 +1 @@ +from . import * \ No newline at end of file From ac93716179a846bcc87fc7a606e9598120005881 Mon Sep 17 00:00:00 2001 From: CoolPlayLin Date: Fri, 10 Mar 2023 20:54:20 +0800 Subject: [PATCH 2/2] Add PyPi package build checking while pull request --- .github/workflows/PyPiChecking.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/PyPiChecking.yml diff --git a/.github/workflows/PyPiChecking.yml b/.github/workflows/PyPiChecking.yml new file mode 100644 index 000000000..e0cd0a5cb --- /dev/null +++ b/.github/workflows/PyPiChecking.yml @@ -0,0 +1,24 @@ +name: PyPi Build Checking + +on: + [pull_request] + +permissions: + contents: read + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + name: Checkout + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.x' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install build + - name: Build package + run: python -m build \ No newline at end of file