mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2025-01-05 02:23:07 +03:00
Merge pull request #50308 from Synthetica9/arrelle-update
pythonPackages.arelle: 2017-08-24 -> 18.3
This commit is contained in:
commit
8f2d5e6d07
@ -1,13 +1,12 @@
|
|||||||
{ gui ? true,
|
{ gui ? true,
|
||||||
buildPythonPackage, fetchFromGitHub, lib,
|
buildPythonPackage, fetchFromGitHub, lib,
|
||||||
sphinx_1_2, lxml, isodate, numpy, pytest,
|
sphinx, lxml, isodate, numpy, pytest, openpyxl,
|
||||||
tkinter ? null, py3to2, isPy3k,
|
tkinter ? null, py3to2, isPy3k, python,
|
||||||
... }:
|
... }:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "arelle-${version}${lib.optionalString (!gui) "-headless"}";
|
pname = "arelle${lib.optionalString (!gui) "-headless"}";
|
||||||
version = "2017-08-24";
|
version = "18.3";
|
||||||
name = pname + "-" + version;
|
|
||||||
|
|
||||||
disabled = !isPy3k;
|
disabled = !isPy3k;
|
||||||
|
|
||||||
@ -16,8 +15,8 @@ buildPythonPackage rec {
|
|||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "Arelle";
|
owner = "Arelle";
|
||||||
repo = "Arelle";
|
repo = "Arelle";
|
||||||
rev = "cb24e35d57b562a864ae3dd4542c4d9fcf3865fe";
|
rev = "edgr${version}";
|
||||||
sha256 = "1sbvhb3xlfnyvf1xj9dxwpcrfiaf7ikkdwvvap7aaxfxgiz85ip2";
|
sha256 = "12a94ipdp6xalqyds7rcp6cjwps6fbj3byigzfy403hlqc9n1g33";
|
||||||
};
|
};
|
||||||
outputs = ["out" "doc"];
|
outputs = ["out" "doc"];
|
||||||
patches = [
|
patches = [
|
||||||
@ -25,7 +24,7 @@ buildPythonPackage rec {
|
|||||||
];
|
];
|
||||||
postPatch = "rm testParser2.py";
|
postPatch = "rm testParser2.py";
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
sphinx_1_2
|
sphinx
|
||||||
pytest
|
pytest
|
||||||
py3to2
|
py3to2
|
||||||
];
|
];
|
||||||
@ -33,6 +32,7 @@ buildPythonPackage rec {
|
|||||||
lxml
|
lxml
|
||||||
isodate
|
isodate
|
||||||
numpy
|
numpy
|
||||||
|
openpyxl
|
||||||
] ++ lib.optional gui [
|
] ++ lib.optional gui [
|
||||||
tkinter
|
tkinter
|
||||||
];
|
];
|
||||||
@ -40,6 +40,12 @@ buildPythonPackage rec {
|
|||||||
# arelle-gui is useless without gui dependencies, so delete it when !gui.
|
# arelle-gui is useless without gui dependencies, so delete it when !gui.
|
||||||
postInstall = lib.optionalString (!gui) ''
|
postInstall = lib.optionalString (!gui) ''
|
||||||
find $out/bin -name "*arelle-gui*" -delete
|
find $out/bin -name "*arelle-gui*" -delete
|
||||||
|
'' +
|
||||||
|
# By default, not the entirety of the src dir is copied. This means we don't
|
||||||
|
# copy the `images` dir, which is needed for the gui version.
|
||||||
|
lib.optionalString (gui) ''
|
||||||
|
targetDir=$out/${python.sitePackages}
|
||||||
|
cp -vr $src/arelle $targetDir
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# Documentation
|
# Documentation
|
||||||
@ -49,11 +55,14 @@ buildPythonPackage rec {
|
|||||||
|
|
||||||
doCheck = if gui then true else false;
|
doCheck = if gui then true else false;
|
||||||
|
|
||||||
meta = {
|
meta = with lib; {
|
||||||
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";
|
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";
|
||||||
homepage = http://arelle.org/;
|
homepage = http://arelle.org/;
|
||||||
license = lib.licenses.asl20;
|
license = licenses.asl20;
|
||||||
platforms = lib.platforms.all;
|
platforms = platforms.all;
|
||||||
maintainers = with lib.maintainers; [ roberth ];
|
maintainers = with maintainers; [ roberth ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -12,21 +12,3 @@ index a64bb1b..dc0299d 100644
|
|||||||
import gettext
|
import gettext
|
||||||
diff --git c/arelle/ValidateFilingText.py i/arelle/ValidateFilingText.py
|
diff --git c/arelle/ValidateFilingText.py i/arelle/ValidateFilingText.py
|
||||||
index 12dbbbb..c0e98c3 100644
|
index 12dbbbb..c0e98c3 100644
|
||||||
--- c/arelle/ValidateFilingText.py
|
|
||||||
+++ i/arelle/ValidateFilingText.py
|
|
||||||
@@ -16,7 +16,7 @@ XMLdeclaration = re.compile(r"<\?xml.*\?>", re.DOTALL)
|
|
||||||
XMLpattern = re.compile(r".*(<|<|<|<)[A-Za-z_]+[A-Za-z0-9_:]*[^>]*(/>|>|>|/>).*", re.DOTALL)
|
|
||||||
CDATApattern = re.compile(r"<!\[CDATA\[(.+)\]\]")
|
|
||||||
#EFM table 5-1 and all &xxx; patterns
|
|
||||||
-docCheckPattern = re.compile(r"&\w+;|[^0-9A-Za-z`~!@#$%&\*\(\)\.\-+ \[\]\{\}\|\\:;\"'<>,_?/=\t\n\r\m\f]") # won't match &#nnn;
|
|
||||||
+docCheckPattern = re.compile(r"&\w+;|[^0-9A-Za-z`~!@#$%&\*\(\)\.\-+ \[\]\{\}\|\\:;\"'<>,_?/=\t\n\r\f]") # won't match &#nnn;
|
|
||||||
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]"
|
|
||||||
r"[_\-\.:"
|
|
||||||
"\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]*;")
|
|
||||||
@@ -904,4 +904,4 @@ def referencedFiles(modelXbrl, localFilesOnly=True):
|
|
||||||
# footnote or other elements
|
|
||||||
for elt in modelXbrl.modelDocument.xmlRootElement.iter("{http://www.w3.org/1999/xhtml}a", "{http://www.w3.org/1999/xhtml}img"):
|
|
||||||
addReferencedFile(elt, elt)
|
|
||||||
- return referencedFiles
|
|
||||||
\ No newline at end of file
|
|
||||||
+ return referencedFiles
|
|
||||||
|
@ -3902,18 +3902,6 @@ in {
|
|||||||
|
|
||||||
sphinx = callPackage ../development/python-modules/sphinx { };
|
sphinx = callPackage ../development/python-modules/sphinx { };
|
||||||
|
|
||||||
sphinx_1_2 = self.sphinx.overridePythonAttrs rec {
|
|
||||||
name = "sphinx-1.2.3";
|
|
||||||
version = "1.2.3";
|
|
||||||
src = pkgs.fetchurl {
|
|
||||||
url = "mirror://pypi/s/sphinx/sphinx-1.2.3.tar.gz";
|
|
||||||
sha256 = "94933b64e2fe0807da0612c574a021c0dac28c7bd3c4a23723ae5a39ea8f3d04";
|
|
||||||
};
|
|
||||||
postPatch = '''';
|
|
||||||
# Tests requires Pygments >=2.0.2 which isn't worth keeping around for this:
|
|
||||||
doCheck = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
sphinxcontrib-websupport = callPackage ../development/python-modules/sphinxcontrib-websupport { };
|
sphinxcontrib-websupport = callPackage ../development/python-modules/sphinxcontrib-websupport { };
|
||||||
|
|
||||||
hieroglyph = callPackage ../development/python-modules/hieroglyph { };
|
hieroglyph = callPackage ../development/python-modules/hieroglyph { };
|
||||||
|
Loading…
Reference in New Issue
Block a user