diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6e548a2..5996e87 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -21,11 +21,10 @@ jobs: python-version: ${{ matrix.python-version }} - name: Upgrade Pip run: python -m pip install -U pip - - name: Install package and dependencies - run: python -m pip install -e . + - name: Install package and development dependencies + run: python -m pip install -e .[dev] - name: Test with pytest run: | - python -m pip install pytest pytest-cov pytest deploy: @@ -46,7 +45,7 @@ jobs: - name: Check release id: check_release run: | - python -m pip install poetry githubrelease httpx==0.18.2 autopub twine wheel + python -m pip install autopub[github] echo "release=$(autopub check)" >> $GITHUB_OUTPUT - name: Publish diff --git a/pyproject.toml b/pyproject.toml index 4243984..330a999 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,18 +1,68 @@ -[tool.poetry] +[project] name = "feedgenerator" version = "2.1.0" +authors = [ + {name="Pelican Dev Team", email="authors@getpelican.com"}, +] description = "Standalone version of django.utils.feedgenerator" -authors = ["Pelican Dev Team "] -readme = "README.rst" -license = "BSD-3-Clause" keywords = ["feed", "atom", "rss"] +readme = "README.rst" +license = { file="LICENSE" } +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Environment :: Web Environment", + "Framework :: Pelican", + "Intended Audience :: Developers", + "License :: OSI Approved :: BSD License", + "Operating System :: OS Independent", + "Programming Language :: Python", + "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", + "Programming Language :: Python :: 3.12", + "Topic :: Internet :: WWW/HTTP", + "Topic :: Internet :: WWW/HTTP :: Dynamic Content", + "Topic :: Software Development :: Libraries :: Python Modules", +] +requires-python = ">=3.7" +dependencies = [ + "pytz>=0a", +] + +[project.urls] +Homepage = "https://github.com/getpelican/feedgenerator" +"Issue Tracker" = "https://github.com/getpelican/feedgenerator/issues" +Funding = "https://donate.getpelican.com/" + +[project.optional-dependencies] +dev = [ + "pytest", + "pytest-cov", +] [tool.autopub] -project-name = "feedgenerator" +project-name = "FeedGenerator" git-username = "botpub" git-email = "52496925+botpub@users.noreply.github.com" -version-strings = ["setup.py"] build-system = "setuptools" +[tool.pytest.ini_options] +addopts = """ + --cov=feedgenerator + --cov=tests + --cov-report=html + --cov-report=term-missing:skip-covered +""" + +[tool.setuptools] +packages = [ + "feedgenerator", + "feedgenerator.django", + "feedgenerator.django.utils", +] + [build-system] -requires = ["setuptools >= 40.6.0"] +requires = ["setuptools>=64.0"] +build-backend = "setuptools.build_meta" diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 6836e34..0000000 --- a/setup.cfg +++ /dev/null @@ -1,9 +0,0 @@ -[sdist] -force_manifest = 1 - -[tool:pytest] -addopts = - --cov=feedgenerator - --cov=tests - --cov-report=html - --cov-report=term-missing:skip-covered diff --git a/setup.py b/setup.py deleted file mode 100644 index c582f50..0000000 --- a/setup.py +++ /dev/null @@ -1,62 +0,0 @@ -#!/usr/bin/env python - - -# Using setuptools rather than distutils to get the `develop` command -from setuptools import setup - - -NAME = 'feedgenerator' -PACKAGES = ['feedgenerator', 'feedgenerator.django', - 'feedgenerator.django.utils'] -DESCRIPTION = 'Standalone version of django.utils.feedgenerator' -LONG_DESCRIPTION = open('README.rst', encoding='UTF-8').read() - -URL = "https://github.com/getpelican/feedgenerator" - -CLASSIFIERS = ['Development Status :: 5 - Production/Stable', - 'Environment :: Web Environment', - 'Framework :: Pelican', - 'Intended Audience :: Developers', - 'License :: OSI Approved :: BSD License', - 'Operating System :: OS Independent', - 'Programming Language :: Python', - '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', - 'Topic :: Internet :: WWW/HTTP', - 'Topic :: Internet :: WWW/HTTP :: Dynamic Content', - 'Topic :: Software Development :: Libraries :: Python Modules', - ] - -AUTHOR = 'Django Software Foundation' -AUTHOR_EMAIL = 'foundation@djangoproject.com' -MAINTAINER = 'Pelican Dev Team' -MAINTAINER_EMAIL = 'authors@getpelican.com' -KEYWORDS = "feed atom rss".split(' ') -VERSION = '2.1.0' - -TEST_SUITE = 'tests' - -REQUIRES = ['pytz >= 0a'] - -setup( - name=NAME, - version=VERSION, - packages=PACKAGES, - test_suite=TEST_SUITE, - install_requires=REQUIRES, - python_requires='>=3.7', - # metadata for upload to PyPI - author=AUTHOR, - author_email=AUTHOR_EMAIL, - maintainer=MAINTAINER, - maintainer_email=MAINTAINER_EMAIL, - description=DESCRIPTION, - long_description=LONG_DESCRIPTION, - keywords=KEYWORDS, - url=URL, - classifiers=CLASSIFIERS, - zip_safe=False, -)