-
-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
Conversation
For reasons similar to dvc, we use this installation method because some features doesn't work with the common installation method of brew. |
The actual error was posted here. donnemartin/gitsome#136 |
I will add code to install Pillow to support image-related features. |
25a10b7
to
51a20cb
Compare
|
||
def install | ||
venv = virtualenv_create(libexec, "python3") | ||
system libexec/"bin/pip", "install", ".[all]" |
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.
pkg_resources.DistributionNotFound: The 'uritemplate.py<4.0.0,>=1.0.0' distribution was not found and is required by gitsome
This means you need to include the right version of uritemplate
as a resource. Look at https://github.com/tdsmith/homebrew-pypi-poet
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.
Hmm...
resource "uritemplate" do
url "https://files.pythonhosted.org/packages/cd/db/f7b98cdc3f81513fb25d3cbe2501d621882ee81150b745cdd1363278c10a/uritemplate-3.0.0.tar.gz"
sha256 "c02643cebe23fc8adb5e6becffe201185bf06c40bda5c0b4028a93f1527d011d"
end
resource "uritemplate.py" do
url "https://files.pythonhosted.org/packages/12/97/e12695c7d7710143767022ce931061b4a6b5b19982b20ecf5d71cdde3da1/uritemplate.py-3.0.2.tar.gz"
sha256 "e0cdeb0f55ec18e1580974e8017cd188549aacc2aba664ae756adb390b9d45b4"
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.
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?
end | ||
|
||
test do | ||
system "#{bin}/gitsome", "--version" |
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 need a test that exercises the some of the functionality of the app. Version checks or usage checks (foo --version
or foo --help
) are not sufficient, as explained in the formula cookbook.
In most cases, a good test would involve running a simple test case: run #{bin}/foo input.txt
.
- Then you can check that the output is as expected (with
assert_equal
orassert_match
on the output ofshell_output
) - You can also check that an output file was created, if that is expected:
assert_predicate testpath/"output.txt", :exist?
Some advice for specific cases:
- If the formula is a library, compile and run some simple code that links against it. It could be taken from upstream's documentation / source examples.
- If the formula is for a GUI program, try to find some function that runs as command-line only, like a format conversion, reading or displaying a config file, etc.
- If the software cannot function without credentials, a test could be to try to connect with invalid credentials (or without credentials) and confirm that it fails as expected.
- Same if the software requires a virtual machine, docker instance, etc. to be running.
Let us know when you've addressed the concerns above. For now, we're currently building Python 3.8 (see #45337), which involves revision bumping almost all Python formulae, so we're going to wait on this until that's finished to avoid broken formulae. I'll let you know when we're ready. |
I see. This is an upstream issue, so I will wait for the author's reply. |
Closing for now, due to lack of progress. |
brew install --build-from-source <formula>
, where<formula>
is the name of the formula you're submitting?brew test <formula>
, where<formula>
is the name of the formula you're submitting?brew audit --strict <formula>
(after doingbrew install <formula>
)?