-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup.py
More file actions
57 lines (50 loc) · 1.9 KB
/
setup.py
File metadata and controls
57 lines (50 loc) · 1.9 KB
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
import os
import re
from setuptools import setup, find_packages
with open("README.md", "r") as f:
long_description = f.read()
package = 'contentstack_management'
def get_version(package):
"""
Return package version as listed in `__version__` in `init.py`.
"""
init_py = open(os.path.join(package, '__init__.py')).read()
return re.search("^__version__ = ['\"]([^'\"]+)['\"]",
init_py, re.MULTILINE).group(1)
def get_author_name(package):
"""
Return package author as listed in `__author__` in `init.py`.
"""
init_py = open(os.path.join(package, '__init__.py')).read()
return re.search("^__author__ = ['\"]([^'\"]+)['\"]",
init_py, re.MULTILINE).group(1)
def get_author_email(package):
"""
Return package email as listed in `__email__` in `init.py`.
"""
init_py = open(os.path.join(package, '__init__.py')).read()
return re.search("^__email__ = ['\"]([^'\"]+)['\"]",
init_py, re.MULTILINE).group(1)
setup(
name="contentstack-management",
version=get_version(package),
packages=find_packages(exclude=['tests']),
py_modules=['_api_client', 'contentstack','common','_errors','_constant'],
description="Contentstack API Client Library for Python",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/contentstack/contentstack-management-python",
author=get_author_name(package),
author_email=get_author_email(package),
license="MIT",
classifiers=[
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3.10",
"Operating System :: OS Independent",
],
install_requires=["bson >= 0.5.9", "requests >= 2.5.4", "requests-toolbelt >= 0.3.1"],
extras_require={
"dev": ["pytest>=7.0", "twine>=4.0.2", "dotenv>=0.0.5"],
},
python_requires=">=3.9",
)