forked from byuawsfhtl/PyBugReporter
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
54 lines (45 loc) · 1.65 KB
/
setup.py
File metadata and controls
54 lines (45 loc) · 1.65 KB
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
import setuptools
import os
from PyBugReporter._version import __version__
with open("README.md", "r", encoding="utf-8") as fh:
longDescription = fh.read()
requirements = ""
with open("PyBugReporter/requirements.txt", "r", encoding="utf-8") as fh:
requirements = fh.read()
requirements = requirements.split("\n")
def listFolders(directory: str) -> list[str]:
"""Lists all folders in a directory and its subdirectories.
Args:
directory (str): the directory to search
Returns:
list[str]: the list of folders in the directory and its subdirectories
"""
folders = []
for item in os.listdir(directory):
itemPath = os.path.join(directory, item)
if os.path.isdir(itemPath) and item != "__pycache__":
folders.append(itemPath)
otherFolders = [listFolders(itemPath) for itemPath in folders]
for folder in otherFolders:
folders.extend(folder)
return folders
folderPath = "PyBugReporter"
folders = listFolders(folderPath)
folders.append("PyBugReporter")
print(folders)
setuptools.setup(
name='PyBugReporter',
version=__version__,
author='Record Linking Lab',
author_email='recordlinkinglab@gmail.com',
description='A python library for catching thrown exceptions and automatically creating issues on a GitHub repo.',
long_description=longDescription,
long_description_content_type="text/markdown",
url='https://github.com/byuawsfhtl/PyBugReporter.git',
project_urls = {
"Bug Tracker": "https://github.com/byuawsfhtl/PyBugReporter/issues"
},
packages=folders,
install_requires=requirements,
package_data={"": ["*.json", "*.txt"]},
)