summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2018-08-14 19:15:23 -0400
committerJason R. Coombs <jaraco@jaraco.com>2018-08-14 19:15:50 -0400
commitdbcbeba06b624bbac64719eb5cacfbaa5d845126 (patch)
treeb5ef201b0a565cb092be5e2a1a971e57430636f3 /setup.py
parentf901ad328fa9d7531d9071e4198a366db95d8d6f (diff)
parent8090b79ea406d9d5f909432267f81ce90542c2dd (diff)
downloadcherrypy-git-dbcbeba06b624bbac64719eb5cacfbaa5d845126.tar.gz
Merge branch 'master'
Diffstat (limited to 'setup.py')
-rwxr-xr-xsetup.py192
1 files changed, 80 insertions, 112 deletions
diff --git a/setup.py b/setup.py
index 00850598..79886904 100755
--- a/setup.py
+++ b/setup.py
@@ -1,116 +1,48 @@
#! /usr/bin/env python
"""CherryPy package setuptools installer."""
-import io
-
import setuptools
-###############################################################################
-# arguments for the setup command
-###############################################################################
name = 'CherryPy'
-desc = 'Object-Oriented HTTP framework'
-
-with io.open('README.rst', encoding='utf-8') as strm:
- long_desc = strm.read()
-
-classifiers = [
- 'Development Status :: 5 - Production/Stable',
- 'Environment :: Web Environment',
- 'Intended Audience :: Developers',
- 'License :: Freely Distributable',
- 'Operating System :: OS Independent',
- 'Framework :: CherryPy',
- 'License :: OSI Approved :: BSD License',
- 'Programming Language :: Python',
- 'Programming Language :: Python :: 2',
- 'Programming Language :: Python :: 2.7',
- 'Programming Language :: Python :: 3',
- 'Programming Language :: Python :: 3.4',
- 'Programming Language :: Python :: 3.5',
- 'Programming Language :: Python :: 3.6',
- 'Programming Language :: Python :: Implementation',
- 'Programming Language :: Python :: Implementation :: CPython',
- 'Programming Language :: Python :: Implementation :: Jython',
- 'Programming Language :: Python :: Implementation :: PyPy',
- 'Topic :: Internet :: WWW/HTTP',
- 'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
- 'Topic :: Internet :: WWW/HTTP :: HTTP Servers',
- 'Topic :: Internet :: WWW/HTTP :: WSGI',
- 'Topic :: Internet :: WWW/HTTP :: WSGI :: Application',
- 'Topic :: Internet :: WWW/HTTP :: WSGI :: Server',
- 'Topic :: Software Development :: Libraries :: Application Frameworks',
-]
-author = 'CherryPy Team'
-author_email = 'team@cherrypy.org'
-url = 'https://www.cherrypy.org'
-repo_slug = 'cherrypy/{}'.format(name)
+repo_slug = 'cherrypy/{}'.format(name.lower())
repo_url = 'https://github.com/{}'.format(repo_slug)
-cp_license = 'BSD'
-packages = [
- 'cherrypy', 'cherrypy.lib',
- 'cherrypy.tutorial', 'cherrypy.test',
- 'cherrypy.process',
- 'cherrypy.scaffold',
-]
-
-# install requirements must not contain namespace
-# packages. See #1673
-install_requires = [
- 'six>=1.11.0',
- 'cheroot>=6.2.4',
- 'portend>=2.1.1',
- 'more_itertools',
-]
-
-extras_require = {
- 'docs': [
- 'sphinx',
- 'docutils',
- 'alabaster',
- 'rst.linker>=1.9',
- 'jaraco.packaging>=3.2',
- ],
- 'json': ['simplejson'],
- 'routes_dispatcher': ['routes>=2.3.1'],
- 'ssl': ['pyOpenSSL'],
- 'testing': [
- 'coverage', # inspects tests coverage
- 'codecov', # sends tests coverage to codecov.io
-
- # cherrypy.lib.gctools
- 'objgraph',
-
- 'pytest>=2.8',
- 'pytest-cov',
- 'pytest-sugar',
- 'backports.unittest_mock',
- 'path.py',
- ],
- # Enables memcached session support via `cherrypy[memcached_session]`:
- 'memcached_session': ['python-memcached>=1.58'],
- 'xcgi': ['flup'],
-
- # https://docs.cherrypy.org/en/latest/advanced.html?highlight=windows#windows-console-events
- ':sys_platform == "win32" and python_version != "3.4"': ['pywin32'],
- ':sys_platform == "win32" and python_version == "3.4"': ['pypiwin32==219'],
-}
-"""Feature flags end-users can use in dependencies"""
-###############################################################################
-# end arguments for setup
-###############################################################################
-setup_params = dict(
+params = dict(
name=name,
use_scm_version=True,
- description=desc,
- long_description=long_desc,
- classifiers=classifiers,
- author=author,
- author_email=author_email,
- url=url,
+ description='Object-Oriented HTTP framework',
+ author='CherryPy Team',
+ author_email='team@cherrypy.org',
+ classifiers=[
+ 'Development Status :: 5 - Production/Stable',
+ 'Environment :: Web Environment',
+ 'Intended Audience :: Developers',
+ 'License :: Freely Distributable',
+ 'Operating System :: OS Independent',
+ 'Framework :: CherryPy',
+ 'License :: OSI Approved :: BSD License',
+ 'Programming Language :: Python',
+ 'Programming Language :: Python :: 2',
+ 'Programming Language :: Python :: 2.7',
+ 'Programming Language :: Python :: 3',
+ 'Programming Language :: Python :: 3.4',
+ 'Programming Language :: Python :: 3.5',
+ 'Programming Language :: Python :: 3.6',
+ 'Programming Language :: Python :: Implementation',
+ 'Programming Language :: Python :: Implementation :: CPython',
+ 'Programming Language :: Python :: Implementation :: Jython',
+ 'Programming Language :: Python :: Implementation :: PyPy',
+ 'Topic :: Internet :: WWW/HTTP',
+ 'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
+ 'Topic :: Internet :: WWW/HTTP :: HTTP Servers',
+ 'Topic :: Internet :: WWW/HTTP :: WSGI',
+ 'Topic :: Internet :: WWW/HTTP :: WSGI :: Application',
+ 'Topic :: Internet :: WWW/HTTP :: WSGI :: Server',
+ 'Topic :: Software Development :: Libraries :: Application Frameworks',
+ ],
+ url='https://www.cherrypy.org',
project_urls={
'CI: AppVeyor': 'https://ci.appveyor.com/project/{}'.format(repo_slug),
'CI: Travis': 'https://travis-ci.org/{}'.format(repo_slug),
@@ -119,12 +51,54 @@ setup_params = dict(
'GitHub: issues': '{}/issues'.format(repo_url),
'GitHub: repo': repo_url,
},
- license=cp_license,
- packages=packages,
+ packages=[
+ 'cherrypy', 'cherrypy.lib',
+ 'cherrypy.tutorial', 'cherrypy.test',
+ 'cherrypy.process',
+ 'cherrypy.scaffold',
+ ],
entry_points={'console_scripts': ['cherryd = cherrypy.__main__:run']},
include_package_data=True,
- install_requires=install_requires,
- extras_require=extras_require,
+ install_requires=[
+ 'six>=1.11.0',
+ 'cheroot>=6.2.4',
+ 'portend>=2.1.1',
+ 'more_itertools',
+ ],
+ extras_require={
+ 'docs': [
+ 'sphinx',
+ 'docutils',
+ 'alabaster',
+ 'rst.linker>=1.9',
+ 'jaraco.packaging>=3.2',
+ ],
+ 'json': ['simplejson'],
+ 'routes_dispatcher': ['routes>=2.3.1'],
+ 'ssl': ['pyOpenSSL'],
+ 'testing': [
+ 'coverage', # inspects tests coverage
+ 'codecov', # sends tests coverage to codecov.io
+
+ # cherrypy.lib.gctools
+ 'objgraph',
+
+ 'pytest>=2.8',
+ 'pytest-cov',
+ 'pytest-sugar',
+ 'backports.unittest_mock',
+ 'path.py',
+ 'requests_toolbelt',
+ ],
+ # Enables memcached session support via `cherrypy[memcached_session]`:
+ 'memcached_session': ['python-memcached>=1.58'],
+ 'xcgi': ['flup'],
+
+ # https://docs.cherrypy.org/en/latest/advanced.html?highlight=windows#windows-console-events
+ ':sys_platform == "win32" and python_version != "3.4"': ['pywin32'],
+ ':sys_platform == "win32" and python_version == "3.4"':
+ ['pypiwin32==219'],
+ },
setup_requires=[
'setuptools_scm',
],
@@ -132,10 +106,4 @@ setup_params = dict(
)
-def main():
- """Package installation entry point."""
- setuptools.setup(**setup_params)
-
-
-if __name__ == '__main__':
- main()
+__name__ == '__main__' and setuptools.setup(**params)