-
-
Notifications
You must be signed in to change notification settings - Fork 12.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chardet: renamed from python-chardet
- Loading branch information
1 parent
67c7484
commit 5829ca1
Showing
3 changed files
with
22 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
class Chardet < Formula | ||
include Language::Python::Virtualenv | ||
|
||
desc "Python character encoding detector" | ||
homepage "https://chardet.readthedocs.io/en/latest/" | ||
url "https://files.pythonhosted.org/packages/f3/0d/f7b6ab21ec75897ed80c17d79b15951a719226b9fababf1e40ea74d69079/chardet-5.2.0.tar.gz" | ||
sha256 "1b3b6ff479a8c414bc3fa2c0852995695c4a026dcd6d0633b2dd092ca39c1cf7" | ||
license "LGPL-2.1-or-later" | ||
|
||
depends_on "[email protected]" | ||
|
||
def install | ||
virtualenv_install_with_resources | ||
end | ||
|
||
test do | ||
(testpath/"test.txt").write "你好" | ||
output = shell_output("#{bin}/chardetect #{testpath}/test.txt") | ||
assert_match "test.txt: utf-8 with confidence 0.7525", output | ||
end | ||
end |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters