diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 1bd42de..94797cb 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -16,12 +16,12 @@ jobs: strategy: matrix: - python-version: [3.7, 3.8, 3.9, "3.10", 3.11] + python-version: [3.8, 3.9, "3.10", 3.11] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - name: Install dependencies diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index 3bd2eb8..fec1972 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -13,19 +13,19 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: '3.x' - name: Install dependencies run: | python -m pip install --upgrade pip - pip install setuptools wheel twine + pip install setuptools wheel twine build - name: Build and publish env: TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} run: | - python setup.py sdist bdist_wheel + python -m build twine upload dist/* \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..57e20bf --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,45 @@ +[project] +name = "applecatalog" +version = "2.0.0" +description = "AppleCatalog download agent" +readme = "README.md" +requires-python = ">=3.8" +license = { file = "LICENSE" } +keywords = ["apple", "download", "automations", "updates"] +authors = [ + { name = "doronz88", email = "doron88@gmail.com" } +] +maintainers = [ + { name = "doronz88", email = "doron88@gmail.com" } +] +classifiers = [ + "Development Status :: 5 - Production/Stable", + "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3 :: Only", +] +dynamic = ["dependencies"] + +[project.optional-dependencies] +test = ["pytest"] + +[project.urls] +"Homepage" = "https://github.com/doronz88/applecatalog" +"Bug Reports" = "https://github.com/doronz88/applecatalog/issues" + +[project.scripts] +applecatalog = "applecatalog.__main__:cli" + +[tool.setuptools.packages.find] +exclude = ["docs*", "tests*"] + +[tool.setuptools.dynamic] +dependencies = { file = ["requirements.txt"] } + +[build-system] +requires = ["setuptools>=43.0.0", "wheel"] +build-backend = "setuptools.build_meta" diff --git a/setup.py b/setup.py deleted file mode 100644 index 3195005..0000000 --- a/setup.py +++ /dev/null @@ -1,53 +0,0 @@ -import os - -from setuptools import find_packages, setup - -BASE_DIR = os.path.realpath(os.path.dirname(__file__)) -VERSION = '2.0.0' - - -def parse_requirements(): - reqs = [] - if os.path.isfile(os.path.join(BASE_DIR, 'requirements.txt')): - with open(os.path.join(BASE_DIR, 'requirements.txt'), 'r') as fd: - for line in fd.readlines(): - line = line.strip() - if line: - reqs.append(line) - return reqs - - -def get_description(): - with open(os.path.join(BASE_DIR, 'README.md'), 'r') as fh: - return fh.read() - - -if __name__ == '__main__': - setup( - version=VERSION, - name='applecatalog', - description='AppleCatalog download agent', - long_description=get_description(), - long_description_content_type='text/markdown', - cmdclass={}, - packages=find_packages(), - package_data={'': ['*.txt', '*.TXT'], }, - data_files=[('.', ['requirements.txt'])], - author='DoronZ', - install_requires=parse_requirements(), - entry_points={ - 'console_scripts': ['applecatalog=applecatalog.__main__:cli', - ], - }, - classifiers=[ - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'Programming Language :: Python :: 3.11', - ], - url='https://github.com/doronz88/applecatalog', - project_urls={ - 'applecatalog': 'https://github.com/doronz88/applecatalog' - }, - )