python310Packages.filemagic: remove

This package is inactive: the last PyPI release was in 2013 and the last
GitHub activity was in 2014. It was introduced in 2019 for paperless,
but it's no longer used after paperless was replaced by paperless-ngx.

There is an actively maintained alternative called python-magic that is
already available in nixpkgs.
This commit is contained in:
Theodore Ni 2022-11-19 04:52:17 -08:00
parent d1c1328207
commit a2972fca8c
No known key found for this signature in database
GPG Key ID: 48B67583BDDD4474
4 changed files with 1 additions and 35 deletions

View File

@ -1,30 +0,0 @@
{ stdenv, lib, buildPythonPackage, fetchFromGitHub, file
, isPy3k, mock, unittest2 }:
buildPythonPackage {
pname = "filemagic";
version = "1.6";
disabled = !isPy3k; # asserts on ResourceWarning
# Don't use the PyPI source because it's missing files required for testing
src = fetchFromGitHub {
owner = "aliles";
repo = "filemagic";
rev = "138649062f769fb10c256e454a3e94ecfbf3017b";
sha256 = "1jxf928jjl2v6zv8kdnfqvywdwql1zqkm1v5xn1d5w0qjcg38d4n";
};
postPatch = ''
substituteInPlace magic/api.py --replace "ctypes.util.find_library('magic')" \
"'${file}/lib/libmagic${stdenv.hostPlatform.extensions.sharedLibrary}'"
'';
checkInputs = [ mock ] ++ lib.optionals (!isPy3k) [ unittest2 ];
meta = with lib; {
description = "File type identification using libmagic";
homepage = "https://github.com/aliles/filemagic";
license = licenses.asl20;
maintainers = with maintainers; [ erikarvstedt ];
};
}

View File

@ -4816,9 +4816,6 @@
"setuptools",
"setuptools-scm"
],
"filemagic": [
"setuptools"
],
"filetype": [
"setuptools"
],

View File

@ -77,6 +77,7 @@ mapAliases ({
face_recognition_models = face-recognition-models; # added 2022-10-15
fake_factory = throw "fake_factory has been removed because it is unused and deprecated by upstream since 2016."; # added 2022-05-30
faulthandler = throw "faulthandler is built into ${python.executable}"; # added 2021-07-12
filemagic = throw "inactive since 2014, so use python-magic instead"; # added 2022-11-19
flask_login = flask-login; # added 2022-10-17
flask_sqlalchemy = flask-sqlalchemy; # added 2022-07-20
flask_testing = flask-testing; # added 2022-04-25

View File

@ -3228,8 +3228,6 @@ self: super: with self; {
filelock = callPackage ../development/python-modules/filelock { };
filemagic = callPackage ../development/python-modules/filemagic { };
filetype = callPackage ../development/python-modules/filetype { };
filterpy = callPackage ../development/python-modules/filterpy { };