Commit f12541a8 authored by Amir Mohammadi's avatar Amir Mohammadi

remove libnetpbm traces.

parent 3eebd70c
......@@ -15,7 +15,7 @@ matrix:
before_install:
- sudo add-apt-repository -y ppa:biometrics/bob
- sudo apt-get update -qq
- sudo apt-get install -qq --force-yes libboost-all-dev libblitz1-dev libjpeg8-dev libnetpbm10-dev libpng12-dev libtiff4-dev libgif-dev libhdf5-serial-dev libatlas-dev libatlas-base-dev liblapack-dev texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended
- sudo apt-get install -qq --force-yes libboost-all-dev libblitz1-dev libjpeg8-dev libpng12-dev libtiff4-dev libgif-dev libhdf5-serial-dev libatlas-dev libatlas-base-dev liblapack-dev texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended
- pip install --upgrade pip
- pip install --find-links https://www.idiap.ch/software/bob/wheels/travis/ --use-wheel sphinx nose coverage cpp-coveralls
- pip install --find-links https://www.idiap.ch/software/bob/wheels/travis/ --use-wheel -r requirements.txt --pre coveralls
......
......@@ -82,7 +82,6 @@ static PyObject* build_version_dictionary() {
auto retval_ = make_safe(retval);
if (!dict_steal(retval, "libjpeg", libjpeg_version())) return 0;
if (!dict_steal(retval, "libnetpbm", Py_BuildValue("s", "Unknown version"))) return 0;
if (!dict_steal(retval, "libpng", libpng_version())) return 0;
if (!dict_steal(retval, "libtiff", libtiff_version())) return 0;
if (!dict_steal(retval, "giflib", giflib_version())) return 0;
......
......@@ -32,7 +32,6 @@
.. _lapack: http://www.netlib.org/lapack
.. _latex: http://www.latex-project.org/
.. _libjpeg: http://libjpeg.sourceforge.net/
.. _libnetpbm: http://netpbm.sourceforge.net/doc/libnetpbm.html
.. _libpng: http://libpng.org/pub/png/libpng.html
.. _libsvm: http://www.csie.ntu.edu.tw/~cjlin/libsvm/
.. _libtiff: http://www.remotesensing.org/libtiff/
......
......@@ -328,90 +328,31 @@ class gif:
('%s_VERSION' % self.name.upper(), '"%s"' % self.version),
]
class netpbm:
def __init__ (self, only_static=False):
"""
Searches for netpbm in stock locations. Allows user to override.
If the user sets the environment variable BOB_PREFIX_PATH, that prefixes
the standard path locations.
Parameters:
only_static, boolean
A flag, that indicates if we intend to link against the static library
only. This will trigger our library search to disconsider shared
libraries when searching.
"""
self.name = 'netpbm'
header = 'pam.h'
candidates = find_header(header, subpaths=[self.name, ''])
if not candidates:
raise RuntimeError("could not find %s's `%s' - have you installed %s on this machine?" % (self.name, header, self.name))
self.include_directory = os.path.dirname(candidates[0])
found = True
# normalize
self.include_directory = os.path.normpath(self.include_directory)
# find library
prefix = os.path.dirname(os.path.dirname(self.include_directory))
module = 'netpbm'
candidates = find_library(module, prefixes=[prefix], only_static=only_static)
if not candidates:
raise RuntimeError("cannot find required %s binary module `%s' - make sure libsvm is installed on `%s'" % (self.name, module, prefix))
# libraries
self.libraries = []
name, ext = os.path.splitext(os.path.basename(candidates[0]))
if ext in ['.so', '.a', '.dylib', '.dll']:
self.libraries.append(name[3:]) #strip 'lib' from the name
else: #link against the whole thing
self.libraries.append(':' + os.path.basename(candidates[0]))
# library path
self.library_directory = os.path.dirname(candidates[0])
def macros(self):
return [ ('HAVE_%s' % self.name.upper(), '1'), ]
jpeg_pkg = jpeg()
tiff_pkg = tiff()
gif_pkg = gif()
netpbm_pkg = netpbm()
system_include_dirs = [
jpeg_pkg.include_directory,
tiff_pkg.include_directory,
gif_pkg.include_directory,
netpbm_pkg.include_directory,
]
library_dirs = [
jpeg_pkg.library_directory,
tiff_pkg.library_directory,
gif_pkg.library_directory,
netpbm_pkg.library_directory,
]
libraries = \
jpeg_pkg.libraries + \
tiff_pkg.libraries + \
gif_pkg.libraries + \
netpbm_pkg.libraries
gif_pkg.libraries
define_macros = \
jpeg_pkg.macros() + \
tiff_pkg.macros() + \
gif_pkg.macros() + \
netpbm_pkg.macros()
gif_pkg.macros()
setup(
......
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