Bug 229436 - [NEW PORT] devel/py-binaryornot: Lightweight pure Python package to check if a file is binary or not
Summary: [NEW PORT] devel/py-binaryornot: Lightweight pure Python package to check if ...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Martin Wilke
URL: https://pypi.org/project/binaryornot/
Keywords:
Depends on:
Blocks:
 
Reported: 2018-06-30 21:50 UTC by Kai Knoblich
Modified: 2018-07-28 11:59 UTC (History)
2 users (show)

See Also:


Attachments
py-binaryornot.patch (2.83 KB, patch)
2018-06-30 21:50 UTC, Kai Knoblich
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kai Knoblich freebsd_committer freebsd_triage 2018-06-30 21:50:13 UTC
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
Comment 1 Kai Knoblich freebsd_committer freebsd_triage 2018-06-30 22:14:03 UTC
Forgot to mention the make test results:

> Ran 46 tests in 4.394s
> 
> OK (expected failures=1)
Comment 2 commit-hook freebsd_committer freebsd_triage 2018-07-28 11:59:59 UTC
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