-
Notifications
You must be signed in to change notification settings - Fork 3
/
setup.py
74 lines (64 loc) · 2.45 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
74
#!/usr/bin/env python
import re
import pathlib, pkg_resources
from setuptools import find_packages, setup
VERSION_FILE = "fdk_extension/__init__.py"
with pathlib.Path(VERSION_FILE).open() as version_file:
match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]",
version_file.read(), re.MULTILINE)
if match:
version = match.group(1)
else:
raise RuntimeError(f"Unable to find version string in {VERSION_FILE}.")
# Reading requirements.txt file
try:
with pathlib.Path("requirements/requirements.txt").open() as requirements:
install_requires = [str(requirement) for requirement in pkg_resources.parse_requirements(requirements)]
except:
raise RuntimeError("Got error while reading requirements.txt file")
# Reading requirements for test
try:
with pathlib.Path("requirements/requirements_test.txt").open() as test_requirements:
test_requires = [str(requirement) for requirement in pkg_resources.parse_requirements(test_requirements)]
except:
raise RuntimeError("Got Error while reading requirements_test.txt.")
with open("README.md") as readme_file:
long_description = readme_file.read()
setup(
name="fdk_extension",
version=version,
description="FDK Extension helper library",
long_description=long_description,
long_description_content_type="text/markdown",
license="MIT",
author="Fynd Developer",
author_email="dev@fynd.com",
url="https://github.com/gofynd/fdk-extension-python",
project_urls={
"Source Code": "https://github.com/gofynd/fdk-extension-python",
},
packages=find_packages(
exclude=("examples*", "tests*")
),
install_requires=install_requires,
extras_require={
"test": test_requires
},
keywords=["FDK extension python", "Extension", "FDK"],
python_requires=">=3.7, <3.11",
classifiers=[
"Development Status :: 4 - Beta",
"Topic :: Software Development :: Libraries",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Intended Audience :: Developers",
"Natural Language :: English",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3 :: Only"
],
)