lol

pythonPackages.arelle: 2017-08-24 -> 18.3

authored by

Patrick Hilhorst and committed by
Robert Schütz
eaef9bc7 e7ff7b93

+23 -32
+22 -13
pkgs/development/python-modules/arelle/default.nix
··· 1 1 { gui ? true, 2 2 buildPythonPackage, fetchFromGitHub, lib, 3 - sphinx_1_2, lxml, isodate, numpy, pytest, 4 - tkinter ? null, py3to2, isPy3k, 3 + sphinx, lxml, isodate, numpy, pytest, openpyxl, 4 + tkinter ? null, py3to2, isPy3k, python, 5 5 ... }: 6 6 7 7 buildPythonPackage rec { 8 - pname = "arelle-${version}${lib.optionalString (!gui) "-headless"}"; 9 - version = "2017-08-24"; 10 - name = pname + "-" + version; 8 + pname = "arelle${lib.optionalString (!gui) "-headless"}"; 9 + version = "18.3"; 11 10 12 11 disabled = !isPy3k; 13 12 ··· 16 15 src = fetchFromGitHub { 17 16 owner = "Arelle"; 18 17 repo = "Arelle"; 19 - rev = "cb24e35d57b562a864ae3dd4542c4d9fcf3865fe"; 20 - sha256 = "1sbvhb3xlfnyvf1xj9dxwpcrfiaf7ikkdwvvap7aaxfxgiz85ip2"; 18 + rev = "edgr${version}"; 19 + sha256 = "12a94ipdp6xalqyds7rcp6cjwps6fbj3byigzfy403hlqc9n1g33"; 21 20 }; 22 21 outputs = ["out" "doc"]; 23 22 patches = [ ··· 25 24 ]; 26 25 postPatch = "rm testParser2.py"; 27 26 buildInputs = [ 28 - sphinx_1_2 27 + sphinx 29 28 pytest 30 29 py3to2 31 30 ]; ··· 33 32 lxml 34 33 isodate 35 34 numpy 35 + openpyxl 36 36 ] ++ lib.optional gui [ 37 37 tkinter 38 38 ]; ··· 40 40 # arelle-gui is useless without gui dependencies, so delete it when !gui. 41 41 postInstall = lib.optionalString (!gui) '' 42 42 find $out/bin -name "*arelle-gui*" -delete 43 + '' + 44 + # By default, not the entirety of the src dir is copied. This means we don't 45 + # copy the `images` dir, which is needed for the gui version. 46 + lib.optionalString (gui) '' 47 + targetDir=$out/${python.sitePackages} 48 + cp -vr $src/arelle $targetDir 43 49 ''; 44 50 45 51 # Documentation ··· 49 55 50 56 doCheck = if gui then true else false; 51 57 52 - meta = { 53 - description = "An open source facility for XBRL, the eXtensible Business Reporting Language supporting various standards, exposed through a python or REST API" + lib.optionalString gui " and a graphical user interface"; 58 + meta = with lib; { 59 + description = '' 60 + An open source facility for XBRL, the eXtensible Business Reporting 61 + Language supporting various standards, exposed through a Python or 62 + REST API'' + lib.optionalString gui " and a graphical user interface"; 54 63 homepage = http://arelle.org/; 55 - license = lib.licenses.asl20; 56 - platforms = lib.platforms.all; 57 - maintainers = with lib.maintainers; [ roberth ]; 64 + license = licenses.asl20; 65 + platforms = platforms.all; 66 + maintainers = with maintainers; [ roberth ]; 58 67 }; 59 68 }
+1 -19
pkgs/development/python-modules/arelle/tests.patch
··· 3 3 --- c/arelle/CntlrProfiler.py 4 4 +++ i/arelle/CntlrProfiler.py 5 5 @@ -1,5 +1,6 @@ 6 - 6 + 7 7 -import Cntlr, ModelManager, FileSource, time 8 8 +from arelle import Cntlr, ModelManager, FileSource 9 9 +import time ··· 12 12 import gettext 13 13 diff --git c/arelle/ValidateFilingText.py i/arelle/ValidateFilingText.py 14 14 index 12dbbbb..c0e98c3 100644 15 - --- c/arelle/ValidateFilingText.py 16 - +++ i/arelle/ValidateFilingText.py 17 - @@ -16,7 +16,7 @@ XMLdeclaration = re.compile(r"<\?xml.*\?>", re.DOTALL) 18 - XMLpattern = re.compile(r".*(<|&lt;|&#x3C;|&#60;)[A-Za-z_]+[A-Za-z0-9_:]*[^>]*(/>|>|&gt;|/&gt;).*", re.DOTALL) 19 - CDATApattern = re.compile(r"<!\[CDATA\[(.+)\]\]") 20 - #EFM table 5-1 and all &xxx; patterns 21 - -docCheckPattern = re.compile(r"&\w+;|[^0-9A-Za-z`~!@#$%&\*\(\)\.\-+ \[\]\{\}\|\\:;\"'<>,_?/=\t\n\r\m\f]") # won't match &#nnn; 22 - +docCheckPattern = re.compile(r"&\w+;|[^0-9A-Za-z`~!@#$%&\*\(\)\.\-+ \[\]\{\}\|\\:;\"'<>,_?/=\t\n\r\f]") # won't match &#nnn; 23 - namedEntityPattern = re.compile("&[_A-Za-z\xC0-\xD6\xD8-\xF6\xF8-\xFF\u0100-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]" 24 - r"[_\-\.:" 25 - "\xB7A-Za-z0-9\xC0-\xD6\xD8-\xF6\xF8-\xFF\u0100-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u0300-\u036F\u203F-\u2040]*;") 26 - @@ -904,4 +904,4 @@ def referencedFiles(modelXbrl, localFilesOnly=True): 27 - # footnote or other elements 28 - for elt in modelXbrl.modelDocument.xmlRootElement.iter("{http://www.w3.org/1999/xhtml}a", "{http://www.w3.org/1999/xhtml}img"): 29 - addReferencedFile(elt, elt) 30 - - return referencedFiles 31 - \ No newline at end of file 32 - + return referencedFiles