-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathsetup.py
More file actions
93 lines (85 loc) · 2.97 KB
/
setup.py
File metadata and controls
93 lines (85 loc) · 2.97 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
"""Setup script for Git Smart Squash."""
from setuptools import setup, find_packages
from setuptools.command.install import install
import os
import subprocess
import sys
# Read the contents of README file
this_directory = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(this_directory, 'README.md'), encoding='utf-8') as f:
long_description = f.read()
# Read version from VERSION file
with open(os.path.join(this_directory, 'git_smart_squash', 'VERSION')) as f:
version = f.read().strip()
# Define requirements directly
requirements = [
"pyyaml>=6.0",
"rich>=13.0.0",
"openai>=1.0.0",
"anthropic>=0.3.0",
"tiktoken>=0.5.0",
"google-genai>=0.0.1", # New Google AI SDK for Gemini support
]
class PostInstallCommand(install):
"""Custom post-installation command."""
def run(self):
install.run(self)
# Run post-install script to create default global config
try:
subprocess.check_call([sys.executable, "-c",
"from git_smart_squash.post_install import main; main()"])
except Exception as e:
print(f"Warning: Post-install setup failed: {e}", file=sys.stderr)
setup(
name="git-smart-squash",
version=version,
author="Evan Verma",
author_email="edverma@icloud.com",
description="Automatically reorganize messy git commit histories into clean, semantic commits",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/edverma/git-smart-squash",
packages=find_packages(),
include_package_data=True,
package_data={
'git_smart_squash': ['VERSION'],
},
classifiers=[
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Topic :: Software Development :: Version Control :: Git",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
],
python_requires=">=3.8",
install_requires=requirements,
extras_require={
"dev": [
"pytest>=7.0.0",
"pytest-cov>=4.0.0",
"black>=22.0.0",
"flake8>=5.0.0",
"mypy>=1.0.0",
],
},
entry_points={
"console_scripts": [
"git-smart-squash=git_smart_squash.cli:main",
"gss=git_smart_squash.cli:main", # Short alias
],
},
cmdclass={
'install': PostInstallCommand,
},
keywords="git, commit, squash, rebase, conventional-commits, ai",
project_urls={
"Bug Reports": "https://github.com/edverma/git-smart-squash/issues",
"Source": "https://github.com/edverma/git-smart-squash",
"Documentation": "https://github.com/edverma/git-smart-squash#readme",
},
)