-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
71 lines (60 loc) · 1.98 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
import io
import logging
import os
from os.path import dirname, abspath
from typing import List
from setuptools import Command, find_packages, setup
logger = logging.getLogger(__name__)
root_dir = dirname(abspath(__file__))
try:
with io.open(os.path.join(root_dir, "README.md"), encoding="utf-8") as f:
long_description = f.read()
except FileNotFoundError:
long_description = ""
class CleanCommand(Command):
"""
Command to tidy up the project root.
Registered as cmdclass in setup() so it can be called with
``python setup.py extra_clean``.
"""
description = "Tidy up the project root"
user_options: List[str] = []
def initialize_options(self):
"""Set default values for options."""
def finalize_options(self):
"""Set final values for options."""
def run(self):
"""Run command to remove temporary files and directories."""
os.chdir(root_dir)
os.system("rm -vrf ./build ./dist ./*.pyc ./*.tgz ./*.egg-info")
setup(
name="paperplane",
author="Abhilash Kishore",
author_email="[email protected]",
description="A simple interactive CLI builder",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/abhilash1in/paperplane",
license="MIT",
packages=find_packages(),
use_scm_version=True,
setup_requires=["setuptools_scm"],
# colorama enables ANSI colors support on Windows
# See https://click.palletsprojects.com/utils/
install_requires=["pyyaml", "click", "colorama"],
extras_require={
"docs": ["sphinx", "sphinx_rtd_theme", "recommonmark"],
},
entry_points={
"console_scripts": [
"paperplane=paperplane:main",
],
},
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
],
cmdclass={"extra_clean": CleanCommand},
python_requires=">=3.6",
)