summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames R. Barlow <jim@purplerock.ca>2017-10-27 23:14:18 -0700
committerJames R. Barlow <jim@purplerock.ca>2017-10-27 23:14:18 -0700
commit53dbe4d23ea6119a5ee602dd82a43650a1720f6d (patch)
tree1306bcae24e132fcc40267ed25495c5f70c51128
parent3be24c14005c4291f0393ffa263a2206eeecacb0 (diff)
Add missing test_requirements.txt, skip need for poppler
-rw-r--r--.travis.yml2
-rw-r--r--setup.py4
-rw-r--r--tests/test_parsers.py6
3 files changed, 8 insertions, 4 deletions
diff --git a/.travis.yml b/.travis.yml
index 4fce193..cba3305 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -27,7 +27,7 @@ before_install:
if [ -n "$GCC" ]; then
export CC="gcc-$GCC"
export CXX="g++-$GCC"
- export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/lib"
+ export LD_LIBRARY_PATH="/lib:/usr/lib:/usr/local/lib"
elif [ -n "$CLANG" ]; then
export CC="ccache clang-$CLANG"
export CXX="ccache clang++-$CLANG"
diff --git a/setup.py b/setup.py
index 154a4db..44af706 100644
--- a/setup.py
+++ b/setup.py
@@ -108,6 +108,9 @@ setup(
tests_require=tests_require,
package_dir={'': 'src'},
packages=setuptools.find_packages('src'),
+ package_data={
+ '': ['*.txt'],
+ },
classifiers=[
"Development Status :: 2 - Pre-Alpha",
"Intended Audience :: Developers",
@@ -115,7 +118,6 @@ setup(
"License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
- "Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: C++",
"Topic :: Multimedia :: Graphics",
diff --git a/tests/test_parsers.py b/tests/test_parsers.py
index c50061f..0588017 100644
--- a/tests/test_parsers.py
+++ b/tests/test_parsers.py
@@ -2,6 +2,7 @@ import pytest
from pikepdf import _qpdf as qpdf, parse_content_stream, Page
import os
from subprocess import run, PIPE
+import shutil
class PrintParser(qpdf.StreamParser):
@@ -39,16 +40,17 @@ def test_parser_exception(resources):
qpdf.Object.parse_stream(stream, ExceptionParser())
+@pytest.mark.skipif(
+ shutil.which('pdftotext') is None,
+ reason="poppler not installed")
def test_text_filter(resources, outdir):
input_pdf = resources / 'veraPDF test suite 6-2-10-t02-pass-a.pdf'
-
# Ensure the test PDF has detect we can find
proc = run(['pdftotext', str(input_pdf), '-'],
check=True, stdout=PIPE, encoding='utf-8')
assert proc.stdout.strip() != '', "Need input test file that contains text"
-
pdf = qpdf.Pdf.open(input_pdf)
stream = pdf.pages[0].Contents