forked from nathro/AutoTransform
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
92 lines (80 loc) · 2.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
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
# AutoTransform
# Large scale, component based code modification library
#
# Licensed under the MIT License <http://opensource.org/licenses/MIT>
# SPDX-License-Identifier: MIT
# Copyright (c) 2022-present Nathan Rockenbach <http://github.com/nathro>
"""Sets up the build for AutoTransform."""
import os
from typing import List, Tuple
import setuptools
with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
def generate_datafiles() -> List[Tuple[str, List[str]]]:
"""Generates the data files for set-up
Returns:
List[Tuple[str, List[str]]]: The datafiles for setup.
"""
data_files = [
(
"autotransform-docs",
[
"BEST_PRACTICES.md",
"COMPONENTS.md",
"CONTRIBUTING.md",
"CUSTOM_DEPLOYMENT.md",
"MANAGE_CHANGES.md",
"README.md",
"SCHEDULED_RUNS.md",
],
)
]
for path, _, files in os.walk("examples"):
data_files.append((f"autotransform-{path}", [os.path.join(path, file) for file in files]))
return data_files
setuptools.setup(
name="AutoTransform",
version="1.1.1a13",
author="Nathan Rockenbach",
author_email="[email protected]",
description="A component based framework for designing automated code modification",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/nathro/AutoTransform",
project_urls={
"Source": "https://github.com/nathro/AutoTransform/",
"Bug Tracker": "https://github.com/nathro/AutoTransform/issues",
},
classifiers=[
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
],
keywords="codemod, automation, code change, codeshift, transformation, maintain",
package_dir={"": "src/python"},
packages=setuptools.find_packages("src/python"),
install_requires=[
"GitPython==3.1.32",
"ghapi==1.0.3",
"typing-extensions==4.4.0",
"colorama==0.4.6",
"pytz==2022.7.1",
"pydantic==1.10.4",
"libcst==0.4.9",
"requests==2.31.0",
"codeowners==0.6.0",
"openai==0.27.8",
],
python_requires=">=3.10",
data_files=generate_datafiles(),
entry_points={
"console_scripts": [
"autotransform = autotransform.scripts.main:main",
"atmigrate-1.0.1 = autotransform.scripts.migrations.p1_0_1:main",
"atmigrate-1.0.3 = autotransform.scripts.migrations.p1_0_3:main",
"atmigrate-1.0.5 = autotransform.scripts.migrations.p1_0_5:main",
],
},
)