-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
56 lines (50 loc) · 1.79 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
#!/usr/bin/env python3
import os
from setuptools import setup, find_packages
# Repository name is the module name with dashes, ex. hit-py-template
# Module name can only contain underscores, so hit_py_template
# Also, configure the module under hit_py_template/__version__.py
repository_name = 'pytemplate'
module_name = 'pytemplate'
python_min_version = ">=3.6"
with open('requirements.txt', 'r') as f:
required_packages = f.read().splitlines()
# Get key package details
about = {} # type: ignore
here = os.path.abspath(os.path.dirname(__file__))
# Load the __version__.py file from the plugin directory
with open(os.path.join(here, 'src', module_name, '__version__.py')) as f:
exec(f.read(), about)
# Load the README file and use it as the long_description for PyPI
with open('README.md', 'r') as f:
readme = f.read()
# Package configuration - for reference see:
# https://setuptools.readthedocs.io/en/latest/setuptools.html#id9
setup(
name=about['__title__'],
description=about['__description__'],
long_description=readme,
long_description_content_type='text/markdown',
version=about['__version__'],
author=about['__author__'],
author_email=about['__author_email__'],
url=about['__url__'],
packages=find_packages(where="src"),
include_package_data=True,
python_requires=python_min_version,
install_requires=required_packages,
license=about['__license__'],
zip_safe=True,
package_dir={"": "src"},
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Operating System :: OS Independent",
],
keywords='python template package module cli',
entry_points = {
'console_scripts': [
'pytemplate=pytemplate.cli:main'
]
}
)