Skip to content

Commit

Permalink
Merge pull request #250 from paddatrapper/feature/pyproject
Browse files Browse the repository at this point in the history
Migrate to pyproject.toml
  • Loading branch information
sergiocorreia authored Dec 10, 2024
2 parents 25c3924 + 242f2bd commit 15deed5
Show file tree
Hide file tree
Showing 5 changed files with 73 additions and 151 deletions.
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 -m pip install .` to install the package locally
- `python -m pip 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.

0 comments on commit 15deed5

Please sign in to comment.