bidict/setup.py

76 lines
2.3 KiB
Python
Raw Normal View History

# -*- coding: utf-8 -*-
2022-02-15 20:36:58 +00:00
# Copyright 2009-2022 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
"""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
"""
import sys
PY2_ERR = """
This version of bidict does not support Python 2.
Either use bidict 0.18.4,
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.')
2022-10-01 16:32:33 +00:00
from pathlib import Path
from types import SimpleNamespace
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
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,
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'],
include_package_data=True,
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',
'Programming Language :: Python :: 3.7',
2019-10-20 19:51:01 +00:00
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'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',
'Typing :: Typed',
],
)