-
Notifications
You must be signed in to change notification settings - Fork 41
Expand file tree
/
Copy path_msbuild_test.py
More file actions
82 lines (79 loc) · 2.86 KB
/
_msbuild_test.py
File metadata and controls
82 lines (79 loc) · 2.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# Build script for test module. This is needed to run tests in-tree.
#
# python -m pymsbuild -c _msbuild_test.py
# python -m pytest
#
from pymsbuild import *
from pymsbuild.dllpack import *
METADATA = {
"Metadata-Version": "2.2",
"Name": "manage",
"Version": "1.0.0.0",
"Author": "Steve Dower",
"Author-email": "steve.dower@python.org",
"Summary": "Test build",
}
PACKAGE = Package('src',
DllPackage('_native_test',
PyFile('__init__.py'),
ItemDefinition("ClCompile",
PreprocessorDefinitions=Prepend("ERROR_LOCATIONS=1;BITS_INJECT_ERROR=1;"),
LanguageStandard="stdcpp20",
),
IncludeFile('*.h'),
CSourceFile('*.cpp'),
CFunction('coinitialize'),
CFunction('bits_connect'),
CFunction('bits_begin'),
CFunction('bits_cancel'),
CFunction('bits_get_progress'),
CFunction('bits_retry_with_auth'),
CFunction('bits_find_job'),
CFunction('bits_serialize_job'),
CFunction('bits_inject_error'), # only in tests
CFunction('winhttp_urlopen'),
CFunction('winhttp_isconnected'),
CFunction('winhttp_urlsplit'),
CFunction('winhttp_urlunsplit'),
CFunction('file_url_to_path'),
CFunction('file_lock_for_delete'),
CFunction('file_unlock_for_delete'),
CFunction('file_locked_delete'),
CFunction('package_get_root'),
CFunction('shortcut_create'),
CFunction('shortcut_default_cwd'),
CFunction('shortcut_get_start_programs'),
CFunction('hide_file'),
CFunction('fd_supports_vt100'),
CFunction('date_as_str'),
CFunction('datetime_as_str'),
CFunction('reg_rename_key'),
CFunction('get_current_package'),
CFunction('read_alias_package'),
CFunction('broadcast_settings_change'),
CFunction('get_processor_architecture'),
source='src/_native',
),
DllPackage('_shellext_test',
PyFile('_native/__init__.py'),
ItemDefinition('ClCompile',
PreprocessorDefinitions=Prepend("PYSHELLEXT_TEST=1;"),
LanguageStandard='stdcpp20',
),
ItemDefinition('Link', AdditionalDependencies=Prepend("RuntimeObject.lib;pathcch.lib;")),
CSourceFile('pyshellext/shellext.cpp'),
CSourceFile('pyshellext/shellext_test.cpp'),
IncludeFile('pyshellext/shellext.h'),
CSourceFile('_native/helpers.cpp'),
IncludeFile('_native/helpers.h'),
CFunction('shellext_RegReadStr'),
CFunction('shellext_ReadIdleInstalls'),
CFunction('shellext_ReadAllIdleInstalls'),
CFunction('shellext_PassthroughTitle'),
CFunction('shellext_IdleCommand'),
CFunction('shellext_GetDropArgumentsW'),
CFunction('shellext_GetDropArgumentsA'),
CFunction('shellext_GetDropDescription'),
source='src',
)
)