8000 Merge pull request #2 from realpython/pypi-setup · realpython/rptree@8d12517 · GitHub
[go: up one dir, main page]

Skip to content

Commit 8d12517

Browse files
authored
Merge pull request #2 from realpython/pypi-setup
Pypi setup
2 parents 50ae47b + 2541257 commit 8d12517

File tree

6 files changed

+63
-23
lines changed

6 files changed

+63
-23
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2020 Real Python
3+
Copyright (c) 2021 Real Python
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
include LICENSE

rptree/__main__.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
"""This module provides the RP Tree CLI."""
2+
3+
import pathlib
4+
import sys
5+
6+
from .cli import parse_cmd_line_arguments
7+
from .rptree import DirectoryTree
8+
9+
10+
def main():
11+
args = parse_cmd_line_arguments()
12+
root_dir = pathlib.Path(args.root_dir)
13+
if not root_dir.is_dir():
14+
print("The specified root directory doesn't exist")
15+
sys.exit()
16+
tree = DirectoryTree(
17+
root_dir, dir_only=args.dir_only, output_file=args.output_file
18+
)
19+
tree.generate()
20+
21+
22+
if __name__ == "__main__":
23+
main()

rptree/cli.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,9 @@
11
"""This module provides the RP Tree CLI."""
22

33
import argparse
4-
import pathlib
54
import sys
65

76
from . import __version__
8-
from .rptree import DirectoryTree
9-
10-
11-
def main():
12-
args = parse_cmd_line_arguments()
13-
root_dir = pathlib.Path(args.root_dir)
14-
if not root_dir.is_dir():
15-
print("The specified root directory doesn't exist")
16-
sys.exit()
17-
tree = DirectoryTree(
18-
root_dir, dir_only=args.dir_only, output_file=args.output_file
19-
)
20-
tree.generate()
217

228

239
def parse_cmd_line_arguments():

setup.py

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
import pathlib
2+
from setuptools import setup
3+
4+
from rptree import __version__
5+
6+
HERE = pathlib.Path().cwd()
7+
DESCRIPTION = HERE.joinpath("README.md").read_text()
8+
VERSION = __version__
9+
10+
11+
setup(
12+
name="rptree",
13+
version=VERSION,
14+
description="Generate directory tree diagrams for Real Python articles",
15+
long_description=DESCRIPTION,
16+
long_description_content_type="text/markdown",
17+
url="https://github.com/realpython/rptree",
18+
author="Real Python",
19+
author_email="info@realpython.com",
20+
maintainer="Leodanis Pozo Ramos",
21+
maintainer_email="leodanis@realpython.com",
22+
license="MIT",
23+
classifiers=[
24+
"License :: OSI Approved :: MIT License",
25+
"Programming Language :: Python :: 3",
26+
"Programming Language :: Python :: 3.7",
27+
"Programming Language :: Python :: 3.8",
28+
"Programming Language :: Python :: 3.9",
29+
"Programming Language :: Python :: Implementation :: CPython",
30+
],
31+
packages=["rptree"],
32+
include_package_data=True,
33+
entry_points={
34+
"console_scripts": [
35+
"rptree=rptree.__main__:main",
36+
]
37+
},
38+
)

tree.py

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)
0