Merge pull request #158038 from fabaff/bump-filetype
This commit is contained in:
commit
f49908fcc9
2 changed files with 90 additions and 35 deletions
|
@ -6,11 +6,11 @@
|
|||
|
||||
buildPythonPackage rec {
|
||||
pname = "filetype";
|
||||
version = "1.0.9";
|
||||
version = "1.0.10";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "7124e1bc6a97ffc7c6bead5b8fb2e129baf312a9e60db5772bc27c741799d475";
|
||||
sha256 = "sha256-MjoTUAcxtsZaJTvDkwu86aVt+6cekLYP/ZaKtp2a6Tc=";
|
||||
};
|
||||
|
||||
checkPhase = ''
|
||||
|
|
|
@ -1,66 +1,121 @@
|
|||
{ lib, buildPythonPackage, fetchFromGitHub, xdg-utils
|
||||
, requests, filetype, pyparsing, configparser, arxiv2bib
|
||||
, pyyaml, chardet, beautifulsoup4, colorama, bibtexparser
|
||||
, click, python-slugify, habanero, isbnlib, typing-extensions
|
||||
, prompt-toolkit, pygments, stevedore, tqdm, lxml
|
||||
, python-doi, isPy3k, pytest-cov
|
||||
#, optional, dependencies
|
||||
, whoosh, pytest
|
||||
{ lib
|
||||
, stdenv
|
||||
, arxiv2bib
|
||||
, beautifulsoup4
|
||||
, bibtexparser
|
||||
, buildPythonPackage
|
||||
, chardet
|
||||
, click
|
||||
, colorama
|
||||
, configparser
|
||||
, fetchFromGitHub
|
||||
, filetype
|
||||
, habanero
|
||||
, isbnlib
|
||||
, lxml
|
||||
, prompt-toolkit
|
||||
, pygments
|
||||
, pyparsing
|
||||
, pytestCheckHook
|
||||
, python-doi
|
||||
, python-slugify
|
||||
, pythonAtLeast
|
||||
, pythonOlder
|
||||
, pyyaml
|
||||
, requests
|
||||
, stevedore
|
||||
, tqdm
|
||||
, typing-extensions
|
||||
, whoosh
|
||||
, xdg-utils
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "papis";
|
||||
version = "0.11.1";
|
||||
disabled = !isPy3k;
|
||||
format = "setuptools";
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
# Missing tests on Pypi
|
||||
src = fetchFromGitHub {
|
||||
owner = "papis";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "0bbkjyw1fsvvp0380l404h2lys8ib4xqga5s6401k1y1hld28nl6";
|
||||
hash = "sha256-hlokGoXBhxkAMbqohztZEWlPBSSAUIAGuHtrF7iXcy0=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
requests filetype pyparsing configparser arxiv2bib
|
||||
pyyaml chardet beautifulsoup4 colorama bibtexparser
|
||||
click python-slugify habanero isbnlib
|
||||
prompt-toolkit pygments typing-extensions
|
||||
stevedore tqdm lxml
|
||||
arxiv2bib
|
||||
beautifulsoup4
|
||||
bibtexparser
|
||||
chardet
|
||||
click
|
||||
colorama
|
||||
configparser
|
||||
filetype
|
||||
habanero
|
||||
isbnlib
|
||||
lxml
|
||||
prompt-toolkit
|
||||
pygments
|
||||
pyparsing
|
||||
python-doi
|
||||
# optional dependencies
|
||||
python-slugify
|
||||
pyyaml
|
||||
requests
|
||||
stevedore
|
||||
tqdm
|
||||
typing-extensions
|
||||
whoosh
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace setup.py \
|
||||
--replace "lxml<=4.3.5" "lxml~=4.3" \
|
||||
--replace "isbnlib>=3.9.1,<3.10" "isbnlib~=3.9" \
|
||||
--replace "python-slugify>=1.2.6,<4" "python-slugify"
|
||||
--replace "isbnlib>=3.9.1,<3.10" "isbnlib>=3.9"
|
||||
substituteInPlace setup.cfg \
|
||||
--replace "--cov=papis" ""
|
||||
'';
|
||||
|
||||
doCheck = !stdenv.isDarwin;
|
||||
# Tests are failing on Python > 3.9
|
||||
doCheck = !stdenv.isDarwin && !(pythonAtLeast "3.10");
|
||||
|
||||
checkInputs = ([
|
||||
pytest pytest-cov
|
||||
pytestCheckHook
|
||||
]) ++ [
|
||||
xdg-utils
|
||||
];
|
||||
|
||||
# most of the downloader tests and 4 other tests require a network connection
|
||||
# test_export_yaml and test_citations check for the exact output produced by pyyaml 3.x and
|
||||
# fail with 5.x
|
||||
checkPhase = ''
|
||||
HOME=$(mktemp -d) pytest papis tests --ignore tests/downloaders \
|
||||
-k "not test_get_data and not test_doi_to_data and not test_general and not get_document_url \
|
||||
and not test_validate_arxivid and not test_downloader_getter and not match"
|
||||
preCheck = ''
|
||||
export HOME=$(mktemp -d);
|
||||
'';
|
||||
|
||||
meta = {
|
||||
pytestFlagsArray = [
|
||||
"papis tests"
|
||||
];
|
||||
|
||||
disabledTestPaths = [
|
||||
"tests/downloaders"
|
||||
];
|
||||
|
||||
disabledTests = [
|
||||
"get_document_url"
|
||||
"match"
|
||||
"test_doi_to_data"
|
||||
"test_downloader_getter"
|
||||
"test_general"
|
||||
"test_get_data"
|
||||
"test_validate_arxivid"
|
||||
"test_yaml"
|
||||
];
|
||||
|
||||
pythonImportsCheck = [
|
||||
"papis"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Powerful command-line document and bibliography manager";
|
||||
homepage = "https://papis.readthedocs.io/en/latest/";
|
||||
license = lib.licenses.gpl3;
|
||||
maintainers = with lib.maintainers; [ nico202 teto ];
|
||||
homepage = "https://papis.readthedocs.io/";
|
||||
license = licenses.gpl3Only;
|
||||
maintainers = with maintainers; [ nico202 teto ];
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue