git.iko.soy/typeable/nixpkgs
on master help sign in
pythonPackages.pdfminer_six: init at 20170720
commitb37cb1de2b6051a3b65fb14e22ca10a30fb5955d authornagato.pain <iuns@outlook.fr> dateMon 28 May 2018, 17:15 (8 years ago) parent04a2885
2 files changed+36
pkgs/development/python-modules/pdfminer_six/default.nix+34 pkgs/top-level/python-packages.nix+2
pkgs/development/python-modules/pdfminer_six/default.nixnew file+34
@@ -0,0 +1,34 @@
1+{ stdenv, buildPythonPackage, fetchFromGitHub, six, pycryptodome, chardet, nose, pytest }:
2+
3+buildPythonPackage rec {
4+ pname = "pdfminer_six";
5+ version = "20170720";
6+
7+ src = fetchFromGitHub {
8+ owner = "pdfminer";
9+ repo = "pdfminer.six";
10+ rev = "${version}";
11+ sha256 = "0vax5k0a8qn8x86ybpzqydk7x3hajsk8b6xf3y610j19mgag6wvs";
12+ };
13+
14+ propagatedBuildInputs = [ six pycryptodome chardet ];
15+
16+ checkInputs = [ nose pytest ];
17+ checkPhase = ''
18+ # some crappy hack to ensure the test do not fail for python3
19+ # for some reason importing from the folder tools fails :\
20+ cp tools/dumppdf.py tests/
21+ cp tools/pdf2txt.py tests/
22+ sed -i '/from tools import dumppdf/c\ import dumppdf' tests/test_tools_dumppdf.py
23+ sed -i '/import tools.pdf2txt as pdf2txt/c\import pdf2txt as pdf2txt' tests/test_tools_pdf2txt.py
24+ pytest
25+ '';
26+
27+ meta = with stdenv.lib; {
28+ description = "fork of PDFMiner using six for Python 2+3 compatibility";
29+ homepage = https://github.com/pdfminer/pdfminer.six;
30+ license = licenses.mit;
31+ maintainers = with maintainers; [ psyanticy ];
32+ };
33+}
34+
pkgs/top-level/python-packages.nix+2
@@ -311,6 +311,8 @@ in {
311311
312312 outcome = callPackage ../development/python-modules/outcome {};
313313
314+ pdfminer_six = callPackage ../development/python-modules/pdfminer_six { };
315+
314316 plantuml = callPackage ../tools/misc/plantuml { };
315317
316318 Pmw = callPackage ../development/python-modules/Pmw { };