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

Migrate to pyproject.toml #250

Merged
merged 2 commits into from
Dec 10, 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
2 changes: 1 addition & 1 deletion .github/workflows/force-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:

- name: Build source distribution
run: |
python3 setup.py sdist bdist_wheel
python3 -m build
twine check dist/*

- name: Publish distribution to Test PyPI
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:

- name: Build source distribution
run: |
python3 setup.py sdist bdist_wheel
python3 -m build
twine check dist/*

- name: Publish distribution to Test PyPI
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ You may also replace `conda` by `mamba`, which is basically a drop-in replacemen

panflute 1.12 or above dropped support of Python 2. When using Python 3, depending on your setup, you may need to use `pip3`/`python3` explicitly. If you need to use panflute in Python 2, install panflute 1.11.x or below.

Currently supported Python versions: [![Python version](https://img.shields.io/pypi/pyversions/panflute.svg)](https://pypi.python.org/pypi/panflute/). Check `setup.py` for details, which further indicates support of pypy on top of CPython.
Currently supported Python versions: [![Python version](https://img.shields.io/pypi/pyversions/panflute.svg)](https://pypi.python.org/pypi/panflute/). Check `pyproject.toml` for details, which further indicates support of pypy on top of CPython.

#### Supported pandoc versions

Expand All @@ -74,8 +74,8 @@ Note: pandoc 2.10 is short lived and 2.11 has minor API changes comparing to tha

After cloning the repo and opening the panflute folder, run

- `python setup.py install` to install the package locally
- `python setup.py develop` to install locally with a symlink so changes are automatically updated
- `python install .` to install the package locally
paddatrapper marked this conversation as resolved.
Show resolved Hide resolved
- `python install -e .` to install locally with a symlink so changes are automatically updated

## Contributing

Expand Down
68 changes: 68 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"

[tool.setuptools]
packages = ["panflute"]

[project]
name = "panflute"
dynamic = ["version"]
description = "Pythonic Pandoc filters"
readme = "README.md"
authors = [{name = "Sergio Correia", email = "[email protected]"}]
license = {text = "BDS3"}
requires-python = ">=3.7"
keywords = ["pandoc", "pandocfilters", "markdown", "latex"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Intended Audience :: End Users/Desktop",
"Intended Audience :: Developers",
"Topic :: Software Development :: Build Tools",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Topic :: Text Processing :: Filters",
"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 :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy"
]
dependencies = [
"click>=6,<9",
"pyyaml>=3,<7"
]

[project.urls]
homepage = "https://github.com/sergiocorreia/panflute"

[project.optional-dependencies]
dev = [
"configparser",
"coverage",
"flake8",
"pandocfilters",
"pytest-cov",
"pytest",
"requests"
]
pypi = [
"build",
"docutils",
"Pygments",
"twine",
"wheel"
]
extras = [
"yamlloader>=1,<2"
]

[project.scripts]
panflute = "panflute:main"
panfl = "panflute:panfl"

[tool.setuptools.dynamic]
version = {attr = "panflute.version.__version__"}
146 changes: 0 additions & 146 deletions setup.py

This file was deleted.