cppmake 29__py3-none-any.whl → 31__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- cppmake/__main__.py +41 -1
- {cppmake-29.dist-info → cppmake-31.dist-info}/METADATA +1 -1
- cppmake-31.dist-info/RECORD +6 -0
- cppmake-29.dist-info/RECORD +0 -6
- {cppmake-29.dist-info → cppmake-31.dist-info}/WHEEL +0 -0
- {cppmake-29.dist-info → cppmake-31.dist-info}/entry_points.txt +0 -0
- {cppmake-29.dist-info → cppmake-31.dist-info}/top_level.txt +0 -0
cppmake/__main__.py
CHANGED
|
@@ -1,5 +1,45 @@
|
|
|
1
1
|
from cppmakelib import *
|
|
2
2
|
|
|
3
3
|
def main():
|
|
4
|
+
if not exist_dir("package/std"):
|
|
5
|
+
create_dir("package/std/module")
|
|
6
|
+
open("package/std/cppmake.py", 'w').write(default_std_cppmake)
|
|
7
|
+
open("package/std/module/std.cpp", 'w').write(default_std_module)
|
|
4
8
|
Package("std").build()
|
|
5
|
-
|
|
9
|
+
|
|
10
|
+
if Package("main").cppmake is not None:
|
|
11
|
+
getattr(Package("main").cppmake, config.target)()
|
|
12
|
+
else: # default
|
|
13
|
+
Source("main").compile()
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
default_std_cppmake = \
|
|
17
|
+
"""
|
|
18
|
+
from cppmakelib import *
|
|
19
|
+
|
|
20
|
+
if type(compiler) == Clang or type(compiler) == Emcc:
|
|
21
|
+
package.compile_flags += [
|
|
22
|
+
"-Wno-include-angled-in-module-purview",
|
|
23
|
+
"-Wno-reserved-module-identifier"
|
|
24
|
+
]
|
|
25
|
+
|
|
26
|
+
def build():
|
|
27
|
+
std_module = compiler.std_module()
|
|
28
|
+
create_dir(package.include_dir)
|
|
29
|
+
copy_dir(parent_path(std_module), package.include_dir)
|
|
30
|
+
with open(std_module, 'r') as reader:
|
|
31
|
+
content = reader.read().split("export module std;")
|
|
32
|
+
with open(f"{package.include_dir}/include", 'w') as writer:
|
|
33
|
+
writer.write(content[0].replace("module;", ""))
|
|
34
|
+
with open(f"{package.include_dir}/export", 'w') as writer:
|
|
35
|
+
writer.write(content[1])
|
|
36
|
+
"""
|
|
37
|
+
|
|
38
|
+
default_std_module = \
|
|
39
|
+
"""
|
|
40
|
+
module;
|
|
41
|
+
#include <include>
|
|
42
|
+
|
|
43
|
+
export module std;
|
|
44
|
+
#include <export>
|
|
45
|
+
"""
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
cppmake/__main__.py,sha256=JJTSjmtnoEblvH3oSOgJHyokRVarHJR7vhOSnLUE85M,1260
|
|
2
|
+
cppmake-31.dist-info/METADATA,sha256=4CoASlXsjx2Gj3Ol2dj0iwDwJ2cnTXGWs4_YulSYCb8,267
|
|
3
|
+
cppmake-31.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
4
|
+
cppmake-31.dist-info/entry_points.txt,sha256=dK_4GLQPM14Sb1Fawz8fzllNitvsv24n91WpaH-h_m8,50
|
|
5
|
+
cppmake-31.dist-info/top_level.txt,sha256=uH5XeYydYK0aWCewtK8qf5yjSkXO2tvS9qguV8GVRp0,8
|
|
6
|
+
cppmake-31.dist-info/RECORD,,
|
cppmake-29.dist-info/RECORD
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
cppmake/__main__.py,sha256=YYe4X0DmPB1m8uVztBeNQyGQkBFfLMp7hY4ic-NqFPk,118
|
|
2
|
-
cppmake-29.dist-info/METADATA,sha256=TdXABKasLem0_p7A9MGqZFFY3W_UY3rDshCki-82yd0,267
|
|
3
|
-
cppmake-29.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
4
|
-
cppmake-29.dist-info/entry_points.txt,sha256=dK_4GLQPM14Sb1Fawz8fzllNitvsv24n91WpaH-h_m8,50
|
|
5
|
-
cppmake-29.dist-info/top_level.txt,sha256=uH5XeYydYK0aWCewtK8qf5yjSkXO2tvS9qguV8GVRp0,8
|
|
6
|
-
cppmake-29.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|