writers: add writeGuile[Bin] (#364531)
[NixPkgs.git] / pkgs / development / python-modules / papis / default.nix
blobc2f4b8f21d6d0fb73aa2c3b71b4446bc5ffc5d22
2   lib,
3   buildPythonPackage,
4   fetchFromGitHub,
6   # build-system
7   hatchling,
9   # dependencies
10   arxiv,
11   beautifulsoup4,
12   bibtexparser,
13   click,
14   colorama,
15   dominate,
16   filetype,
17   habanero,
18   isbnlib,
19   lxml,
20   platformdirs,
21   prompt-toolkit,
22   pygments,
23   pyparsing,
24   python-doi,
25   python-slugify,
26   pyyaml,
27   requests,
28   stevedore,
30   # tests
31   docutils,
32   git,
33   pytestCheckHook,
34   sphinx,
35   sphinx-click,
37 buildPythonPackage rec {
38   pname = "papis";
39   version = "0.14";
40   pyproject = true;
42   src = fetchFromGitHub {
43     owner = "papis";
44     repo = "papis";
45     rev = "refs/tags/v${version}";
46     hash = "sha256-UpZoMYk4URN8tSFGIynVzWMk+9S0izROAgbx6uI2cN8=";
47   };
49   build-system = [ hatchling ];
51   dependencies = [
52     arxiv
53     beautifulsoup4
54     bibtexparser
55     click
56     colorama
57     dominate
58     filetype
59     habanero
60     isbnlib
61     lxml
62     platformdirs
63     prompt-toolkit
64     pygments
65     pyparsing
66     python-doi
67     python-slugify
68     pyyaml
69     requests
70     stevedore
71   ];
73   postPatch = ''
74     substituteInPlace pyproject.toml \
75       --replace-fail "--cov=papis" ""
76   '';
78   pythonImportsCheck = [ "papis" ];
80   nativeCheckInputs = [
81     docutils
82     git
83     pytestCheckHook
84     sphinx
85     sphinx-click
86   ];
88   preCheck = ''
89     export HOME=$(mktemp -d);
90   '';
92   pytestFlagsArray = [
93     "papis"
94     "tests"
95   ];
97   disabledTestPaths = [
98     # Require network access
99     "tests/downloaders"
100     "papis/downloaders/usenix.py"
101   ];
103   disabledTests = [
104     # Require network access
105     "test_yaml_unicode_dump"
106   ];
108   meta = {
109     description = "Powerful command-line document and bibliography manager";
110     mainProgram = "papis";
111     homepage = "https://papis.readthedocs.io/";
112     changelog = "https://github.com/papis/papis/blob/v${version}/CHANGELOG.md";
113     license = lib.licenses.gpl3Only;
114     maintainers = with lib.maintainers; [
115       nico202
116       teto
117     ];
118   };