Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Finish migration to pyproject.toml #37

Merged
merged 2 commits into from
Apr 17, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 dev-dependencies
run: python -m pip install -e .[dev]
- name: Test with pytest
run: |
python -m pip install pytest pytest-cov
pytest

deploy:
Expand All @@ -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 -e .[dev]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The general concept behind this makes sense and is an improvement in the test job, but for deployment I think it's better to install autopub[github] directly via the deploy job because these packages are only useful in the CI environment — there is no reason for individual developers to have these packages installed on their respective workstations.

echo "release=$(autopub check)" >> $GITHUB_OUTPUT

- name: Publish
Expand Down
66 changes: 60 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,60 @@
[tool.poetry]
[build-system]
requires = ["setuptools>=64.0"]
build-backend = "setuptools.build_meta"

[project]
name = "feedgenerator"
version = "2.1.0"
authors = [
{name="Pelican Dev Team", email="[email protected]"},
]
description = "Standalone version of django.utils.feedgenerator"
authors = ["Pelican Dev Team <[email protected]>"]
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',
'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]
'Source' = "https://github.com/getpelican/feedgenerator"

[tool.setuptools]
packages = [
"feedgenerator",
"feedgenerator.django",
"feedgenerator.django.utils",
]

[project.optional-dependencies]
dev = [
"pytest",
"pytest-cov",
"githubrelease",
"httpx==0.18.2",
"autopub",
"twine",
"wheel",
]


[tool.autopub]
project-name = "feedgenerator"
Expand All @@ -14,5 +63,10 @@ git-email = "[email protected]"
version-strings = ["setup.py"]
build-system = "setuptools"

[build-system]
requires = ["setuptools >= 40.6.0"]
[tool.pytest.ini_options]
addopts = """
--cov=feedgenerator
--cov=tests
--cov-report=html
--cov-report=term-missing:skip-covered
"""
9 changes: 0 additions & 9 deletions setup.cfg

This file was deleted.

62 changes: 0 additions & 62 deletions setup.py

This file was deleted.