1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5
6 # build-system
7 setuptools,
8
9 # dependencies
10 feedparser,
11 requests,
12
13 # tests
14 mock,
15 pytestCheckHook,
16}:
17buildPythonPackage rec {
18 pname = "arxiv";
19 version = "2.2.0";
20 pyproject = true;
21
22 src = fetchFromGitHub {
23 owner = "lukasschwab";
24 repo = "arxiv.py";
25 tag = version;
26 hash = "sha256-/lXUWRJ1lbRPWUC/gMRA0NIcuV0HNzFlUVLyhcPAsCQ=";
27 };
28
29 build-system = [ setuptools ];
30
31 dependencies = [
32 feedparser
33 requests
34 ];
35
36 nativeCheckInputs = [
37 pytestCheckHook
38 mock
39 ];
40
41 disabledTests = [
42 # Require network access
43 "test_from_feed_entry"
44 "test_download_from_query"
45 "test_download_tarfile_from_query"
46 "test_download_with_custom_slugify_from_query"
47 "test_get_short_id"
48 "test_invalid_format_id"
49 "test_invalid_id"
50 "test_legacy_ids"
51 "test_max_results"
52 "test_missing_title"
53 "test_no_duplicates"
54 "test_nonexistent_id_in_list"
55 "test_offset"
56 "test_query_page_count"
57 "test_result_shape"
58 "test_search_results_offset"
59 ];
60
61 pythonImportsCheck = [ "arxiv" ];
62
63 meta = {
64 description = "Python wrapper for the arXiv API";
65 homepage = "https://github.com/lukasschwab/arxiv.py";
66 changelog = "https://github.com/lukasschwab/arxiv.py/releases/tag/${src.tag}";
67 license = lib.licenses.mit;
68 maintainers = [ lib.maintainers.octvs ];
69 };
70}