-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
executable file
·76 lines (72 loc) · 2.5 KB
/
setup.py
File metadata and controls
executable file
·76 lines (72 loc) · 2.5 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
"""
Setup script for Recator - Code Duplicate Detection and Refactoring Library
"""
from setuptools import setup, find_packages
from pathlib import Path
import re
# Read the README file
this_directory = Path(__file__).parent
long_description = (this_directory / "README.md").read_text() if (this_directory / "README.md").exists() else ""
def read_version() -> str:
init_py = this_directory / "recator" / "__init__.py"
if not init_py.exists():
return "0.0.0"
text = init_py.read_text(encoding="utf-8")
m = re.search(r"^__version__\s*=\s*['\"]([^'\"]+)['\"]", text, re.M)
if not m:
raise RuntimeError("Could not find __version__ in recator/__init__.py")
return m.group(1)
setup(
name="recator",
version=read_version(),
author="Recator Team",
author_email="recator@example.com",
description="Automated code duplicate detection and refactoring library",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/pyfunc/recator",
packages=["recator"],
classifiers=[
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Software Development :: Quality Assurance",
"Topic :: Software Development :: Code Generators",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Operating System :: OS Independent",
],
python_requires=">=3.7",
install_requires=[
# No external dependencies for basic functionality
# Using only Python standard library
],
extras_require={
"dev": [
"pytest>=6.0",
"pytest-cov>=2.0",
"black>=21.0",
"flake8>=3.9",
"mypy>=0.9",
"build>=1.0.0",
"twine>=4.0.0",
],
"advanced": [
"tree-sitter>=0.20", # For better AST parsing
"pygments>=2.10", # For syntax highlighting
"click>=8.0", # For better CLI
]
},
entry_points={
"console_scripts": [
"recator=recator.cli:main",
],
},
include_package_data=True,
zip_safe=False,
)