python310Packages.cchardet: Drop in favor of faust-cchardet

The former packages has seen its last release in 2020-10 and can be
considered abandoned. Meanwhile a new fork has appeared in
faust-cchardet, that we're going to use in its place.

Co-Authored-By: Robert Schütz <nix@dotlambda.de>
This commit is contained in:
Martin Weinelt 2023-03-02 15:17:40 +01:00
parent f0443b2843
commit 1bd4b71a35
12 changed files with 15 additions and 73 deletions

View file

@ -99,11 +99,11 @@ stdenv.mkDerivation rec {
setupPyBuildFlags = [ "--enable=load_extension" ]; setupPyBuildFlags = [ "--enable=load_extension" ];
})) }))
beautifulsoup4 beautifulsoup4
cchardet
css-parser css-parser
cssselect cssselect
python-dateutil python-dateutil
dnspython dnspython
faust-cchardet
feedparser feedparser
html2text html2text
html5-parser html5-parser

View file

@ -14,7 +14,7 @@
, aiosignal , aiosignal
, aiodns , aiodns
, brotli , brotli
, cchardet , faust-cchardet
, asynctest , asynctest
, typing-extensions , typing-extensions
, idna-ssl , idna-ssl
@ -66,7 +66,7 @@ buildPythonPackage rec {
aiosignal aiosignal
aiodns aiodns
brotli brotli
cchardet faust-cchardet
] ++ lib.optionals (pythonOlder "3.8") [ ] ++ lib.optionals (pythonOlder "3.8") [
asynctest asynctest
typing-extensions typing-extensions

View file

@ -1,57 +0,0 @@
{ lib
, stdenv
, buildPythonPackage
, fetchPypi
, cython
, nose
}:
buildPythonPackage rec {
pname = "cchardet";
version = "2.1.7";
format = "setuptools";
src = fetchPypi {
inherit pname version;
sha256 = "c428b6336545053c2589f6caf24ea32276c6664cb86db817e03a94c60afa0eaf";
};
nativeBuildInputs = [
cython # pending https://github.com/PyYoshi/cChardet/pull/78 being released to PyPI
];
pythonImportsCheck = [
"cchardet"
];
nativeCheckInputs = [ nose ];
# on non x86-64 some charsets are identified as their superset, so we skip these tests (last checked with version 2.1.7)
preCheck = ''
cp -R src/tests $TMPDIR
pushd $TMPDIR
'' + lib.optionalString (stdenv.hostPlatform.system != "x86_64-linux") ''
rm $TMPDIR/tests/testdata/th/tis-620.txt # identified as iso-8859-11, which is fine for all practical purposes
rm $TMPDIR/tests/testdata/ga/iso-8859-1.txt # identified as windows-1252, which is fine for all practical purposes
rm $TMPDIR/tests/testdata/fi/iso-8859-1.txt # identified as windows-1252, which is fine for all practical purposes
'';
checkPhase = ''
runHook preCheck
nosetests
runHook postCheck
'';
postCheck = ''
popd
'';
meta = {
description = "High-speed universal character encoding detector";
homepage = "https://github.com/PyYoshi/cChardet";
license = lib.licenses.mpl11;
maintainers = with lib.maintainers; [ ivan ];
};
}

View file

@ -1,8 +1,8 @@
{ lib { lib
, buildPythonPackage , buildPythonPackage
, fetchFromGitHub , fetchFromGitHub
, cchardet
, chardet , chardet
, faust-cchardet
, pandas , pandas
, regex , regex
, tabview , tabview
@ -28,8 +28,8 @@ buildPythonPackage rec {
''; '';
propagatedBuildInputs = [ propagatedBuildInputs = [
cchardet
chardet chardet
faust-cchardet
pandas pandas
regex regex
tabview tabview

View file

@ -9,7 +9,7 @@
, aiohttp , aiohttp
, aiodns , aiodns
, brotli , brotli
, cchardet , faust-cchardet
, orjson , orjson
, pynacl , pynacl
}: }:
@ -41,7 +41,7 @@ buildPythonPackage rec {
aiodns aiodns
aiohttp aiohttp
brotli brotli
cchardet faust-cchardet
orjson orjson
pynacl pynacl
]; ];

View file

@ -5,7 +5,7 @@
, attrs , attrs
, brotlipy , brotlipy
, buildPythonPackage , buildPythonPackage
, cchardet , faust-cchardet
, click , click
, colorama , colorama
, fetchFromGitHub , fetchFromGitHub
@ -47,9 +47,9 @@ buildPythonPackage rec {
async-timeout async-timeout
attrs attrs
brotlipy brotlipy
cchardet
click click
colorama colorama
faust-cchardet
halo halo
requests requests
rich rich

View file

@ -33,7 +33,7 @@ python3.pkgs.buildPythonApplication rec {
azure-mgmt-storage azure-mgmt-storage
azure-storage-blob azure-storage-blob
bcrypt bcrypt
cchardet faust-cchardet
deepdiff deepdiff
feedparser feedparser
iso8601 iso8601

View file

@ -40,7 +40,7 @@ with python.pkgs; buildPythonApplication rec {
autobahn autobahn
fb-re2 fb-re2
websockets websockets
cchardet faust-cchardet
]; ];
checkPhase = '' checkPhase = ''

View file

@ -18,7 +18,7 @@
# aiohttp[speedups] # aiohttp[speedups]
, aiodns , aiodns
, brotlipy , brotlipy
, cchardet , faust-cchardet
, pillow , pillow
, pytestCheckHook , pytestCheckHook
, xmlschema , xmlschema
@ -57,7 +57,7 @@ buildPythonApplication rec {
# aiohttp[speedups] # aiohttp[speedups]
aiodns aiodns
brotlipy brotlipy
cchardet faust-cchardet
# needed by brotlipy # needed by brotlipy
pillow pillow
setuptools setuptools

View file

@ -24,9 +24,9 @@ python3.pkgs.buildPythonApplication rec {
aiodns aiodns
aiohttp aiohttp
appdirs appdirs
cchardet
click click
colorama colorama
faust-cchardet
prompt-toolkit prompt-toolkit
xpath-expressions xpath-expressions
]; ];

View file

@ -50,6 +50,7 @@ mapAliases ({
bt_proximity = bt-proximity; # added 2021-07-02 bt_proximity = bt-proximity; # added 2021-07-02
BTrees = btrees; # added 2023-02-19 BTrees = btrees; # added 2023-02-19
carrot = throw "carrot has been removed, as its development was discontinued in 2012"; # added 2022-01-18 carrot = throw "carrot has been removed, as its development was discontinued in 2012"; # added 2022-01-18
cchardet = faust-cchardet; # added 2023-03-02
class-registry = phx-class-registry; # added 2021-10-05 class-registry = phx-class-registry; # added 2021-10-05
codespell = throw "codespell has been promoted to a top-level attribute"; # Added 2022-10-02 codespell = throw "codespell has been promoted to a top-level attribute"; # Added 2022-10-02
ColanderAlchemy = colanderalchemy; # added 2023-02-19 ColanderAlchemy = colanderalchemy; # added 2023-02-19

View file

@ -1621,8 +1621,6 @@ self: super: with self; {
cccolutils = callPackage ../development/python-modules/cccolutils { }; cccolutils = callPackage ../development/python-modules/cccolutils { };
cchardet = callPackage ../development/python-modules/cchardet { };
cdcs = callPackage ../development/python-modules/cdcs { }; cdcs = callPackage ../development/python-modules/cdcs { };
celery = callPackage ../development/python-modules/celery { }; celery = callPackage ../development/python-modules/celery { };