-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
73 lines (64 loc) · 1.95 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#!/usr/bin/env python3
import pathlib
import re
import sys
import os
from setuptools import find_packages, setup
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
WORK_DIR = pathlib.Path(__file__).parent
if sys.version_info < (3, 6):
raise RuntimeError("webpay requires Python 3.6+")
def get_version():
"""
Read version
:return: str
"""
txt = (WORK_DIR / 'webpay' / '__init__.py').read_text('utf-8')
try:
return re.findall(r"^__version__ = '([^']+)'\r?$", txt, re.M)[0]
except IndexError:
raise RuntimeError('Unable to determine version.')
def get_description():
"""
Read full description from 'README.rst'
:return: description
:rtype: str
"""
with open('README.rst', 'r', encoding='utf-8') as f:
return f.read()
setup(
name='webpay-bahamta',
version=get_version(),
packages=find_packages(
exclude=('tests', 'tests.*', 'examples.*', 'docs',)),
include_package_data=True,
author='AmirHossein Falahati',
author_email='[email protected]',
license='MIT',
description='Python package for Webpay gateway API.',
long_description=get_description(),
url='https://github.com/amirho3inf/python-webpay',
classifiers=[
'Development Status :: 3 - Alpha',
'Environment :: Console',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: Unix',
'Operating System :: MacOS :: MacOS X',
'Operating System :: Microsoft :: Windows',
'Operating System :: POSIX',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
],
install_requires=[
'requests'
],
extras_require={
'async': [
'aiohttp',
]
}
)