certbot/setup.py

141 lines
4.4 KiB
Python
Raw Permalink 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']
Update test-everything (#5397) * Use josepy instead of acme.jose. (#5203) * Parse variables without whitespace separator correctly in CentOS family of distributions (#5318) * Pin josepy in letsencrypt-auto (#5321) * pin josepy in le-auto * Put pinned versions in sorted order * Pin dependencies in oldest tests (#5316) * Add tools/merge_requirements.py * Revert "Fix oldest tests by pinning Google DNS deps (#5000)" This reverts commit f68fba2be2fc342dd72deaaf048ab79e5a8fc2be. * Add tools/oldest_constraints.txt * Remove oldest constraints from tox.ini * Rename dev constraints file * Update tools/pip_install.sh * Update install_and_test.sh * Fix pip_install.sh * Don't cat when you can cp * Add ng-httpsclient to dev constraints for oldest tests * Bump tested setuptools version * Update dev_constraints comment * Better document oldest dependencies * test against oldest versions we say we require * Update dev constraints * Properly handle empty lines * Update constraints gen in pip_install * Remove duplicated zope.component * Reduce pyasn1-modules dependency * Remove blank line * pin back google-api-python-client * pin back uritemplate * pin josepy for oldest tests * Undo changes to install_and_test.sh * Update install_and_test.sh description * use split instead of partition * More pip dependency resolution workarounds (#5339) * remove pyopenssl and six deps * remove outdated tox.ini dep requirement * Fix auto_tests on systems with new bootstrappers (#5348) * Fix pytest on macOS in Travis (#5360) * Add tools/pytest.sh * pass TRAVIS through in tox.ini * Use tools/pytest.sh to run pytest * Add quiet to pytest.ini * ignore pytest cache * print as a string (#5359) * Use apache2ctl modules for Gentoo systems. (#5349) * Do not call Apache binary for module reset in cleanup() * Use apache2ctl modules for Gentoo * Broader git ignore for pytest cache files (#5361) Make gitignore take pytest cache directories in to account, even if they reside in subdirectories. If pytest is run for a certain module, ie. `pytest certbot-apache` the cache directory is created under `certbot-apache` directory. * Fix letsencrypt-auto name and long forms of -n (#5375) * Deprecate Python2.6 by using Python3 on CentOS/RHEL 6 (#5329) * If there's no python or there's only python2.6 on red hat systems, install python3 * Always check for python2.6 * address style, documentation, nits * factor out all initialization code * fix up python version return value when no python installed * add no python error and exit * document DeterminePythonVersion parameters * build letsencrypt-auto * close brace * build leauto * fix syntax errors * set USE_PYTHON_3 for all cases * rip out NOCRASH * replace NOCRASH, update LE_PYTHON set logic * use built-in venv for py3 * switch to LE_PYTHON not affecting bootstrap selection and not overwriting LE_PYTHON * python3ify fetch.py * get fetch.py working with python2 and 3 * don't verify server certificates in fetch.py HttpsGetter * Use SSLContext and an environment variable so that our tests continue to never verify server certificates. * typo * build * remove commented out code * address review comments * add documentation for YES_FLAG and QUIET_FLAG * Add tests to centos6 Dockerfile to make sure we install python3 if and only if appropriate to do so. * Allow non-interactive revocation without deleting certificates (#5386) * Add --delete-after-revoke flags * Use delete_after_revoke value * Add delete_after_revoke unit tests * Add integration tests for delete-after-revoke. * Have letsencrypt-auto do a real upgrade in leauto-upgrades option 2 (#5390) * Make leauto_upgrades do a real upgrade * Cleanup vars and output * Sleep until the server is ready * add simple_http_server.py * Use a randomly assigned port * s/realpath/readlink * wait for server before getting port * s/localhost/all interfaces * update Apache ciphersuites (#5383) * Fix macOS builds for Python2.7 in Travis (#5378) * Add OSX Python2 tests * Make sure python2 is originating from homebrew on macOS * Upgrade the already installed python2 instead of trying to reinstall
2018-01-09 20:24:14 -05:00
# This package relies on PyOpenSSL, requests, and six, however, it isn't
# specified here to avoid masking the more specific request requirements in
# acme. See https://github.com/pypa/pip/issues/988 for more info.
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>=1.2', # load_pem_x509_certificate
'mock',
2016-05-06 14:57:12 -04:00
'parsedatetime>=1.3', # Calendar.parseDT
2015-03-25 12:01:32 -04:00
'pyrfc3339',
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',
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 cause problems with older pip and setuptools
if sys.version_info < (2, 7):
install_requires.extend([
'argparse',
'ordereddict',
])
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',
'ipdb',
'pytest',
'pytest-cov',
'pytest-xdist',
'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',
2017-05-19 14:15:35 -04:00
# autodoc_member_order = 'bysource', autodoc_default_flags, and #4686
'Sphinx >=1.0,<=1.5.6',
2015-02-24 11:12:31 -05:00
'sphinx_rtd_theme',
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',
author="Certbot Project",
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',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'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
],
},
)