2017-11-20 03:24:08 +00:00
|
|
|
# -*- coding: utf-8 -*-
|
2022-02-15 20:36:58 +00:00
|
|
|
# Copyright 2009-2022 Joshua Bronson. All rights reserved.
|
2017-11-20 03:24:08 +00:00
|
|
|
#
|
|
|
|
# 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
|
|
|
|
2018-04-19 08:22:07 +00:00
|
|
|
"""A setuptools-based setup module.
|
2017-03-17 16:16:45 +00:00
|
|
|
|
2021-03-29 18:01:14 +00:00
|
|
|
Ref: https://github.com/pypa/sampleproject/blob/main/setup.py
|
2018-04-19 08:22:07 +00:00
|
|
|
"""
|
|
|
|
|
2019-11-13 02:39:04 +00:00
|
|
|
import sys
|
2015-03-22 18:21:15 +00:00
|
|
|
|
2019-11-13 02:39:04 +00:00
|
|
|
PY2_ERR = """
|
|
|
|
This version of bidict does not support Python 2.
|
2020-11-28 15:09:30 +00:00
|
|
|
Either use bidict 0.18.4,
|
2019-11-13 02:39:04 +00:00
|
|
|
the last release with Python 2 support,
|
|
|
|
or use Python 3.
|
|
|
|
|
|
|
|
Also ensure you are using pip >= 9.0.1 to install bidict.
|
|
|
|
|
|
|
|
See python3statement.org for more info.
|
|
|
|
"""
|
|
|
|
|
|
|
|
if sys.version_info < (3,):
|
|
|
|
sys.exit(PY2_ERR)
|
2022-02-07 16:42:09 +00:00
|
|
|
elif sys.version_info < (3, 7):
|
|
|
|
sys.exit('Python < 3.7 is not supported by this version of bidict.')
|
2019-11-13 02:39:04 +00:00
|
|
|
|
|
|
|
|
2022-10-01 16:32:33 +00:00
|
|
|
from pathlib import Path
|
|
|
|
from types import SimpleNamespace
|
2018-04-19 08:22:07 +00:00
|
|
|
|
2022-02-08 14:52:16 +00:00
|
|
|
|
2022-10-01 16:32:33 +00:00
|
|
|
cwd = Path(__file__).parent.resolve()
|
|
|
|
long_description = (cwd / 'README.rst').read_text(encoding='utf8')
|
|
|
|
metadata = SimpleNamespace()
|
|
|
|
exec((cwd / 'bidict' / 'metadata.py').read_text(encoding='utf8'), metadata.__dict__)
|
|
|
|
|
|
|
|
|
|
|
|
from setuptools import setup
|
2018-04-19 08:22:07 +00:00
|
|
|
|
|
|
|
|
2014-09-23 14:08:21 +00:00
|
|
|
setup(
|
|
|
|
name='bidict',
|
2022-02-08 14:52:16 +00:00
|
|
|
author=metadata.__author__,
|
|
|
|
author_email=metadata.__email__,
|
|
|
|
description=metadata.__description__,
|
2022-10-01 16:32:33 +00:00
|
|
|
long_description=long_description,
|
2020-08-01 18:26:08 +00:00
|
|
|
long_description_content_type='text/x-rst',
|
2022-02-08 14:52:16 +00:00
|
|
|
keywords=metadata.__keywords__,
|
|
|
|
url=metadata.__url__,
|
|
|
|
license=metadata.__license__,
|
2015-05-30 20:26:26 +00:00
|
|
|
packages=['bidict'],
|
2020-09-08 00:00:16 +00:00
|
|
|
include_package_data=True,
|
2017-11-20 03:24:08 +00:00
|
|
|
zip_safe=False, # Don't zip. (We're zip-safe but prefer not to.)
|
2022-02-07 16:42:09 +00:00
|
|
|
python_requires='>=3.7',
|
2022-02-08 14:52:16 +00:00
|
|
|
project_urls=metadata.__project_urls__,
|
2014-09-23 14:08:21 +00:00
|
|
|
classifiers=[
|
|
|
|
'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',
|
2019-11-04 02:54:52 +00:00
|
|
|
'Programming Language :: Python :: 3 :: Only',
|
2017-11-16 20:44:51 +00:00
|
|
|
'Programming Language :: Python :: 3.7',
|
2019-10-20 19:51:01 +00:00
|
|
|
'Programming Language :: Python :: 3.8',
|
2020-12-19 14:58:02 +00:00
|
|
|
'Programming Language :: Python :: 3.9',
|
2021-10-10 16:19:54 +00:00
|
|
|
'Programming Language :: Python :: 3.10',
|
2022-10-29 23:11:37 +00:00
|
|
|
'Programming Language :: Python :: 3.11',
|
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',
|
2020-12-19 14:58:02 +00:00
|
|
|
'Typing :: Typed',
|
2017-11-20 03:24:08 +00:00
|
|
|
],
|
2015-03-22 18:21:15 +00:00
|
|
|
)
|