From 4a070c29fbedd10f3925675f46371ef4e8648750 Mon Sep 17 00:00:00 2001 From: Llewellyn van der Merwe Date: Tue, 14 Nov 2023 11:01:09 +0200 Subject: [PATCH] Adds better build path. --- .github/workflows/deploy-gitea-package.yml | 12 +++++------- pyproject.toml | 3 +++ requirements.txt | 3 +-- setup.py | 8 +++++--- 4 files changed, 14 insertions(+), 12 deletions(-) create mode 100644 pyproject.toml diff --git a/.github/workflows/deploy-gitea-package.yml b/.github/workflows/deploy-gitea-package.yml index 991c7f1..4039118 100644 --- a/.github/workflows/deploy-gitea-package.yml +++ b/.github/workflows/deploy-gitea-package.yml @@ -46,15 +46,13 @@ jobs: with: python-version: '3.10' - - name: Install Twine - run: python -m pip install twine - - - name: Install Wheel - run: python -m pip install wheel + - name: Install build dependencies + run: | + python -m pip install --upgrade build twine wheel - name: Build Package run: | - python setup.py sdist bdist_wheel + python -m build - name: Configure .pypirc run: | @@ -66,4 +64,4 @@ jobs: echo "password = ${{ secrets.GITEA_TOKEN }}" >> ~/.pypirc - name: Push to Gitea - run: python3 -m twine upload --repository getbible dist/* \ No newline at end of file + run: python3 -m twine upload --repository getbible dist/* diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..71d100e --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["setuptools>=65.5.1", "wheel"] +build-backend = "setuptools.build_meta" \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 941d8e7..0227f3c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1 @@ -requests~=2.31.0 -setuptools>=65.5.1 \ No newline at end of file +requests~=2.31.0 \ No newline at end of file diff --git a/setup.py b/setup.py index f8c0daf..9a6b85a 100644 --- a/setup.py +++ b/setup.py @@ -1,12 +1,15 @@ from setuptools import setup, find_packages +with open('README.md', 'r', encoding='utf-8') as f: + long_description = f.read() + setup( name="getBible-librarian", version="0.2.1", author="Llewellyn van der Merwe", author_email="getbible@vdm.io", description="A Python package to retrieving Bible references with ease.", - long_description=open('README.md').read(), + long_description=long_description, long_description_content_type='text/markdown', url="https://git.vdm.dev/getBible/librarian", package_dir={"": "src"}, @@ -14,8 +17,7 @@ package_data={"getbible": ["data/*.json"]}, include_package_data=True, install_requires=[ - "requests~=2.31.0", - "setuptools>=65.5.1" + "requests~=2.31.0" ], classifiers=[ "Programming Language :: Python :: 3",