bidict/setup.py

101 lines
3.2 KiB
Python
Raw Normal View History

# -*- coding: utf-8 -*-
2018-01-01 03:51:19 +00:00
# Copyright 2018 Joshua Bronson. All Rights Reserved.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
2017-03-17 16:16:45 +00:00
"""setup.py"""
2017-03-17 16:16:45 +00:00
from io import open # pylint: disable=redefined-builtin
2017-03-17 16:16:45 +00:00
from setuptools import setup
2017-03-17 16:16:45 +00:00
# Fetch bidict's package metadata from bidict/metadata.py.
# Must use exec(open(...)) because we haven't been installed yet.
METADATA = dict(__name__=__name__)
exec(open('bidict/metadata.py').read().encode('utf8'), METADATA) # pylint: disable=exec-used
try:
LONG_DESCRIPTION = open('README.rst').read().replace(
':doc:', '' # :doc: breaks rendering on PyPI
).replace( # the _static content isn't available on PyPI
'./_static/logo.png', 'https://github.com/jab/bidict/raw/master/_static/logo.png'
)
except: # noqa; pylint: disable=bare-except
LONG_DESCRIPTION = 'See https://bidict.readthedocs.io'
2017-12-17 18:22:42 +00:00
SETUP_REQS = [
'pytest-runner',
'setuptools_scm',
]
2017-12-17 18:22:42 +00:00
TEST_REQS = [
'hypothesis<4',
'hypothesis-pytest<1',
'py<2',
'pytest<4',
'pytest-benchmark<4',
'sortedcollections<1',
'sortedcontainers<2',
]
2017-12-17 18:22:42 +00:00
COVERAGE_REQS = [
'coverage<5',
'pytest-cov<3',
]
2017-12-17 18:22:42 +00:00
DEV_REQ = SETUP_REQS + TEST_REQS + COVERAGE_REQS + [
'Sphinx<2',
'pre-commit<2',
'tox<3',
# Peg to more specific versions of the following dependencies since they'd
# have a higher chance of breaking CI otherwise. Upgrade to newer versions
# manually to have a chance to fix any resulting breakage.
'flake8<3.6',
'pydocstyle<2.2',
'pylint<1.9',
]
2014-09-23 14:08:21 +00:00
setup(
name='bidict',
use_scm_version={
'version_scheme': 'guess-next-dev',
'local_scheme': 'dirty-tag',
'write_to': 'bidict/_version.py',
},
author=METADATA['__author__'],
author_email=METADATA['__email__'],
description=METADATA['__description__'],
long_description=LONG_DESCRIPTION,
keywords='dict, dictionary, mapping, datastructure, '
'bimap, bijection, bijective, injective, inverse, reverse, '
'bidirectional, two-way, 2-way',
2014-09-23 14:08:21 +00:00
url='https://github.com/jab/bidict',
license=METADATA['__license__'],
2015-05-30 20:26:26 +00:00
packages=['bidict'],
zip_safe=False, # Don't zip. (We're zip-safe but prefer not to.)
2014-09-23 14:08:21 +00:00
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
2017-03-15 20:43:05 +00:00
'License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)',
2014-09-23 14:08:21 +00:00
'Operating System :: OS Independent',
2014-09-30 15:54:30 +00:00
'Programming Language :: Python :: 2.7',
2015-11-28 14:17:43 +00:00
'Programming Language :: Python :: 3',
2014-09-30 15:54:30 +00:00
'Programming Language :: Python :: 3.4',
2015-09-14 14:11:55 +00:00
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
2014-09-30 15:54:30 +00:00
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
2014-09-23 14:08:21 +00:00
'Topic :: Software Development :: Libraries :: Python Modules',
],
2017-12-17 18:22:42 +00:00
setup_requires=SETUP_REQS,
tests_require=TEST_REQS,
extras_require=dict(
2017-12-17 18:22:42 +00:00
test=TEST_REQS,
coverage=COVERAGE_REQS,
dev=DEV_REQ,
),
)