certbot/setup.py

140 lines
4.3 KiB
Python
Raw Normal View History

2015-01-29 17:28:22 -05:00
import codecs
import os
import re
import sys
from setuptools import setup
2015-05-10 07:07:56 -04:00
from setuptools import find_packages
# Workaround for http://bugs.python.org/issue8876, see
# http://bugs.python.org/issue8876#msg208792
# This can be removed when using Python 2.7.9 or later:
# https://hg.python.org/cpython/raw-file/v2.7.9/Misc/NEWS
if os.path.abspath(__file__).split(os.path.sep)[1] == 'vagrant':
del os.link
2015-03-23 13:53:44 -04:00
def read_file(filename, encoding='utf8'):
2015-01-29 17:28:22 -05:00
"""Read unicode from given file."""
with codecs.open(filename, encoding=encoding) as fd:
return fd.read()
here = os.path.abspath(os.path.dirname(__file__))
# read version number (and other metadata) from package init
2016-04-13 19:03:59 -04:00
init_fn = os.path.join(here, 'certbot', '__init__.py')
2015-09-27 02:30:30 -04:00
meta = dict(re.findall(r"""__([a-z]+)__ = '([^']+)""", read_file(init_fn)))
readme = read_file(os.path.join(here, 'README.rst'))
changes = read_file(os.path.join(here, 'CHANGES.rst'))
version = meta['version']
2016-01-07 13:04:29 -05:00
# Please update tox.ini when modifying dependency version requirements
2014-11-22 08:19:19 -05:00
install_requires = [
'acme=={0}'.format(version),
# We technically need ConfigArgParse 0.10.0 for Python 2.6 support, but
# saying so here causes a runtime error against our temporary fork of 0.9.3
# in which we added 2.6 support (see #2243), so we relax the requirement.
'ConfigArgParse>=0.9.3',
2015-04-21 22:12:49 -04:00
'configobj',
'cryptography>=0.7', # load_pem_x509_certificate
'parsedatetime',
'psutil>=2.1.0', # net_connections introduced in 2.1.0
'PyOpenSSL',
2015-03-25 12:01:32 -04:00
'pyrfc3339',
2015-04-05 03:58:15 -04:00
'python2-pythondialog>=3.2.2rc1', # Debian squeeze support, cf. #280
2015-03-27 04:43:05 -04:00
'pytz',
# For pkg_resources. >=1.0 so pip resolves it to a version cryptography
# will tolerate; see #2599:
'setuptools>=1.0',
2015-09-26 12:47:29 -04:00
'six',
2014-12-17 06:02:15 -05:00
'zope.component',
2014-12-17 04:12:59 -05:00
'zope.interface',
2014-11-22 08:19:19 -05:00
]
# env markers in extras_require cause problems with older pip: #517
# Keep in sync with conditional_requirements.py.
if sys.version_info < (2, 7):
install_requires.extend([
# only some distros recognize stdlib argparse as already satisfying
'argparse',
'mock<1.1.0',
])
else:
install_requires.append('mock')
2015-02-06 18:41:28 -05:00
dev_extras = [
# Pin astroid==1.3.5, pylint==1.4.2 as a workaround for #289
'astroid==1.3.5',
'coverage',
'nose',
'nosexcover',
'pep8',
'pylint==1.4.2', # upstream #248
'tox',
2015-09-27 02:54:31 -04:00
'twine',
'wheel',
]
docs_extras = [
2015-01-30 19:28:09 -05:00
'repoze.sphinx.autointerface',
2015-02-24 09:39:26 -05:00
'Sphinx>=1.0', # autodoc_member_order = 'bysource', autodoc_default_flags
2015-02-24 11:12:31 -05:00
'sphinx_rtd_theme',
'sphinxcontrib-programoutput',
2014-11-23 14:36:34 -05:00
]
setup(
2016-04-13 19:03:59 -04:00
name='certbot',
version=version,
2016-04-13 19:37:38 -04:00
description="ACME client",
long_description=readme, # later: + '\n\n' + changes
url='https://github.com/letsencrypt/letsencrypt',
2016-04-13 19:37:38 -04:00
author="Electronic Frontier Foundation",
author_email='client-dev@letsencrypt.org',
license='Apache License 2.0',
classifiers=[
2015-09-26 19:02:41 -04:00
'Development Status :: 3 - Alpha',
'Environment :: Console',
'Environment :: Console :: Curses',
'Intended Audience :: System Administrators',
'License :: OSI Approved :: Apache Software License',
'Operating System :: POSIX :: Linux',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Topic :: Internet :: WWW/HTTP',
'Topic :: Security',
'Topic :: System :: Installation/Setup',
'Topic :: System :: Networking',
'Topic :: System :: Systems Administration',
'Topic :: Utilities',
],
2015-05-10 07:07:56 -04:00
packages=find_packages(exclude=['docs', 'examples', 'tests', 'venv']),
2015-09-27 04:10:39 -04:00
include_package_data=True,
2014-11-22 08:19:19 -05:00
install_requires=install_requires,
extras_require={
2015-02-06 18:41:28 -05:00
'dev': dev_extras,
'docs': docs_extras,
2014-11-22 08:19:19 -05:00
},
2015-05-10 08:52:40 -04:00
# to test all packages run "python setup.py test -s
2016-04-13 19:03:59 -04:00
# {acme,certbot_apache,certbot_nginx}"
test_suite='certbot',
entry_points={
'console_scripts': [
2016-04-13 19:03:59 -04:00
'certbot = certbot.main:main',
2014-11-21 20:52:03 -05:00
],
2016-04-13 19:03:59 -04:00
'certbot.plugins': [
'manual = certbot.plugins.manual:Authenticator',
'null = certbot.plugins.null:Installer',
'standalone = certbot.plugins.standalone:Authenticator',
'webroot = certbot.plugins.webroot:Authenticator',
2015-03-26 09:55:23 -04:00
],
},
)