On Tue, 5 Nov 2019 12:27:42 -0800 Steve Langasek
<steve.langa...@canonical.com> wrote:
However, after applying that patch, the package fails to build because:
- it tries to invoke python, which is not present. Fixed by setting
PYTHON=python3 in MAKEOPTS from debian/rules.
- the python3 pkgconfig handling is completely messed up in
python/setup.py; it tries to find a pkgconfig file in the system
directory (why, when it's part of the same source package we're just
building right now?), and when it doesn't find it, under python3 it
raises a different exception than ValueError, so the fallback code
doesn't work. And if I set PKG_CONFIG_PATH to point at the libbiosig.pc
in the parent directory, it just fails later at linking time because ../
isn't on the linker path.
I'm stopping my investigation there, it really looks like this needs some
upstream cleanup.
-- Steve Langasek Give me a lever long enough and a Free OS
Debian Developer to set it on, and I can move the world.
Ubuntu Developer https://www.debian.org/
slanga...@ubuntu.com vor...@debian.org
Dear Steve,
the attached patch should fix this problem.
Moreover, the dependency on python-pkgconfig (and pythen3-pkgconfig)
becomes obsolote.
Kind regards,
Alois
diff --git a/biosig4c++/python/setup.py b/biosig4c++/python/setup.py
index 556d306a..4e046e29 100644
--- a/biosig4c++/python/setup.py
+++ b/biosig4c++/python/setup.py
@@ -6,23 +6,12 @@ except ImportError:
from distutils.extension import Extension
import numpy.distutils.misc_util as mu
-try:
- import pkgconfig
- PKG=pkgconfig.parse('libbiosig')
- CPATH=PKG['include_dirs']
- LIBS=PKG['libraries']
- LIBDIR=PKG['library_dirs']
-except ValueError:
- print('cannot load pkgconfig(libbiosig) - use default location')
- CPATH='/usr/local/include'
- LIBS='-lbiosig'
- LIBDIR='/usr/local/lib'
module_biosig = Extension('biosig',
define_macros = [('MAJOR_VERSION', '1'), ('MINOR_VERSION', '9')],
- include_dirs = [CPATH, mu.get_numpy_include_dirs()[0]],
- libraries = LIBS,
- library_dirs = LIBDIR,
+ include_dirs = ['./..', mu.get_numpy_include_dirs()[0]],
+ libraries = ['biosig'],
+ library_dirs = ['./..'],
sources = ['biosigmodule.c'])
setup (name = 'Biosig',
@@ -34,6 +23,6 @@ setup (name = 'Biosig',
url = 'https://biosig.sourceforge.io',
long_description = '''This is the biosig demo package.''',
keywords = 'EEG ECG EKG EMG EOG Polysomnography ECoG biomedical signals SCP EDF GDF HEKA CFS ABF',
- install_requires=['numpy','pkgconfig','setuptools'],
+ install_requires=['numpy','setuptools'],
ext_modules = [module_biosig])