Created attachment 194799 [details] py-binaryornot.patch Hello, attached is the patch for the Python package devel/py-binaryornot, which guesses whether a file is binary or text, using a heuristic similar to Perl's pp_fttext and its analysis. Tests are available for these file types: - Text formats: .txt, .css, .json, .svg, .js, .lua, .pl, .rst - Binary formats: .png, .gif, .jpg, .tiff, .bmp, .DS_Store, .eot, .otf, .ttf, It has also tests for numerous encodings. QA: ~~~ - poudriere (11.2-RELEASE amd64 + i386) for each py27 + py36 flavor -> OK - portlint -> OK
Forgot to mention the make test results: > Ran 46 tests in 4.394s > > OK (expected failures=1)
A commit references this bug: Author: miwi Date: Sat Jul 28 11:59:37 UTC 2018 New revision: 475526 URL: https://svnweb.freebsd.org/changeset/ports/475526 Log: Ultra-lightweight library to guess whether a file is binary or text, using a heuristic similar to Perl's pp_fttext and its analysis. Tests are available for these file types: - Text formats: .txt, .css, .json, .svg, .js, .lua, .pl, .rst - Binary formats: .png, .gif, .jpg, .tiff, .bmp, .DS_Store, .eot, .otf, .ttf, .woff, .rgb It has also tests for numerous encodings. WWW: https://github.com/audreyr/binaryornot PR: 229436 Submitted by: freebsd_ports@k-worx.org Sponsored by: iXsystems Inc. Changes: head/devel/Makefile head/devel/py-binaryornot/ head/devel/py-binaryornot/Makefile head/devel/py-binaryornot/distinfo head/devel/py-binaryornot/pkg-descr