cppmake 0.2.0__tar.gz → 1__tar.gz
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-0.2.0 → cppmake-1}/PKG-INFO +2 -1
- cppmake-1/cppmake/__main__.py +47 -0
- {cppmake-0.2.0 → cppmake-1}/cppmake.egg-info/PKG-INFO +2 -1
- {cppmake-0.2.0 → cppmake-1}/cppmake.egg-info/SOURCES.txt +1 -1
- cppmake-1/cppmake.egg-info/requires.txt +1 -0
- {cppmake-0.2.0 → cppmake-1}/pyproject.toml +4 -4
- cppmake-0.2.0/cppmake/__init__.py +0 -27
- cppmake-0.2.0/cppmake/__main__.py +0 -4
- {cppmake-0.2.0 → cppmake-1}/cppmake.egg-info/dependency_links.txt +0 -0
- {cppmake-0.2.0 → cppmake-1}/cppmake.egg-info/entry_points.txt +0 -0
- {cppmake-0.2.0 → cppmake-1}/cppmake.egg-info/top_level.txt +0 -0
- {cppmake-0.2.0 → cppmake-1}/setup.cfg +0 -0
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cppmake
|
|
3
|
-
Version:
|
|
3
|
+
Version: 1
|
|
4
4
|
Summary: A modern C++ builder based on C++20 Modules.
|
|
5
5
|
Author-email: anonymouspc <shyeyian@petalmail.com>
|
|
6
6
|
License-Expression: MIT
|
|
7
7
|
Requires-Python: >=3.13
|
|
8
8
|
Description-Content-Type: text/markdown
|
|
9
|
+
Requires-Dist: cppmakelib
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
from cppmakelib import *
|
|
2
|
+
|
|
3
|
+
def main():
|
|
4
|
+
if not exist_dir("package/std"): # install std as default
|
|
5
|
+
create_dir("package/std/module")
|
|
6
|
+
open ("package/std/module/std.cpp", 'w').write(default_std_module)
|
|
7
|
+
open ("package/std/cppmake.py", 'w').write(default_std_cppmake)
|
|
8
|
+
Package("std").build()
|
|
9
|
+
|
|
10
|
+
if Package("main").cppmake is not None:
|
|
11
|
+
getattr(Package("main").cppmake, config.target)()
|
|
12
|
+
else: # compile Source("main") as default
|
|
13
|
+
Source("main").compile()
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
default_std_module = \
|
|
19
|
+
"""
|
|
20
|
+
module;
|
|
21
|
+
#include <include>
|
|
22
|
+
|
|
23
|
+
export module std;
|
|
24
|
+
#include <export>
|
|
25
|
+
"""
|
|
26
|
+
|
|
27
|
+
default_std_cppmake = \
|
|
28
|
+
"""
|
|
29
|
+
from cppmakelib import *
|
|
30
|
+
|
|
31
|
+
if type(compiler) == Clang or type(compiler) == Emcc:
|
|
32
|
+
package.compile_flags += [
|
|
33
|
+
"-Wno-include-angled-in-module-purview",
|
|
34
|
+
"-Wno-reserved-module-identifier"
|
|
35
|
+
]
|
|
36
|
+
|
|
37
|
+
def build():
|
|
38
|
+
std_module = compiler.std_module()
|
|
39
|
+
create_dir(package.include_dir)
|
|
40
|
+
copy_dir(parent_path(std_module), package.include_dir)
|
|
41
|
+
with open(std_module, 'r') as reader:
|
|
42
|
+
content = reader.read().split("export module std;")
|
|
43
|
+
with open(f"{package.include_dir}/include", 'w') as writer:
|
|
44
|
+
writer.write(content[0].replace("module;", ""))
|
|
45
|
+
with open(f"{package.include_dir}/export", 'w') as writer:
|
|
46
|
+
writer.write(content[1])
|
|
47
|
+
"""
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cppmake
|
|
3
|
-
Version:
|
|
3
|
+
Version: 1
|
|
4
4
|
Summary: A modern C++ builder based on C++20 Modules.
|
|
5
5
|
Author-email: anonymouspc <shyeyian@petalmail.com>
|
|
6
6
|
License-Expression: MIT
|
|
7
7
|
Requires-Python: >=3.13
|
|
8
8
|
Description-Content-Type: text/markdown
|
|
9
|
+
Requires-Dist: cppmakelib
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
cppmakelib
|
|
@@ -4,14 +4,14 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "cppmake"
|
|
7
|
-
version = "
|
|
7
|
+
version = "1"
|
|
8
8
|
description = "A modern C++ builder based on C++20 Modules."
|
|
9
9
|
authors = [{name = "anonymouspc", email = "shyeyian@petalmail.com"}]
|
|
10
10
|
readme = "readme.md"
|
|
11
11
|
requires-python = ">=3.13"
|
|
12
12
|
license = "MIT"
|
|
13
13
|
scripts = {cppmake = "cppmake.__main__:main"}
|
|
14
|
+
dependencies = ["cppmakelib"]
|
|
14
15
|
|
|
15
|
-
[tool.setuptools]
|
|
16
|
-
|
|
17
|
-
include-package-data = true
|
|
16
|
+
[tool.setuptools.packages.find]
|
|
17
|
+
include = ["cppmake*"]
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
from .basic.setting import *
|
|
2
|
-
from .basic.config import config
|
|
3
|
-
|
|
4
|
-
from .builder.cmake import cmake
|
|
5
|
-
from .builder.git import git
|
|
6
|
-
from .builder.makefile import makefile
|
|
7
|
-
|
|
8
|
-
from .compiler.all import compiler
|
|
9
|
-
from .compiler.clang import Clang
|
|
10
|
-
from .compiler.gcc import Gcc
|
|
11
|
-
from .compiler.msvc import Msvc
|
|
12
|
-
|
|
13
|
-
from .error.config import ConfigError
|
|
14
|
-
from .error.logic import LogicError
|
|
15
|
-
from .error.subprocess import SubprocessError
|
|
16
|
-
|
|
17
|
-
from .execution.run import run
|
|
18
|
-
|
|
19
|
-
from .system.all import system
|
|
20
|
-
from .system.linux import Linux
|
|
21
|
-
from .system.macos import Macos
|
|
22
|
-
from .system.windows import Windows
|
|
23
|
-
|
|
24
|
-
from .unit.executable import Executable
|
|
25
|
-
from .unit.module import Module
|
|
26
|
-
from .unit.package import Package
|
|
27
|
-
from .unit.source import Source
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|