Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
opts.add_argument('--static', dest = 'static', action = 'store_true',
default = False,
help = 'Output libraries suitable for static linking')
opts.add_argument('--dump', dest = 'dump', action = 'store_true',
default = False,
help = 'Dump the package if one is found.')
args = opts.parse_args(argv[1:])
if (args.exists and (args.exact_version or args.max_version)) or \
(args.exact_version and (args.exists or args.max_version)) or \
(args.max_version and (args.exists or args.exact_version)):
raise error('only one of --exists, --exact-version, or --max-version')
if args.dont_define_prefix:
args.prefix = pkgconfig.default_prefix(False)
exists = False
ec = 1
if args.atleast_pkgconfig_version:
ec = 0
else:
ec, pkg, flags = pkgconfig.check_package(args.libraries, args, log, src)
if ec == 0:
if args.cflags:
if len(flags['cflags']):
print(flags['cflags'])
log('cflags: %s' % (flags['cflags']))
else:
log('cflags: empty')
action = version_action, nargs = 1, default = None,
help = 'The package is at least this version.')
opts.add_argument('--exact-version', dest = 'exact_version', action = version_action,
nargs = 1, default = None,
help = 'The package is the exact version.')
opts.add_argument('--max-version', dest = 'max_version', action = version_action,
nargs = 1, default = None,
help = 'The package is no later than this version.')
opts.add_argument('--msvc-syntax', dest = 'msvc_syntax', action = 'store_true',
default = False,
help = 'Ignored')
opts.add_argument('--dont-define-prefix', dest = 'dont_define_prefix', action = 'store_true',
default = False,
help = 'Ignored')
opts.add_argument('--prefix-variable', dest = 'prefix', action = 'store',
nargs = 1, default = pkgconfig.default_prefix(),
help = 'Define the prefix.')
opts.add_argument('--static', dest = 'static', action = 'store_true',
default = False,
help = 'Output libraries suitable for static linking')
opts.add_argument('--dump', dest = 'dump', action = 'store_true',
default = False,
help = 'Dump the package if one is found.')
args = opts.parse_args(argv[1:])
if (args.exists and (args.exact_version or args.max_version)) or \
(args.exact_version and (args.exists or args.max_version)) or \
(args.max_version and (args.exists or args.exact_version)):
raise error('only one of --exists, --exact-version, or --max-version')
if args.dont_define_prefix: