Skip to content

Commit

Permalink
🔧 MAINTAIN: Switch to declarative metadata (#139)
Browse files Browse the repository at this point in the history
  • Loading branch information
hukkinj1 committed Apr 1, 2021
1 parent 36c386d commit b1a74b4
Show file tree
Hide file tree
Showing 6 changed files with 98 additions and 84 deletions.
3 changes: 0 additions & 3 deletions .flake8

This file was deleted.

9 changes: 0 additions & 9 deletions .mypy.ini

This file was deleted.

5 changes: 5 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,8 @@ repos:
hooks:
- id: mypy
additional_dependencies: [attrs]

- repo: https://github.com/asottile/setup-cfg-fmt
rev: v1.16.0
hooks:
- id: setup-cfg-fmt
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["setuptools>=46.4.0", "wheel"]
build-backend = "setuptools.build_meta"
85 changes: 85 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
[metadata]
name = markdown_it_py
version = attr: markdown_it.__version__
description = Python port of markdown-it. Markdown parsing, done right!
long_description = file: README.md
long_description_content_type = text/markdown
url = https://github.com/executablebooks/markdown-it-py
author = Chris Sewell
author_email = chrisj_sewell@hotmail.com
license = MIT
license_file = LICENSE
classifiers =
Development Status :: 3 - Alpha
Intended Audience :: Developers
License :: OSI Approved :: MIT License
Programming Language :: Python :: 3
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: Implementation :: CPython
Programming Language :: Python :: Implementation :: PyPy
Topic :: Software Development :: Libraries :: Python Modules
Topic :: Text Processing :: Markup
keywords = markdown lexer parser development
project_urls =
Documentation=https://markdown-it-py.readthedocs.io

[options]
packages = find:
install_requires =
attrs>=19,<21
mdit-py-plugins~=0.2.6
python_requires = ~=3.6
include_package_data = True
zip_safe = False

[options.entry_points]
console_scripts =
markdown-it = markdown_it.cli.parse:main

[options.extras_require]
code_style =
pre-commit==2.6
compare =
commonmark~=0.9.1
markdown~=3.2.2
mistletoe-ebp~=0.10.0
mistune~=0.8.4
panflute~=1.12
linkify =
linkify-it-py~=1.0
rtd =
myst-nb~=0.11.1
pyyaml
sphinx>=2,<4
sphinx-copybutton
sphinx-panels~=0.4.0
sphinx_book_theme
testing =
coverage
psutil
pytest>=3.6,<4
pytest-benchmark~=3.2
pytest-cov
pytest-regressions

[options.packages.find]
exclude =
test*
benchmarking

[mypy]
show_error_codes = True
warn_unused_ignores = True
warn_redundant_casts = True
no_implicit_optional = True
strict_equality = True

[mypy-tests.test_plugins.*]
ignore_errors = True

[flake8]
max-line-length = 100
extend-ignore = E203
77 changes: 5 additions & 72 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,73 +1,6 @@
# from importlib import import_module
from os import path
import re
from setuptools import find_packages, setup
# This file is needed for editable installs (`pip install -e .`).
# Can be removed once the following is resolved
# https://github.com/pypa/packaging-problems/issues/256
from setuptools import setup


def get_version():
text = open(path.join(path.dirname(__file__), "markdown_it", "__init__.py")).read()
match = re.compile(r"^__version__\s*\=\s*[\"\']([^\s\'\"]+)", re.M).search(text)
return match.group(1)


setup(
name="markdown-it-py",
version=get_version(),
description="Python port of markdown-it. Markdown parsing, done right!",
long_description=open("README.md").read(),
long_description_content_type="text/markdown",
url="https://github.com/executablebooks/markdown-it-py",
project_urls={"Documentation": "https://markdown-it-py.readthedocs.io"},
author="Chris Sewell",
author_email="chrisj_sewell@hotmail.com",
license="MIT",
packages=find_packages(exclude=["test*", "benchmarking"]),
include_package_data=True,
entry_points={"console_scripts": ["markdown-it = markdown_it.cli.parse:main"]},
classifiers=[
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Text Processing :: Markup",
],
keywords="markdown lexer parser development",
python_requires="~=3.6",
install_requires=["attrs>=19,<21", "mdit-py-plugins~=0.2.6"],
extras_require={
"code_style": ["pre-commit==2.6"],
"testing": [
"coverage",
"pytest>=3.6,<4",
"pytest-cov",
"pytest-regressions",
"pytest-benchmark~=3.2",
"psutil",
],
"rtd": [
"myst-nb~=0.11.1",
"sphinx_book_theme",
"sphinx-panels~=0.4.0",
"sphinx-copybutton",
"sphinx>=2,<4",
"pyyaml",
],
"compare": [
"commonmark~=0.9.1",
"markdown~=3.2.2",
"mistune~=0.8.4",
# "mistletoe~=0.7.2",
"mistletoe-ebp~=0.10.0",
"panflute~=1.12",
],
"linkify": ["linkify-it-py~=1.0"],
},
zip_safe=False,
)
setup()

0 comments on commit b1a74b4

Please sign in to comment.