-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
95 lines (84 loc) · 3.17 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
:Synopsis: This script is the primary configuration file for the freshpy project
:Created By: Jeff Shurtliff
:Last Modified: Jeff Shurtliff
:Modified Date: 08 May 2023
"""
import setuptools
import codecs
import os.path
def read(rel_path):
"""This function reads the ``version.py`` script in order to retrieve the version.
.. versionadded:: 1.0.0
"""
here = os.path.abspath(os.path.dirname(__file__))
with codecs.open(os.path.join(here, rel_path), 'r') as fp:
return fp.read()
def get_version(rel_path):
"""This function retrieves the current version of the package without needing to import the
:py:mod:`freshpy.utils.version` module in order to avoid dependency issues.
.. versionadded:: 1.0.0
"""
for line in read(rel_path).splitlines():
if line.startswith('__version__'):
delimiter = '"' if '"' in line else "'"
return line.split(delimiter)[1]
raise RuntimeError("Unable to find the version string")
with open('README.md', 'r') as fh:
long_description = fh.read()
version = get_version('src/freshpy/utils/version.py')
setuptools.setup(
name='freshpy',
version=version,
author='Jeff Shurtliff',
author_email='[email protected]',
description='A Python toolset for utilizing the Freshservice API',
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/jeffshurtliff/freshpy",
project_urls={
'Change Log': 'https://freshpy.readthedocs.io/en/latest/changelog.html',
'Issue Tracker': 'https://github.com/jeffshurtliff/freshpy/issues',
},
package_dir={'': 'src'},
packages=setuptools.find_packages(where='src'),
classifiers=[
"Development Status :: 4 - Beta",
"Environment :: Web Environment",
"Intended Audience :: Information Technology",
"Intended Audience :: System Administrators",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Topic :: Communications",
"Topic :: Internet :: WWW/HTTP :: Dynamic Content :: Content Management System",
"Topic :: Internet :: WWW/HTTP :: Site Management",
"Topic :: Office/Business",
"Topic :: Software Development :: Libraries :: Python Modules"
],
python_requires='>=3.6',
install_requires=[
"urllib3>=1.26.7",
"requests>=2.23.0",
"setuptools>=52.0.0"
],
extras_require={
'sphinx': [
'Sphinx>=3.4.0',
'sphinxcontrib-applehelp>=1.0.2',
'sphinxcontrib-devhelp>=1.0.2',
'sphinxcontrib-htmlhelp>=1.0.3',
'sphinxcontrib-jsmath>=1.0.1',
'sphinxcontrib-qthelp>=1.0.3',
'sphinxcontrib-serializinghtml>=1.1.4'
],
}
)