Commit 07dd349a authored by Daniele Tricoli's avatar Daniele Tricoli 🦀

Build the Python3 package

parent d8cf86bd
......@@ -16,6 +16,12 @@ Build-Depends:
python-setuptools,
python-six,
python-sortedcontainers,
python3-all,
python3-chardet,
python3-nose,
python3-setuptools,
python3-six,
python3-sortedcontainers,
xsltproc,
Standards-Version: 4.2.1
Homepage: https://www.unixuser.org/~euske/python/pdfminer/
......@@ -42,6 +48,27 @@ Description: PDF parser and analyser
This package provides the Python module and the command-line tools: pdf2txt
and dumppdf.
Package: python3-pdfminer
Architecture: all
Depends:
${misc:Depends},
${python3:Depends},
python3-chardet,
Suggests:
pdfminer-data,
Breaks:
pdfminer-data (<< ${source:Version}),
Description: PDF parser and analyser (Python3)
PDFMiner is a tool for extracting information from PDF documents, which
focuses entirely on getting and analyzing text data. It allows one to obtain
the exact location of text portions in a page, as well as other information
such as fonts or lines. It includes a PDF converter that can transform PDF
files into other text formats (such as HTML). It has an extensible PDF parser
that can be used for other purposes than text analysis.
.
This package provides the Python3 module and the command-line tools: pdf2txt3
and dumppdf3.
Package: pdfminer-data
Architecture: all
Depends:
......
......@@ -2,14 +2,14 @@
export PYBUILD_NAME=pdfminer
export PYTHONWARNINGS=d
export PYBUILD_TEST_ARGS=--with-doctest pdfminer/*.py tests/test_pdfminer_*.py
export PYBUILD_TEST_ARGS=pdfminer/*.py tests/test_pdfminer_*.py
debroot = debian/tmp/
py2_libdir = /usr/lib/python2.7/dist-packages
py3_libdir = /usr/lib/python3/dist-packages
py2_libdir = usr/lib/python2.7/dist-packages
py3_libdir = usr/lib/python3/dist-packages
%:
dh $@ --with python2 --buildsystem=pybuild
dh $@ --with python2,python3 --buildsystem=pybuild
override_dh_auto_build:
$(MAKE) cmap
......@@ -17,14 +17,21 @@ override_dh_auto_build:
override_dh_auto_install:
pybuild --install -p 2.7
pybuild --install -p 3
rename.ul .py '' debian/python-pdfminer/usr/bin/*.py
# Provide the binaries only from Python3 package.
rm debian/python-pdfminer/usr/bin/*.py
# Move cmap files outside dist-packages
mkdir -p $(debroot)/usr/share/pdfminer/
mv debian/python-pdfminer/$(py2_libdir)/pdfminer/cmap/*.pickle.gz \
$(debroot)/usr/share/pdfminer/
rename.ul .py '' debian/python3-pdfminer/usr/bin/*.py
# Remove cmap in Python3 package since we use the ones generated during
# Python2 package build.
rm -rf debian/python-pdfminer/$(py3_libdir)/pdfminer/cmap
override_dh_installman:
$(MAKE) -C debian/manpages/
dh_installman
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment