| 1 | """prawcore setup.py.""" |
| 2 | |
| 3 | import re |
| 4 | from codecs import open |
| 5 | from os import path |
| 6 | |
| 7 | from setuptools import setup |
| 8 | |
| 9 | PACKAGE_NAME = "prawcore" |
| 10 | HERE = path.abspath(path.dirname(__file__)) |
| 11 | with open(path.join(HERE, "README.rst"), encoding="utf-8") as fp: |
| 12 | README = fp.read() |
| 13 | with open(path.join(HERE, PACKAGE_NAME, "const.py"), encoding="utf-8") as fp: |
| 14 | VERSION = re.search('__version__ = "([^"]+)"', fp.read()).group(1) |
| 15 | |
| 16 | extras = { |
| 17 | "ci": ["coveralls"], |
| 18 | "lint": ["black", "flake8", "pre-commit", "pydocstyle", "flynt"], |
| 19 | "test": [ |
| 20 | "betamax >=0.8, <0.9", |
| 21 | "betamax_matchers >=0.4.0, <0.5", |
| 22 | "betamax-serializers >=0.2.0, <0.3", |
| 23 | "mock >=0.8", |
| 24 | "pytest", |
| 25 | "testfixtures >4.13.2, <7", |
| 26 | ], |
| 27 | } |
| 28 | extras["dev"] = extras["lint"] + extras["test"] |
| 29 | |
| 30 | setup( |
| 31 | name=PACKAGE_NAME, |
| 32 | author="Bryce Boe", |
| 33 | author_email="[email protected]", |
| 34 | classifiers=[ |
| 35 | "Development Status :: 5 - Production/Stable", |
| 36 | "Intended Audience :: Developers", |
| 37 | "License :: OSI Approved :: BSD License", |
| 38 | "Operating System :: OS Independent", |
| 39 | "Natural Language :: English", |
| 40 | "Programming Language :: Python", |
| 41 | "Programming Language :: Python :: 3", |
| 42 | "Programming Language :: Python :: 3.6", |
| 43 | "Programming Language :: Python :: 3.7", |
| 44 | "Programming Language :: Python :: 3.8", |
| 45 | "Programming Language :: Python :: 3.9", |
| 46 | ], |
| 47 | description="Low-level communication layer for PRAW 4+.", |
| 48 | extras_require=extras, |
| 49 | install_requires=["requests >=2.6.0, <3.0"], |
| 50 | python_requires="~=3.6", |
| 51 | keywords="praw reddit api", |
| 52 | license="Simplified BSD License", |
| 53 | long_description=README, |
| 54 | packages=[PACKAGE_NAME], |
| 55 | url="https://github.com/praw-dev/prawcore", |
| 56 | version=VERSION, |
| 57 | ) |