How to use the pkgconfig.modversion function in pkgconfig

To help you get started, we’ve selected a few pkgconfig examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github matze / pkgconfig / test_pkgconfig.py View on Github external
def test_modversion():
    assert pkgconfig.modversion(PACKAGE_NAME) == '3.2.1'
    assert pkgconfig.modversion('fake-openssl') == '1.1.0j'

    with pytest.raises(pkgconfig.PackageNotFoundError):
        pkgconfig.modversion('doesnotexist')
github matze / pkgconfig / test_pkgconfig.py View on Github external
def test_modversion():
    assert pkgconfig.modversion(PACKAGE_NAME) == '3.2.1'
    assert pkgconfig.modversion('fake-openssl') == '1.1.0j'

    with pytest.raises(pkgconfig.PackageNotFoundError):
        pkgconfig.modversion('doesnotexist')
github matze / pkgconfig / test_pkgconfig.py View on Github external
def test_modversion():
    assert pkgconfig.modversion(PACKAGE_NAME) == '3.2.1'
    assert pkgconfig.modversion('fake-openssl') == '1.1.0j'

    with pytest.raises(pkgconfig.PackageNotFoundError):
        pkgconfig.modversion('doesnotexist')
github monofox / python-aqbanking / setup.py View on Github external
depCompilationArgs = ['-Wunused-variable', '-Wunused-function', '-DPACKAGE_VERSION="' + PACKAGE_VERSION + '"']
depLibraryDirs = []
# check for aqbanking dependency
if not pkgconfig.exists('aqbanking'):
	sys.stderr.write('Need aqbanking development package installed for compilation.' + os.linesep)
	sys.exit(1)
else:
	for library in libraries:
		depCompilationArgs += pkgconfig.cflags(library).split(' ')
		depCompilationArgs += pkgconfig.libs(library).split(' ')
		libPath = pkgconfig.variables(library)['libdir']
		if libPath not in depLibraryDirs:
			depLibraryDirs.append(libPath)

	# furthermore remember the c++ gui!
	if StrictVersion(pkgconfig.modversion('aqbanking').replace('beta', '').replace('alpha', '')) >= StrictVersion('5.8.1'):
		depCompilationArgs.append('-DSUPPORT_APPREGISTRATION')

	#depCompilationArgs += ['-DFENQUEJOB']
	depCompilationArgs += ['-O0', '-g', '-std=gnu++11', '-Wunused-function', '-DDEBUGSTDERR']
	depCompilationArgs += ['-DAQBANKING6']
	depCompilationArgs += ['-DFINTS_REGISTRATION_KEY="2348723498724"']

module1 = Extension('aqbanking',
	#libraries = ['gwenhywfar', 'aqbanking', 'gwengui-cpp'],
	libraries = libraries + ['gwengui-cpp',],
	#include_dirs = ['/usr/include/gwenhywfar4', '/usr/include/aqbanking5', '/usr/local/include/gwenhywfar4', '/usr/local/include/aqbanking5'],
	# for compiling debug with python debug:
	#extra_compile_args=['-O0', '-g', '-Wunused-variable', '-std=gnu++11', '-DPy_DEBUG', '-Wunused-function', '-DDEBUG', '-DDEBUGSTDERR', '-DFENQUEJOB'],
	# for compiling debug without python debug
	#extra_compile_args=['-O0', '-g', '-Wunused-variable', '-std=gnu++11', '-Wunused-function', '-DDEBUGSTDERR', '-DFENQUEJOB'],
	# RELEASE parameter for compilation: