From 2145141162bd2767b89b6dd69a72074cfb63292b Mon Sep 17 00:00:00 2001 From: Alice Bevan-McGregor Date: Mon, 10 Jun 2019 13:49:35 -0400 Subject: [PATCH] Metadata update. --- setup.py | 59 +++++++++++++++++++++++++++++--------------------------- 1 file changed, 31 insertions(+), 28 deletions(-) diff --git a/setup.py b/setup.py index 05b23fa..3a25f4e 100755 --- a/setup.py +++ b/setup.py @@ -1,23 +1,15 @@ -#!/usr/bin/env python -# encoding: utf-8 - -from __future__ import print_function - -import os -import sys -import codecs +#!/usr/bin/env python3 from setuptools import setup +from sys import argv, version_info as python_version +from pathlib import Path -if sys.version_info < (3, 3): - raise SystemExit("Python 3.3 or later is required.") - -version = description = url = author = None +if python_version < (3, 6): + raise SystemExit("Python 3.6 or later is required.") -exec(open(os.path.join("web", "dispatch", "resource", "release.py")).read()) - - -here = os.path.abspath(os.path.dirname(__file__)) +here = Path(__file__).resolve().parent +version = description = url = author = author_email = "" # Populated by the next line. +exec((here / "web" / "dispatch" / "resource" / "release.py").read_text('utf-8')) tests_require = [ 'pytest', # test collector and extensible runner @@ -31,14 +23,24 @@ setup( name = "web.dispatch.resource", version = version, + description = description, - long_description = codecs.open(os.path.join(here, 'README.rst'), 'r', 'utf8').read(), + long_description = (here / 'README.rst').read_text('utf-8'), url = url, - download_url = 'http://s.webcore.io/aIly', + download_url = 'https://github.com/marrow/web.dispatch.resource/releases', + author = author.name, author_email = author.email, license = 'MIT', - keywords = ['marrow', 'dispatch', 'web.dispatch', 'resource dispatch', 'endpoint discovery', 'WebCore', 'REST'], + keywords = [ + 'marrow', + 'dispatch', + 'web.dispatch', + 'resource dispatch', + 'endpoint discovery', + 'WebCore', + 'REST' + ], classifiers = [ "Development Status :: 5 - Production/Stable", "Environment :: Console", @@ -48,29 +50,32 @@ "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.3", - "Programming Language :: Python :: 3.4", - "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Software Development :: Libraries :: Python Modules", ], + project_urls = { + "Repository": "https://github.com/marrow/web.dispatch.resource/", + "Documentation": "https://github.com/marrow/web.dispatch.resource/#readme", + "Issue Tracker": "https://github.com/marrow/web.dispatch.resource/issues", + "Funding": "https://www.patreon.com/GothAlice", + }, + packages = ['web.dispatch.resource'], include_package_data = True, package_data = {'': ['README.rst', 'LICENSE.txt']}, zip_safe = False, - # Dependency Declaration - setup_requires = [ 'pytest-runner', - ] if {'pytest', 'test', 'ptr'}.intersection(sys.argv) else [], + ] if {'pytest', 'test', 'ptr'}.intersection(argv) else [], install_requires = [ 'web.dispatch~=3.0.1', # Core dispatch helpers. - 'pathlib; python_version < "3.4"', # Path manipulation utility lib; builtin in 3.4 and 3.5. ], extras_require = dict( @@ -79,8 +84,6 @@ tests_require = tests_require, - # Plugin Registration - entry_points = { 'web.dispatch': [ 'resource = web.dispatch.resource:ResourceDispatch', # REST resource dispatch