From d690b65d5d7817b55aafcbefda2c48bc0138adac Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Mon, 8 Mar 2021 22:28:01 -0500 Subject: [PATCH 1/2] port setuptools options to declarative config --- setup.cfg | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ setup.py | 54 ------------------------------------------------------ 2 files changed, 54 insertions(+), 54 deletions(-) create mode 100644 setup.cfg diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..0e1f82a --- /dev/null +++ b/setup.cfg @@ -0,0 +1,54 @@ +[metadata] +name = Genshi +version = 0.8 +description = A toolkit for generation of output for the web +long_description = + Genshi is a Python library that provides an integrated set of + components for parsing, generating, and processing HTML, XML or + other textual content for output generation on the web. The major + feature is a template language, which is heavily inspired by Kid. +author = Edgewall Software +author_email = info@edgewall.org +license = BSD +url = https://github.com/edgewall/genshi +classifiers = + Development Status :: 4 - Beta + Environment :: Web Environment + Intended Audience :: Developers + License :: OSI Approved :: BSD License + Operating System :: OS Independent + Programming Language :: Python + Programming Language :: Python :: 2 + Programming Language :: Python :: 3 + Topic :: Internet :: WWW/HTTP :: Dynamic Content + Topic :: Software Development :: Libraries :: Python Modules + Topic :: Text Processing :: Markup :: HTML + Topic :: Text Processing :: Markup :: XML +keywords = + python.templating.engines + +[options] +# include tests for python3 setup.py test (needed when creating +# source distributions on python2 too so that they work on python3) +packages = + genshi + genshi.filters + genshi.template + genshi.tests + genshi.filters.tests + genshi.template.tests + genshi.template.tests.templates +install_requires = + six + +[options.entry_points] +babel.extractors = + genshi = genshi.filters.i18n:extract[i18n] +python.templating.engines = + genshi = genshi.template.plugin:MarkupTemplateEnginePlugin[plugin] + genshi-markup = genshi.template.plugin:MarkupTemplateEnginePlugin[plugin] + genshi-text = genshi.template.plugin:TextTemplateEnginePlugin[plugin] + +[options.extras_require] +i18n = Babel>=0.8 +plugin = setuptools>=0.6a2 diff --git a/setup.py b/setup.py index 437420d..18c7dfd 100755 --- a/setup.py +++ b/setup.py @@ -98,63 +98,9 @@ def zip_safe(self): extra['include_package_data'] = True -# include tests for python3 setup.py test (needed when creating -# source distributions on python2 too so that they work on python3) -packages = [ - 'genshi', 'genshi.filters', 'genshi.template', - 'genshi.tests', 'genshi.filters.tests', - 'genshi.template.tests', - 'genshi.template.tests.templates', -] - - setup( - name = 'Genshi', - version = '0.8', - description = 'A toolkit for generation of output for the web', - long_description = \ -"""Genshi is a Python library that provides an integrated set of -components for parsing, generating, and processing HTML, XML or -other textual content for output generation on the web. The major -feature is a template language, which is heavily inspired by Kid.""", - author = 'Edgewall Software', - author_email = 'info@edgewall.org', - license = 'BSD', - url = 'https://github.com/edgewall/genshi', - - classifiers = [ - 'Development Status :: 4 - Beta', - 'Environment :: Web Environment', - 'Intended Audience :: Developers', - 'License :: OSI Approved :: BSD License', - 'Operating System :: OS Independent', - 'Programming Language :: Python', - 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 3', - 'Topic :: Internet :: WWW/HTTP :: Dynamic Content', - 'Topic :: Software Development :: Libraries :: Python Modules', - 'Topic :: Text Processing :: Markup :: HTML', - 'Topic :: Text Processing :: Markup :: XML' - ], - keywords = ['python.templating.engines'], - packages = packages, test_suite = 'genshi.tests.suite', - install_requires = ['six'], - extras_require = { - 'i18n': ['Babel>=0.8'], - 'plugin': ['setuptools>=0.6a2'] - }, - entry_points = """ - [babel.extractors] - genshi = genshi.filters.i18n:extract[i18n] - - [python.templating.engines] - genshi = genshi.template.plugin:MarkupTemplateEnginePlugin[plugin] - genshi-markup = genshi.template.plugin:MarkupTemplateEnginePlugin[plugin] - genshi-text = genshi.template.plugin:TextTemplateEnginePlugin[plugin] - """, - ext_modules = ext_modules, cmdclass = cmdclass, From d88dad8b2a28c2f692cafd2af1e86a58ee395556 Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Wed, 10 Mar 2021 06:47:17 -0500 Subject: [PATCH 2/2] setup.cfg: list explicit license file This is not needed for wheels, since the default license files pattern already finds the current name of this file. However, it is needed for sdist in order to guarantee the file gets disted. Currently, that file gets disted anyway... but only because MANIFEST.in forces it to be. So adding the license_files metadata lets us drop the info from MANIFEST.in; however, as the project maintainer finds it easier to look in only one file for this information, this is being left in despite its redundancy. --- MANIFEST.in | 1 + setup.cfg | 1 + 2 files changed, 2 insertions(+) diff --git a/MANIFEST.in b/MANIFEST.in index 1e7de1f..edb0b40 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,4 +1,5 @@ include ChangeLog +# implied by setup.cfg -> license_files, repeated for clarity include COPYING recursive-include genshi *.py *.c *.txt *.html recursive-include examples * diff --git a/setup.cfg b/setup.cfg index 0e1f82a..b22d3a0 100644 --- a/setup.cfg +++ b/setup.cfg @@ -10,6 +10,7 @@ long_description = author = Edgewall Software author_email = info@edgewall.org license = BSD +license_files = COPYING url = https://github.com/edgewall/genshi classifiers = Development Status :: 4 - Beta