-
-
Notifications
You must be signed in to change notification settings - Fork 12.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gitsome 0.8.0 (new formula) #46136
gitsome 0.8.0 (new formula) #46136
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
class Gitsome < Formula | ||
include Language::Python::Virtualenv | ||
|
||
desc "Supercharged Git/GitHub command-line interface (CLI)" | ||
homepage "https://github.com/donnemartin/gitsome" | ||
url "https://github.com/donnemartin/gitsome/archive/0.8.0.tar.gz" | ||
sha256 "6b0c9196d43c730b2d66ce39a78c25983661c2629ecc07f8bd50e92e25f8a841" | ||
|
||
depends_on "freetype" | ||
depends_on "jpeg" | ||
depends_on "python" | ||
|
||
resource "Pillow" do | ||
url "https://files.pythonhosted.org/packages/5b/bb/cdc8086db1f15d0664dd22a62c69613cdc00f1dd430b5b19df1bea83f2a3/Pillow-6.2.1.tar.gz" | ||
sha256 "bf4e972a88f8841d8fdc6db1a75e0f8d763e66e3754b03006cbc3854d89f1cb1" | ||
end | ||
|
||
def install | ||
venv = virtualenv_create(libexec, "python3") | ||
system libexec/"bin/pip", "install", ".[all]" | ||
system libexec/"bin/pip", "uninstall", "-y", "gitsome" | ||
|
||
if MacOS.version >= :mojave | ||
sdk_path = MacOS::CLT.installed? ? "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk" : MacOS.sdk_path | ||
end | ||
|
||
resource("Pillow").stage do | ||
inreplace "setup.py" do |s| | ||
s.gsub! "openjpeg.h", "probably_not_a_header_called_this_eh.h" | ||
s.gsub! "ZLIB_ROOT = None", "ZLIB_ROOT = ('#{sdk_path}/usr/lib', '#{sdk_path}/usr/include')" | ||
s.gsub! "JPEG_ROOT = None", "JPEG_ROOT = ('#{Formula["jpeg"].opt_prefix}/lib', '#{Formula["jpeg"].opt_prefix}/include')" | ||
s.gsub! "FREETYPE_ROOT = None", "FREETYPE_ROOT = ('#{Formula["freetype"].opt_prefix}/lib', '#{Formula["freetype"].opt_prefix}/include')" | ||
end | ||
venv.pip_install Pathname.pwd | ||
end | ||
|
||
venv.pip_install_and_link buildpath | ||
end | ||
|
||
test do | ||
system "#{bin}/gitsome", "--version" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We need a test that exercises the some of the functionality of the app. Version checks or usage checks ( In most cases, a good test would involve running a simple test case: run
Some advice for specific cases:
|
||
end | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We really want to have dependencies listed as resources, and install them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have same opinion with that, and I tried. But an error like the one I posted to issue of gitsome will occur.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This means you need to include the right version of
uritemplate
as a resource. Look at https://github.com/tdsmith/homebrew-pypi-poetThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://gist.github.com/imbsky/f483f91b031c681ba54443db3ebc7cbc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you figured out why
uritemplate.py
is not actually found?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found a similar issue, but I don't know if it's related.
SFDO-Tooling/CumulusCI#883
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have identified the cause, probably I need to change the gitsome code a little. The difficulty is low, but if @donnemartin doesn't have much time, I and my friend can fix it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@donnemartin What do you think?