Skip to content

Commit f4f095e

Browse files
feat: Add Homebrew formula and Python package definition for distribution.
1 parent 3698c94 commit f4f095e

File tree

5 files changed

+188
-1
lines changed

5 files changed

+188
-1
lines changed

Formula/git-chronoscope.rb

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# git-chronoscope Homebrew Formula
2+
# Install: brew install --build-from-source ./Formula/git-chronoscope.rb
3+
# Or via tap: brew tap user/git-chronoscope && brew install git-chronoscope
4+
5+
class GitChronoscope < Formula
6+
include Language::Python::Virtualenv
7+
8+
desc "Generate time-lapse visualizations of Git repository evolution"
9+
homepage "https://github.com/user/git-chronoscope"
10+
url "https://github.com/user/git-chronoscope/archive/refs/tags/v1.0.0.tar.gz"
11+
sha256 "PLACEHOLDER_SHA256_WILL_BE_UPDATED_ON_RELEASE"
12+
license "MIT"
13+
head "https://github.com/user/git-chronoscope.git", branch: "main"
14+
15+
depends_on "python@3.11"
16+
depends_on "ffmpeg"
17+
depends_on "git"
18+
19+
resource "GitPython" do
20+
url "https://files.pythonhosted.org/packages/source/G/GitPython/GitPython-3.1.40.tar.gz"
21+
sha256 "22b126e9ffb671fdd0c129796343a02f069a7e8a5abb0eb0c71d1a1b5d14db3c"
22+
end
23+
24+
resource "Pillow" do
25+
url "https://files.pythonhosted.org/packages/source/P/Pillow/Pillow-10.1.0.tar.gz"
26+
sha256 "e6bf8de6c36ed96c86ea3b6e1d5273c53f46ef518a062464cd7ef5dd2cf92e38"
27+
end
28+
29+
resource "Pygments" do
30+
url "https://files.pythonhosted.org/packages/source/P/Pygments/Pygments-2.17.2.tar.gz"
31+
sha256 "da46cec9fd2de5be3a8a784f434e4c4ab670b4ff54d605c4c2717e9d49c4c367"
32+
end
33+
34+
resource "tqdm" do
35+
url "https://files.pythonhosted.org/packages/source/t/tqdm/tqdm-4.66.1.tar.gz"
36+
sha256 "d88e651f9db8d8551a62556d3cff9e3034274ca5d66e93197cf2490e2dcb69c7"
37+
end
38+
39+
def install
40+
virtualenv_install_with_resources
41+
end
42+
43+
test do
44+
system bin/"git-chronoscope", "--help"
45+
end
46+
end
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# git-chronoscope Homebrew Formula for Tap Repository
2+
# This file is also available in Formula/git-chronoscope.rb
3+
4+
class GitChronoscope < Formula
5+
include Language::Python::Virtualenv
6+
7+
desc "Generate time-lapse visualizations of Git repository evolution"
8+
homepage "https://github.com/user/git-chronoscope"
9+
url "https://github.com/user/git-chronoscope/archive/refs/tags/v1.0.0.tar.gz"
10+
sha256 "PLACEHOLDER_SHA256_WILL_BE_UPDATED_ON_RELEASE"
11+
license "MIT"
12+
head "https://github.com/user/git-chronoscope.git", branch: "main"
13+
14+
depends_on "python@3.11"
15+
depends_on "ffmpeg"
16+
depends_on "git"
17+
18+
resource "GitPython" do
19+
url "https://files.pythonhosted.org/packages/source/G/GitPython/GitPython-3.1.40.tar.gz"
20+
sha256 "22b126e9ffb671fdd0c129796343a02f069a7e8a5abb0eb0c71d1a1b5d14db3c"
21+
end
22+
23+
resource "Pillow" do
24+
url "https://files.pythonhosted.org/packages/source/P/Pillow/Pillow-10.1.0.tar.gz"
25+
sha256 "e6bf8de6c36ed96c86ea3b6e1d5273c53f46ef518a062464cd7ef5dd2cf92e38"
26+
end
27+
28+
resource "Pygments" do
29+
url "https://files.pythonhosted.org/packages/source/P/Pygments/Pygments-2.17.2.tar.gz"
30+
sha256 "da46cec9fd2de5be3a8a784f434e4c4ab670b4ff54d605c4c2717e9d49c4c367"
31+
end
32+
33+
resource "tqdm" do
34+
url "https://files.pythonhosted.org/packages/source/t/tqdm/tqdm-4.66.1.tar.gz"
35+
sha256 "d88e651f9db8d8551a62556d3cff9e3034274ca5d66e93197cf2490e2dcb69c7"
36+
end
37+
38+
def install
39+
virtualenv_install_with_resources
40+
end
41+
42+
test do
43+
system bin/"git-chronoscope", "--help"
44+
end
45+
end

homebrew-tap/README.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Homebrew Tap for git-chronoscope
2+
3+
This repository contains the Homebrew formula for git-chronoscope.
4+
5+
## Installation
6+
7+
```bash
8+
# Add the tap
9+
brew tap user/git-chronoscope
10+
11+
# Install
12+
brew install git-chronoscope
13+
```
14+
15+
## Usage
16+
17+
After installation, you can use the `git-chronoscope` command:
18+
19+
```bash
20+
git-chronoscope /path/to/repo output.mp4
21+
```
22+
23+
## Updating
24+
25+
```bash
26+
brew update
27+
brew upgrade git-chronoscope
28+
```
29+
30+
## Uninstalling
31+
32+
```bash
33+
brew uninstall git-chronoscope
34+
brew untap user/git-chronoscope
35+
```
36+
37+
## From Source
38+
39+
To install from source without the tap:
40+
41+
```bash
42+
brew install --build-from-source /path/to/Formula/git-chronoscope.rb
43+
```

roadmap/distribution/02-homebrew-formula.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# Homebrew Formula
22

33
## Implementation Status
4-
**⏳ NOT IMPLEMENTED**
4+
**✅ IMPLEMENTED**
5+
- Implementation: `Formula/git-chronoscope.rb`, `setup.py`
56

67
## 1. Feature Description
78

setup.py

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
"""
2+
git-chronoscope: Generate time-lapse visualizations of Git repository evolution.
3+
"""
4+
from setuptools import setup, find_packages
5+
6+
with open("README.md", "r", encoding="utf-8") as fh:
7+
long_description = fh.read()
8+
9+
setup(
10+
name="git-chronoscope",
11+
version="1.0.0",
12+
author="Git Chronoscope Team",
13+
author_email="chronoscope@example.com",
14+
description="Generate time-lapse visualizations of Git repository evolution",
15+
long_description=long_description,
16+
long_description_content_type="text/markdown",
17+
url="https://github.com/user/git-chronoscope",
18+
packages=find_packages(),
19+
classifiers=[
20+
"Development Status :: 4 - Beta",
21+
"Intended Audience :: Developers",
22+
"Topic :: Software Development :: Version Control :: Git",
23+
"License :: OSI Approved :: MIT License",
24+
"Programming Language :: Python :: 3",
25+
"Programming Language :: Python :: 3.7",
26+
"Programming Language :: Python :: 3.8",
27+
"Programming Language :: Python :: 3.9",
28+
"Programming Language :: Python :: 3.10",
29+
"Programming Language :: Python :: 3.11",
30+
"Operating System :: OS Independent",
31+
],
32+
python_requires=">=3.7",
33+
install_requires=[
34+
"GitPython>=3.1.0",
35+
"Pillow>=9.0.0",
36+
"Pygments>=2.10.0",
37+
"tqdm>=4.60.0",
38+
],
39+
extras_require={
40+
"dev": [
41+
"pytest>=7.0.0",
42+
"pytest-cov>=4.0.0",
43+
],
44+
},
45+
entry_points={
46+
"console_scripts": [
47+
"git-chronoscope=src.main:main",
48+
],
49+
},
50+
include_package_data=True,
51+
zip_safe=False,
52+
)

0 commit comments

Comments
 (0)