From 1d2743e1515c646624d3faac17ac4f95b38dc62e Mon Sep 17 00:00:00 2001 From: Patrick Cloke Date: Wed, 20 Oct 2021 06:53:21 -0400 Subject: [PATCH] Use setup.cfg instead of setup.py. (#32) --- CHANGELOG.rst | 2 ++ pyproject.toml | 3 +++ setup.cfg | 33 +++++++++++++++++++++++++++++++++ setup.py | 50 -------------------------------------------------- tox.ini | 1 + 5 files changed, 39 insertions(+), 50 deletions(-) create mode 100644 pyproject.toml create mode 100644 setup.cfg delete mode 100644 setup.py diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 50bedc9..31a58bd 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -11,6 +11,8 @@ next `#31 `_) * Switch continuous integration to GitHub Actions. (`#26 `_, `#28 `_) +* Changed packaging to use setuptools declarative config in `setup.cfg`. + (`#32 `_) 0.8.1 (October 15, 2020) ======================== diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..716f6e4 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["setuptools>=38.6.0", "wheel"] +build-backend = "setuptools.build_meta" diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..ccc51bb --- /dev/null +++ b/setup.cfg @@ -0,0 +1,33 @@ +[metadata] +name = django-render-block +version = 0.9dev +description = Render a particular block from a template to a string. +long_description = file: README.rst, CHANGELOG.rst +long_description_content_type = text/x-rst +author = Patrick Cloke +author_email = clokep@patrick.cloke.us +url = https://github.com/clokep/django-render-block +download_url = https://github.com/clokep/django-render-block +keywords = [django, template, block, templates, render, context] +classifiers = + Development Status :: 4 - Beta + Intended Audience :: Developers + Topic :: Software Development :: Libraries :: Python Modules + Environment :: Web Environment + Topic :: Internet + Framework :: Django + Framework :: Django :: 2.2 + Framework :: Django :: 3.1 + Framework :: Django :: 3.2 + Framework :: Django :: 4.0 + Programming Language :: Python + Programming Language :: Python :: 3.6 + Programming Language :: Python :: 3.7 + Programming Language :: Python :: 3.8 + Programming Language :: Python :: 3.9 + License :: OSI Approved :: ISC License (ISCL) + +[options] +package = find: +install_requires = django>=2.2 +python_requires = >=3.6 diff --git a/setup.py b/setup.py deleted file mode 100644 index 1c5e1a7..0000000 --- a/setup.py +++ /dev/null @@ -1,50 +0,0 @@ -import codecs - -from setuptools import find_packages, setup - - -def long_description(): - result = '' - - for filename in ['README.rst', 'CHANGELOG.rst']: - with codecs.open(filename, encoding='utf8') as f: - result += f.read() + '\n' - - return result - - -setup( - name='django-render-block', - packages=find_packages(), - version='0.9dev', - description='Render a particular block from a template to a string.', - long_description=long_description(), - long_description_content_type='text/x-rst', - author='Patrick Cloke', - author_email='clokep@patrick.cloke.us', - url='https://github.com/clokep/django-render-block', - download_url='https://github.com/clokep/django-render-block', - keywords=['django', 'template', 'block', 'templates', 'render', 'context'], - classifiers=[ - 'Development Status :: 4 - Beta', - 'Intended Audience :: Developers', - 'Topic :: Software Development :: Libraries :: Python Modules', - 'Environment :: Web Environment', - 'Topic :: Internet', - 'Framework :: Django', - 'Framework :: Django :: 2.2', - 'Framework :: Django :: 3.1', - 'Framework :: Django :: 3.2', - 'Framework :: Django :: 4.0', - 'Programming Language :: Python', - 'Programming Language :: Python :: 3.6', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'License :: OSI Approved :: ISC License (ISCL)', - ], - install_requires=[ - 'django>=2.2', - ], - python_requires=">=3.6", -) diff --git a/tox.ini b/tox.ini index 1fbe15e..5070b47 100644 --- a/tox.ini +++ b/tox.ini @@ -8,6 +8,7 @@ envlist = py{36,37,38,39}-django{22,31,32}, # Django 4.0 drops support for Python 3.6/3.7. py{38,39}-django{40,main} +isolated_build = True skip_missing_interpreters = True [testenv]