MCPcopy Index your code
hub / github.com/davispuh/MySQL-for-Python-3 / get_config

Function get_config

setup_windows.py:3–42  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1import os, sys
2
3def get_config():
4 from setup_common import get_metadata_and_options, enabled, create_release_file
5
6 metadata, options = get_metadata_and_options()
7
8 connector = options["connector"]
9
10 extra_objects = []
11
12 if enabled(options, 'embedded'):
13 client = "mysqld"
14 else:
15 client = "mysqlclient"
16
17 library_dirs = [ os.path.join(connector, r'lib\vs11') ]
18 libraries = [ 'kernel32', 'advapi32', 'wsock32', client ]
19 include_dirs = [ os.path.join(connector, r'include') ]
20 extra_compile_args = [ '/Zl' ]
21
22 name = "MySQL-python"
23 if enabled(options, 'embedded'):
24 name = name + "-embedded"
25 metadata['name'] = name
26
27 define_macros = [
28 ('version_info', metadata['version_info']),
29 ('__version__', metadata['version']),
30 ]
31 create_release_file(metadata)
32 del metadata['version_info']
33 ext_options = dict(
34 name = "_mysql",
35 library_dirs = library_dirs,
36 libraries = libraries,
37 extra_compile_args = extra_compile_args,
38 include_dirs = include_dirs,
39 extra_objects = extra_objects,
40 define_macros = define_macros,
41 )
42 return metadata, ext_options
43
44if __name__ == "__main__":
45 sys.stderr.write("""You shouldn't be running this directly; it is used by setup.py.""")

Callers 1

setup.pyFile · 0.90

Calls 3

get_metadata_and_optionsFunction · 0.90
enabledFunction · 0.90
create_release_fileFunction · 0.90

Tested by

no test coverage detected