121 lines
4.8 KiB
Ruby
121 lines
4.8 KiB
Ruby
class Gitless < Formula
|
|
include Language::Python::Virtualenv
|
|
|
|
desc "Simplified version control system on top of git"
|
|
homepage "https://gitless.com/"
|
|
url "https://files.pythonhosted.org/packages/9c/2e/457ae38c636c5947d603c84fea1cf51b7fcd0c8a5e4a9f2899b5b71534a0/gitless-0.8.8.tar.gz"
|
|
sha256 "590d9636d2ca743fdd972d9bf1f55027c1d7bc2ab1d5e877868807c3359b78ef"
|
|
license "MIT"
|
|
revision 11
|
|
|
|
bottle do
|
|
sha256 cellar: :any, arm64_monterey: "9819d2fec72194b54351868a51f4723e7cc52d30a705e0a0df4837b7aba776e5"
|
|
sha256 cellar: :any, arm64_big_sur: "31bdb3def00769e084c2495713c6040fafdd0d5fc121752f03f9f3dfc02f27eb"
|
|
sha256 cellar: :any, monterey: "24456786dc00e0f79bfd4cc750f889098867b283c3dce55f5089ac27a4f2cb70"
|
|
sha256 cellar: :any, big_sur: "e6b4053e9773249c6f2339f050669540839c12eadc2527894a979d8d8d751e0a"
|
|
sha256 cellar: :any, catalina: "0fec481286ed89b56ed9ee85215deb4257e77bdbacd1334aad08978aff76daed"
|
|
sha256 cellar: :any_skip_relocation, x86_64_linux: "50400bcb61bd87e814c7bd7b9ff172ee82b4d10417f9c55e676c3302b4839408"
|
|
end
|
|
|
|
depends_on "libgit2"
|
|
depends_on "python@3.10"
|
|
|
|
uses_from_macos "libffi"
|
|
|
|
on_linux do
|
|
depends_on "pkg-config" => :build
|
|
end
|
|
|
|
resource "args" do
|
|
url "https://files.pythonhosted.org/packages/e5/1c/b701b3f4bd8d3667df8342f311b3efaeab86078a840fb826bd204118cc6b/args-0.1.0.tar.gz"
|
|
sha256 "a785b8d837625e9b61c39108532d95b85274acd679693b71ebb5156848fcf814"
|
|
end
|
|
|
|
resource "cached-property" do
|
|
url "https://files.pythonhosted.org/packages/57/8e/0698e10350a57d46b3bcfe8eff1d4181642fd1724073336079cb13c5cf7f/cached-property-1.5.1.tar.gz"
|
|
sha256 "9217a59f14a5682da7c4b8829deadbfc194ac22e9908ccf7c8820234e80a1504"
|
|
end
|
|
|
|
resource "cffi" do
|
|
url "https://files.pythonhosted.org/packages/66/6a/98e023b3d11537a5521902ac6b50db470c826c682be6a8c661549cb7717a/cffi-1.14.4.tar.gz"
|
|
sha256 "1a465cbe98a7fd391d47dce4b8f7e5b921e6cd805ef421d04f5f66ba8f06086c"
|
|
end
|
|
|
|
resource "clint" do
|
|
url "https://files.pythonhosted.org/packages/3d/b4/41ecb1516f1ba728f39ee7062b9dac1352d39823f513bb6f9e8aeb86e26d/clint-0.5.1.tar.gz"
|
|
sha256 "05224c32b1075563d0b16d0015faaf9da43aa214e4a2140e51f08789e7a4c5aa"
|
|
end
|
|
|
|
resource "pycparser" do
|
|
url "https://files.pythonhosted.org/packages/8c/2d/aad7f16146f4197a11f8e91fb81df177adcc2073d36a17b1491fd09df6ed/pycparser-2.18.tar.gz"
|
|
sha256 "99a8ca03e29851d96616ad0404b4aad7d9ee16f25c9f9708a11faf2810f7b226"
|
|
end
|
|
|
|
resource "pygit2" do
|
|
url "https://files.pythonhosted.org/packages/6b/23/a8c5b726a58282fe2cadcc63faaddd4be147c3c8e0bd38b233114adf98fd/pygit2-1.6.1.tar.gz"
|
|
sha256 "c3303776f774d3e0115c1c4f6e1fc35470d15f113a7ae9401a0b90acfa1661ac"
|
|
|
|
# libgit2 1.3 support
|
|
# https://github.com/libgit2/pygit2/pull/1089
|
|
patch do
|
|
url "https://raw.githubusercontent.com/Homebrew/formula-patches/54d3a0d1f241fdd4e9229312ced0d8da85d964b1/pygit2/libgit2-1.3.0.patch"
|
|
sha256 "4d501c09d6642d50d89a1a4d691980e3a4a2ebcb6de7b45d22cce16a451b9839"
|
|
end
|
|
end
|
|
|
|
resource "sh" do
|
|
url "https://files.pythonhosted.org/packages/7c/71/199d27d3e7e78bf448bcecae0105a1d5b29173ffd2bbadaa95a74c156770/sh-1.12.14.tar.gz"
|
|
sha256 "b52bf5833ed01c7b5c5fb73a7f71b3d98d48e9b9b8764236237bdc7ecae850fc"
|
|
end
|
|
|
|
resource "six" do
|
|
url "https://files.pythonhosted.org/packages/16/d8/bc6316cf98419719bd59c91742194c111b6f2e85abac88e496adefaf7afe/six-1.11.0.tar.gz"
|
|
sha256 "70e8a77beed4562e7f14fe23a786b54f6296e34344c23bc42f07b15018ff98e9"
|
|
end
|
|
|
|
# Allow to be dependent on pygit2 1.4.0
|
|
# Remove for next version
|
|
patch :DATA
|
|
|
|
def install
|
|
virtualenv_install_with_resources
|
|
end
|
|
|
|
test do
|
|
system "git", "config", "--global", "user.email", '"test@example.com"'
|
|
system "git", "config", "--global", "user.name", '"Test"'
|
|
system bin/"gl", "init"
|
|
%w[haunted house].each { |f| touch testpath/f }
|
|
system bin/"gl", "track", "haunted", "house"
|
|
system bin/"gl", "commit", "-m", "Initial Commit"
|
|
assert_equal "haunted\nhouse", shell_output("git ls-files").strip
|
|
end
|
|
end
|
|
|
|
__END__
|
|
diff --git a/requirements.txt b/requirements.txt
|
|
index 05f190a..5eb025f 100644
|
|
--- a/requirements.txt
|
|
+++ b/requirements.txt
|
|
@@ -1,6 +1,6 @@
|
|
# make sure to update setup.py
|
|
|
|
-pygit2==0.28.2 # requires libgit2 0.28
|
|
+pygit2==1.4.0 # requires libgit2 0.28
|
|
clint==0.5.1
|
|
sh==1.12.14;sys_platform!='win32'
|
|
pbs==0.110;sys_platform=='win32'
|
|
diff --git a/setup.py b/setup.py
|
|
index 68a3a87..d1704a8 100755
|
|
--- a/setup.py
|
|
+++ b/setup.py
|
|
@@ -68,7 +68,7 @@ setup(
|
|
packages=['gitless', 'gitless.cli'],
|
|
install_requires=[
|
|
# make sure it matches requirements.txt
|
|
- 'pygit2==0.28.2', # requires libgit2 0.28
|
|
+ 'pygit2==1.4.0', # requires libgit2 0.28
|
|
'clint>=0.3.6',
|
|
'sh>=1.11' if sys.platform != 'win32' else 'pbs>=0.11'
|
|
],
|