python.pkgs.filetype: init at 1.0.2

This commit is contained in:
Robert Schütz 2019-01-31 19:10:45 +01:00
parent 451c11f89f
commit 902809eac6
2 changed files with 32 additions and 0 deletions

View file

@ -0,0 +1,30 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, python
}:
buildPythonPackage rec {
pname = "filetype";
version = "1.0.2";
# No tests in PyPI tarball
# See https://github.com/h2non/filetype.py/pull/33
src = fetchFromGitHub {
owner = "h2non";
repo = "filetype.py";
rev = "v${version}";
sha256 = "000gl3q2cadfnmqnbxg31ppc3ak8blzb4nfn75faxbp7b6r5qgr2";
};
checkPhase = ''
${python.interpreter} -m unittest discover
'';
meta = with lib; {
description = "Infer file type and MIME type of any file/buffer";
homepage = https://github.com/h2non/filetype.py;
license = licenses.mit;
maintainers = with maintainers; [ dotlambda ];
};
}

View file

@ -1745,6 +1745,8 @@ in {
fb-re2 = callPackage ../development/python-modules/fb-re2 { };
filetype = callPackage ../development/python-modules/filetype { };
flexmock = callPackage ../development/python-modules/flexmock { };
flit = callPackage ../development/python-modules/flit { };