nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 72 lines 1.5 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 charset-normalizer, 5 dateparser, 6 faust-cchardet, 7 fetchFromGitHub, 8 lxml, 9 pytestCheckHook, 10 python-dateutil, 11 setuptools, 12 urllib3, 13}: 14 15buildPythonPackage rec { 16 pname = "htmldate"; 17 version = "1.9.4"; 18 pyproject = true; 19 20 src = fetchFromGitHub { 21 owner = "adbar"; 22 repo = "htmldate"; 23 tag = "v${version}"; 24 hash = "sha256-ZSHQgj6zXmLdqDQWGnh2l70iXzdohsxdAIQGDSBufIA="; 25 }; 26 27 build-system = [ setuptools ]; 28 29 dependencies = [ 30 charset-normalizer 31 dateparser 32 lxml 33 python-dateutil 34 urllib3 35 ]; 36 37 pythonRelaxDeps = [ "lxml" ]; 38 39 optional-dependencies = { 40 speed = [ 41 faust-cchardet 42 urllib3 43 ] 44 ++ urllib3.optional-dependencies.brotli; 45 all = [ 46 faust-cchardet 47 urllib3 48 ] 49 ++ urllib3.optional-dependencies.brotli; 50 }; 51 52 nativeCheckInputs = [ pytestCheckHook ]; 53 54 disabledTests = [ 55 # Tests that require an internet connection 56 "test_input" 57 "test_cli" 58 "test_download" 59 "test_readme_examples" 60 ]; 61 62 pythonImportsCheck = [ "htmldate" ]; 63 64 meta = { 65 description = "Module for the extraction of original and updated publication dates from URLs and web pages"; 66 homepage = "https://htmldate.readthedocs.io"; 67 changelog = "https://github.com/adbar/htmldate/blob/${src.tag}/CHANGELOG.md"; 68 license = lib.licenses.asl20; 69 maintainers = with lib.maintainers; [ jokatzke ]; 70 mainProgram = "htmldate"; 71 }; 72}