2017-11-20 03:24:08 +00:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
# Copyright 2017 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
|
|
|
|
2017-11-21 15:35:51 +00:00
|
|
|
"""setup.py"""
|
2017-03-17 16:16:45 +00:00
|
|
|
|
2017-11-20 03:24:08 +00:00
|
|
|
from io import open # pylint: disable=redefined-builtin
|
2017-03-17 16:16:45 +00:00
|
|
|
|
2017-11-20 03:24:08 +00:00
|
|
|
from setuptools import setup
|
2017-03-17 16:16:45 +00:00
|
|
|
|
2017-11-20 03:24:08 +00:00
|
|
|
# Fetch bidict's package metadata from bidict/metadata.py.
|
|
|
|
# Must use exec(open(...)) because we haven't been installed yet.
|
2017-11-21 03:27:26 +00:00
|
|
|
METADATA = {}
|
2017-11-20 03:24:08 +00:00
|
|
|
exec(open('bidict/metadata.py').read().encode('utf8'), METADATA) # pylint: disable=exec-used
|
2015-03-22 18:21:15 +00:00
|
|
|
|
2017-11-21 03:27:26 +00:00
|
|
|
try:
|
|
|
|
LONG_DESCRIPTION = open('README.rst').read().replace(
|
2017-12-06 19:56:35 +00:00
|
|
|
':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'
|
2017-11-21 03:27:26 +00:00
|
|
|
)
|
|
|
|
except: # noqa; pylint: disable=bare-except
|
|
|
|
LONG_DESCRIPTION = 'See https://bidict.readthedocs.io'
|
|
|
|
|
|
|
|
SETUP_REQ = [
|
|
|
|
'pytest-runner',
|
|
|
|
'setuptools_scm',
|
|
|
|
]
|
|
|
|
|
2017-11-20 03:24:08 +00:00
|
|
|
TESTS_REQ = [
|
2017-11-22 14:48:35 +00:00
|
|
|
'hypothesis>=3.38.4,<4',
|
|
|
|
'hypothesis-pytest>=0.19.0,<1',
|
|
|
|
'py>=1.5.2,<2',
|
|
|
|
'pytest>=3.2.5,<4',
|
|
|
|
'pytest-benchmark>=3.1.1,<4',
|
|
|
|
'sortedcollections>=0.5.3,<1',
|
|
|
|
'sortedcontainers>=1.5.7,<2',
|
2017-11-16 20:44:51 +00:00
|
|
|
]
|
2017-11-21 03:27:26 +00:00
|
|
|
|
2017-11-20 03:24:08 +00:00
|
|
|
COVERAGE_REQ = [
|
2017-11-22 14:48:35 +00:00
|
|
|
'coverage>=4.4.2,<5',
|
|
|
|
'pytest-cov>=2.5.1,<3',
|
2017-11-18 03:35:40 +00:00
|
|
|
]
|
2017-11-21 03:27:26 +00:00
|
|
|
|
|
|
|
DEV_REQ = SETUP_REQ + TESTS_REQ + COVERAGE_REQ + [
|
2017-11-22 14:48:35 +00:00
|
|
|
'Sphinx>=1.6.5,<2',
|
|
|
|
'flake8>=3.5.0,<4',
|
|
|
|
'pre-commit>=1.4.1,<2',
|
|
|
|
'pydocstyle>=2.1.1,<3',
|
|
|
|
'pylint>=1.7.4,<2',
|
|
|
|
'tox>=2.9.1,<3',
|
2015-03-22 18:21:15 +00:00
|
|
|
]
|
|
|
|
|
2014-09-23 14:08:21 +00:00
|
|
|
setup(
|
|
|
|
name='bidict',
|
2017-11-21 03:27:26 +00:00
|
|
|
use_scm_version=True,
|
2017-11-20 03:24:08 +00:00
|
|
|
author=METADATA['__author__'],
|
|
|
|
author_email=METADATA['__email__'],
|
2017-11-21 03:27:26 +00:00
|
|
|
description=METADATA['__description__'],
|
|
|
|
long_description=LONG_DESCRIPTION,
|
2017-11-20 03:24:08 +00:00
|
|
|
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',
|
2017-11-20 03:24:08 +00:00
|
|
|
license=METADATA['__license__'],
|
2015-05-30 20:26:26 +00:00
|
|
|
packages=['bidict'],
|
2017-11-20 03:24:08 +00:00
|
|
|
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',
|
squashed changes for 0.13.0
- support Python 3.6, refactor CI/test setup, increase test coverage
- refactor BidirectionalMapping, BidictBase, OrderedBidictBase,
FrozenBidictBase, and subclasses
- move frozenorderedbidict into _frozen and looseorderedbidict into _loose
- register bidict as a virtual subclass of MutableMapping rather than
inheriting from it directly. This makes it clearer that it does not use any
of the concrete generic methods that MutableMapping provides.
- improve performance and flexibility of frozenbidict and
frozenorderedbidict hashing
- docs, including new type-hierarchy.png diagram
- rm unused imap, ifilter, izip_longest from compat, add PYPY
- update to latest versions of dependencies
- restore benchmarking on travis
2017-01-09 15:37:31 +00:00
|
|
|
'Programming Language :: Python :: 3.6',
|
2017-11-16 20:44:51 +00:00
|
|
|
'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-11-20 03:24:08 +00:00
|
|
|
],
|
2017-11-21 03:27:26 +00:00
|
|
|
setup_requires=SETUP_REQ,
|
2017-11-20 03:24:08 +00:00
|
|
|
tests_require=TESTS_REQ,
|
2015-03-22 18:21:15 +00:00
|
|
|
extras_require=dict(
|
2017-11-20 03:24:08 +00:00
|
|
|
test=TESTS_REQ,
|
|
|
|
coverage=COVERAGE_REQ,
|
|
|
|
dev=DEV_REQ,
|
2015-03-22 18:21:15 +00:00
|
|
|
),
|
|
|
|
)
|