From 8e72326510b1f0e156f4c3e70485e9c6ed1e7d4e Mon Sep 17 00:00:00 2001 From: Simon Conseil Date: Tue, 14 Feb 2023 22:01:34 +0100 Subject: [PATCH] Move setuptools config to pyproject --- pyproject.toml | 88 ++++++++++++++++++++++++++++++++++++++++++++++++ setup.cfg | 91 -------------------------------------------------- tox.ini | 7 ---- 3 files changed, 88 insertions(+), 98 deletions(-) delete mode 100644 setup.cfg diff --git a/pyproject.toml b/pyproject.toml index 8cb0670..dafa9da 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,9 +2,97 @@ requires = ["setuptools>=64", "wheel", "setuptools_scm[toml]>=3.4"] build-backend = "setuptools.build_meta" +[project] +name = "sigal" +description = "Simple static gallery generator" +readme = "README.rst" +authors = [{name = "Simon Conseil", email = "contact@saimon.org"}] +keywords = ["gallery", "static", "generator", "image", "video", "galleria"] +license = {text = "MIT License"} +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Environment :: Console", + "License :: OSI Approved :: MIT License", + "Operating System :: OS Independent", + "Programming Language :: Python :: 3", + "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 :: Multimedia :: Graphics :: Viewers", + "Topic :: Software Development :: Libraries :: Python Modules", +] +urls = {Homepage = "https://github.com/saimn/sigal"} +requires-python = ">=3.8" +dependencies = [ + "blinker", + "click", + "Jinja2>=2.7", + "Markdown", + "Pillow>=8.0.0", + "pilkit", + "natsort", +] +dynamic = ["version"] + +[project.optional-dependencies] +all = ["boto", "brotli", "feedgenerator", "zopfli", "cryptography"] +tests = ["pytest", "pytest-cov"] +docs = ["Sphinx>=4.1.0", "alabaster", "cryptography"] + +[project.scripts] +sigal = "sigal:main" + +[tool.setuptools] +zip-safe = false +include-package-data = true +license-files = ["LICENSE"] + +[tool.setuptools.packages.find] +where = ["src"] +namespaces = true + +[tool.setuptools.package-data] +sigal = [ + "plugins/**", + "themes/**", +] + [tool.setuptools_scm] write_to = "src/sigal/version.py" [tool.black] line-length = 88 target-version = ['py38'] + +[tool.flake8] +max-line-length = "88" +ignore = "E203,W503,E731" + +[tool.distutils.isort] +profile = "black" + +[tool.coverage.run] +source = ["sigal"] +omit = [ + "/tmp/*", + "tests/*", +] + +[tool.coverage.paths] +source = [ + "src/sigal", + "*/.tox/*/lib/python*/site-packages/sigal", +] + +[tool.coverage.report] +exclude_lines = [ + "pragma: no cover", + "def __repr__", + "raise AssertionError", + "raise NotImplementedError", + "if __name__ == .__main__.:", + "except KeyboardInterrupt", + "except ImportError", +] diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index a8c8a3d..0000000 --- a/setup.cfg +++ /dev/null @@ -1,91 +0,0 @@ -[metadata] -name = sigal -description = Simple static gallery generator -long_description = file: README.rst -long_description_content_type = text/x-rst -author = Simon Conseil -author_email = contact@saimon.org -url = https://github.com/saimn/sigal -keywords = gallery, static, generator, image, video, galleria -license = MIT License -license_files = LICENSE -classifiers = - Development Status :: 5 - Production/Stable - Environment :: Console - License :: OSI Approved :: MIT License - Operating System :: OS Independent - Programming Language :: Python :: 3 - 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 :: Multimedia :: Graphics :: Viewers - Topic :: Software Development :: Libraries :: Python Modules - -[options] -zip_safe = False -include_package_data = True -packages = find_namespace: -python_requires = >=3.8 -install_requires = - blinker - click - Jinja2>=2.7 - Markdown - Pillow>=8.0.0 - pilkit - natsort - -[options.extras_require] -all = boto; brotli; feedgenerator; zopfli; cryptography -tests = pytest; pytest-cov -docs = Sphinx>=4.1.0; alabaster; cryptography - -[options.packages.find] -where = src - -[options.package_data] -sigal = - plugins/** - themes/** - -[options.entry_points] -console_scripts = - sigal = sigal:main - -[check-manifest] -ignore = - .coveragerc - tests - readthedocs.yml - -[flake8] -# ignore = E731,W504,E501 -max-line-length = 88 -ignore = E203,W503,E731 - -[isort] -profile = black -known_third_party=blinker,click,jinja2,markdown,natsort,PIL,Pillow,pilkit - -[coverage:run] -source = sigal -omit = - /tmp/* - tests/* - -[coverage:paths] -source = - src/sigal - */.tox/*/lib/python*/site-packages/sigal - -[coverage:report] -exclude_lines = - pragma: no cover - def __repr__ - raise AssertionError - raise NotImplementedError - if __name__ == .__main__.: - except KeyboardInterrupt - except ImportError diff --git a/tox.ini b/tox.ini index bd954ed..66559e1 100644 --- a/tox.ini +++ b/tox.ini @@ -20,13 +20,6 @@ extras = tests commands = pytest --cov sigal --cov-report term tests/ -[testenv:check] -skip_install = true -deps = - check-manifest -commands = - check-manifest -v --ignore sigal/version.py,*.yml,*.yaml,.git-blame-ignore-revs {toxinidir} - [testenv:doc] whitelist_externals = make extras = docs