cmeel 0.57.3__tar.gz → 0.59.0__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.
- {cmeel-0.57.3 → cmeel-0.59.0}/PKG-INFO +2 -2
- {cmeel-0.57.3 → cmeel-0.59.0}/cmeel/config.py +11 -10
- {cmeel-0.57.3 → cmeel-0.59.0}/cmeel/docker.py +3 -3
- {cmeel-0.57.3 → cmeel-0.59.0}/cmeel/metadata.py +11 -11
- {cmeel-0.57.3 → cmeel-0.59.0}/cmeel/release.py +4 -4
- {cmeel-0.57.3 → cmeel-0.59.0}/cmeel/utils.py +1 -1
- {cmeel-0.57.3 → cmeel-0.59.0}/pyproject.toml +2 -5
- {cmeel-0.57.3 → cmeel-0.59.0}/.gitignore +0 -0
- {cmeel-0.57.3 → cmeel-0.59.0}/LICENSE +0 -0
- {cmeel-0.57.3 → cmeel-0.59.0}/README.md +0 -0
- {cmeel-0.57.3 → cmeel-0.59.0}/cmeel/__init__.py +0 -0
- {cmeel-0.57.3 → cmeel-0.59.0}/cmeel/__main__.py +0 -0
- {cmeel-0.57.3 → cmeel-0.59.0}/cmeel/backports.py +0 -0
- {cmeel-0.57.3 → cmeel-0.59.0}/cmeel/build.py +0 -0
- {cmeel-0.57.3 → cmeel-0.59.0}/cmeel/cmeel.py +0 -0
- {cmeel-0.57.3 → cmeel-0.59.0}/cmeel/consts.py +0 -0
- {cmeel-0.57.3 → cmeel-0.59.0}/cmeel/env.py +0 -0
- {cmeel-0.57.3 → cmeel-0.59.0}/cmeel/impl.py +0 -0
- {cmeel-0.57.3 → cmeel-0.59.0}/cmeel/run.py +0 -0
- {cmeel-0.57.3 → cmeel-0.59.0}/cmeel/sdist.py +0 -0
- {cmeel-0.57.3 → cmeel-0.59.0}/cmeel.pth +0 -0
- {cmeel-0.57.3 → cmeel-0.59.0}/cmeel_pth.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cmeel
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.59.0
|
|
4
4
|
Summary: Create Wheel from CMake projects
|
|
5
5
|
Project-URL: Changelog, https://github.com/cmake-wheel/cmeel/blob/main/CHANGELOG.md
|
|
6
6
|
Project-URL: Documentation, https://cmeel.readthedocs.io/
|
|
@@ -15,7 +15,7 @@ Classifier: Programming Language :: Python :: 3
|
|
|
15
15
|
Classifier: Topic :: Software Development :: Build Tools
|
|
16
16
|
Classifier: Topic :: System :: Archiving :: Packaging
|
|
17
17
|
Classifier: Topic :: System :: Software Distribution
|
|
18
|
-
Requires-Python: >=3.
|
|
18
|
+
Requires-Python: >=3.9
|
|
19
19
|
Requires-Dist: tomli>=2.1.0; python_full_version < '3.11'
|
|
20
20
|
Provides-Extra: build
|
|
21
21
|
Requires-Dist: cmake>=3.31.2; extra == 'build'
|
|
@@ -7,7 +7,7 @@ import sys
|
|
|
7
7
|
from os import environ, pathsep
|
|
8
8
|
from pathlib import Path
|
|
9
9
|
from tempfile import TemporaryDirectory
|
|
10
|
-
from typing import Any,
|
|
10
|
+
from typing import Any, Optional, Union
|
|
11
11
|
|
|
12
12
|
try:
|
|
13
13
|
import tomllib # type: ignore
|
|
@@ -58,21 +58,22 @@ class CmeelConfig:
|
|
|
58
58
|
|
|
59
59
|
def get_configure_args(
|
|
60
60
|
self,
|
|
61
|
-
conf:
|
|
61
|
+
conf: dict[str, Any],
|
|
62
62
|
install: Union[Path, str],
|
|
63
|
-
configure_args:
|
|
64
|
-
configure_env:
|
|
63
|
+
configure_args: list[str],
|
|
64
|
+
configure_env: dict[str, str],
|
|
65
65
|
run_tests: bool,
|
|
66
|
-
) ->
|
|
66
|
+
) -> list[str]:
|
|
67
67
|
"""Get CMake initial arguments."""
|
|
68
68
|
project = conf["name"]
|
|
69
|
-
build_testing:
|
|
69
|
+
build_testing: list[str] = [] if run_tests else ["-DBUILD_TESTING=OFF"]
|
|
70
70
|
ret = [
|
|
71
71
|
"-DBoost_NO_WARN_NEW_VERSIONS=ON",
|
|
72
72
|
"-DCMAKE_BUILD_TYPE=Release",
|
|
73
73
|
"-DCMAKE_INSTALL_LIBDIR=lib",
|
|
74
74
|
f"-DCMAKE_INSTALL_PREFIX={install}",
|
|
75
75
|
f"-DPYTHON_SITELIB={SITELIB}",
|
|
76
|
+
f"-DPython_EXECUTABLE={sys.executable}",
|
|
76
77
|
f"-DPython3_EXECUTABLE={sys.executable}",
|
|
77
78
|
"-DCMAKE_APPLE_SILICON_PROCESSOR=arm64",
|
|
78
79
|
f"-DCMEEL_JOBS={self.jobs}",
|
|
@@ -86,11 +87,11 @@ class CmeelConfig:
|
|
|
86
87
|
ret += configure_env["CMEEL_CMAKE_ARGS"].split()
|
|
87
88
|
return ret
|
|
88
89
|
|
|
89
|
-
def get_configure_env(self) ->
|
|
90
|
+
def get_configure_env(self) -> dict[str, str]:
|
|
90
91
|
"""Get CMake initial environment."""
|
|
91
92
|
ret = self.env.copy()
|
|
92
|
-
available
|
|
93
|
-
|
|
93
|
+
if available := self._get_available_prefix():
|
|
94
|
+
ret["CMEEL_AVAILABLE_PREFIX"] = str(available)
|
|
94
95
|
cpp = ret.get("CMAKE_PREFIX_PATH", "")
|
|
95
96
|
if str(available) not in cpp.split(pathsep):
|
|
96
97
|
ret["CMAKE_PREFIX_PATH"] = f"{available}{pathsep}{cpp}".strip(pathsep)
|
|
@@ -102,7 +103,7 @@ class CmeelConfig:
|
|
|
102
103
|
ret["PKG_CONFIG_PATH"] = pcp.strip(pathsep)
|
|
103
104
|
return ret
|
|
104
105
|
|
|
105
|
-
def get_test_env(self) ->
|
|
106
|
+
def get_test_env(self) -> dict[str, str]:
|
|
106
107
|
"""Get test environment."""
|
|
107
108
|
ret = self.env.copy()
|
|
108
109
|
ret.update(
|
|
@@ -4,7 +4,7 @@ import logging
|
|
|
4
4
|
import os
|
|
5
5
|
import pathlib
|
|
6
6
|
from subprocess import check_call
|
|
7
|
-
from typing import
|
|
7
|
+
from typing import Optional
|
|
8
8
|
|
|
9
9
|
from .backports import BooleanOptionalAction
|
|
10
10
|
|
|
@@ -72,7 +72,7 @@ def docker_build(
|
|
|
72
72
|
cache: bool,
|
|
73
73
|
upgrade: bool,
|
|
74
74
|
cwd: str,
|
|
75
|
-
env: Optional[
|
|
75
|
+
env: Optional[list[str]],
|
|
76
76
|
cmeel_env: bool,
|
|
77
77
|
**kwargs,
|
|
78
78
|
):
|
|
@@ -83,7 +83,7 @@ def docker_build(
|
|
|
83
83
|
check_call(pull)
|
|
84
84
|
|
|
85
85
|
volumes = ["-v", f"{cwd}/:/src"]
|
|
86
|
-
envs:
|
|
86
|
+
envs: list[str] = []
|
|
87
87
|
if env:
|
|
88
88
|
for e in env:
|
|
89
89
|
envs = [*envs, "-e", e]
|
|
@@ -6,12 +6,12 @@ https://packaging.python.org/en/latest/specifications/declaring-project-metadata
|
|
|
6
6
|
|
|
7
7
|
import warnings
|
|
8
8
|
from pathlib import Path
|
|
9
|
-
from typing import Any,
|
|
9
|
+
from typing import Any, Optional, Union
|
|
10
10
|
|
|
11
11
|
LICENSE_GLOBS = ["LICEN[CS]E*", "COPYING*", "NOTICE*", "AUTHORS*"]
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
def get_license(conf:
|
|
14
|
+
def get_license(conf: dict[str, Any], dist_info: Optional[Path]) -> list[str]:
|
|
15
15
|
"""Parse 'license' and 'license-files' keys."""
|
|
16
16
|
metadata = []
|
|
17
17
|
|
|
@@ -42,7 +42,7 @@ def get_license(conf: Dict[str, Any], dist_info: Optional[Path]) -> List[str]:
|
|
|
42
42
|
return metadata
|
|
43
43
|
|
|
44
44
|
|
|
45
|
-
def _license_files(license_files: Union[str,
|
|
45
|
+
def _license_files(license_files: Union[str, list[str], dict[str, str]]) -> list[str]:
|
|
46
46
|
"""Parse 'license-files' key."""
|
|
47
47
|
lic_files = []
|
|
48
48
|
if isinstance(license_files, str):
|
|
@@ -67,7 +67,7 @@ def _license_files(license_files: Union[str, List[str], Dict[str, str]]) -> List
|
|
|
67
67
|
return lic_files
|
|
68
68
|
|
|
69
69
|
|
|
70
|
-
def _license(conf) ->
|
|
70
|
+
def _license(conf) -> tuple[str, list[str]]:
|
|
71
71
|
"""Parse 'license' key."""
|
|
72
72
|
lic_expr, lic_files = "", []
|
|
73
73
|
if "license" in conf:
|
|
@@ -94,7 +94,7 @@ def _license(conf) -> Tuple[str, List[str]]:
|
|
|
94
94
|
return lic_expr, lic_files
|
|
95
95
|
|
|
96
96
|
|
|
97
|
-
def get_people(conf:
|
|
97
|
+
def get_people(conf: dict[str, Any], key: str) -> list[str]:
|
|
98
98
|
"""Parse 'authors' and 'maintainers' keys."""
|
|
99
99
|
metadata = []
|
|
100
100
|
|
|
@@ -116,7 +116,7 @@ def get_people(conf: Dict[str, Any], key: str) -> List[str]:
|
|
|
116
116
|
return metadata
|
|
117
117
|
|
|
118
118
|
|
|
119
|
-
def get_urls(conf:
|
|
119
|
+
def get_urls(conf: dict[str, Any]) -> list[str]:
|
|
120
120
|
"""Parse 'urls' keys."""
|
|
121
121
|
metadata = []
|
|
122
122
|
|
|
@@ -131,7 +131,7 @@ def get_urls(conf: Dict[str, Any]) -> List[str]:
|
|
|
131
131
|
return metadata
|
|
132
132
|
|
|
133
133
|
|
|
134
|
-
def get_deps(conf:
|
|
134
|
+
def get_deps(conf: dict[str, Any], build_deps: list[str]) -> list[str]:
|
|
135
135
|
"""Parse 'dependencies' keys."""
|
|
136
136
|
metadata = []
|
|
137
137
|
|
|
@@ -160,7 +160,7 @@ def get_deps(conf: Dict[str, Any], build_deps: List[str]) -> List[str]:
|
|
|
160
160
|
return metadata
|
|
161
161
|
|
|
162
162
|
|
|
163
|
-
def get_readme(conf:
|
|
163
|
+
def get_readme(conf: dict[str, Any]) -> list[str]:
|
|
164
164
|
"""Parse 'readme' key."""
|
|
165
165
|
metadata = []
|
|
166
166
|
|
|
@@ -192,7 +192,7 @@ def get_readme(conf: Dict[str, Any]) -> List[str]:
|
|
|
192
192
|
return metadata
|
|
193
193
|
|
|
194
194
|
|
|
195
|
-
def _readme_dict(conf:
|
|
195
|
+
def _readme_dict(conf: dict[str, Any]) -> tuple[str, str, str]:
|
|
196
196
|
"""Parse 'readme' key when it is a table."""
|
|
197
197
|
readme_file, readme_content, readme_type = "", "", ""
|
|
198
198
|
|
|
@@ -221,7 +221,7 @@ def _ext_type(filename: str) -> str:
|
|
|
221
221
|
return "text/plain"
|
|
222
222
|
|
|
223
223
|
|
|
224
|
-
def get_keywords(conf:
|
|
224
|
+
def get_keywords(conf: dict[str, Any]) -> list[str]:
|
|
225
225
|
"""Parse 'keyword' key."""
|
|
226
226
|
metadata = []
|
|
227
227
|
if "keywords" in conf:
|
|
@@ -230,7 +230,7 @@ def get_keywords(conf: Dict[str, Any]) -> List[str]:
|
|
|
230
230
|
return metadata
|
|
231
231
|
|
|
232
232
|
|
|
233
|
-
def metadata(conf, requires:
|
|
233
|
+
def metadata(conf, requires: list[str], dist_info: Optional[Path] = None) -> list[str]:
|
|
234
234
|
"""Return the lines which should go in the METADATA / PKG-INFO file."""
|
|
235
235
|
return [
|
|
236
236
|
"Metadata-Version: 2.4",
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
from logging import getLogger
|
|
5
5
|
from pathlib import Path
|
|
6
|
-
from subprocess import
|
|
6
|
+
from subprocess import run
|
|
7
7
|
|
|
8
8
|
try:
|
|
9
9
|
import tomllib # type: ignore
|
|
@@ -33,15 +33,15 @@ def release(**kwargs):
|
|
|
33
33
|
|
|
34
34
|
commit_cmd = ["git", "commit", "-am", release]
|
|
35
35
|
LOG.debug("commit command: %s", commit_cmd)
|
|
36
|
-
|
|
36
|
+
run(commit_cmd, check=False)
|
|
37
37
|
|
|
38
38
|
tag_cmd = ["git", "tag", "-s", tag, "-m", release]
|
|
39
39
|
LOG.debug("tag command: %s", tag_cmd)
|
|
40
|
-
|
|
40
|
+
run(tag_cmd, check=True)
|
|
41
41
|
|
|
42
42
|
push_cmd = ["git", "push", "origin", tag]
|
|
43
43
|
LOG.debug("push command: %s", push_cmd)
|
|
44
|
-
|
|
44
|
+
run(push_cmd, check=True)
|
|
45
45
|
|
|
46
46
|
|
|
47
47
|
if __name__ == "__main__":
|
|
@@ -104,7 +104,7 @@ def get_tag(pyproject) -> str:
|
|
|
104
104
|
# ref. https://github.com/pypa/cibuildwheel/blob/6549a9/cibuildwheel/macos.py#L221
|
|
105
105
|
if "_PYTHON_HOST_PLATFORM" in os.environ:
|
|
106
106
|
plat = os.environ["_PYTHON_HOST_PLATFORM"].replace("-", "_").replace(".", "_")
|
|
107
|
-
tag = "-".join(tag.split("-")[:-1]
|
|
107
|
+
tag = "-".join([*tag.split("-")[:-1], plat])
|
|
108
108
|
|
|
109
109
|
if deprecate_build_system(pyproject, "py3-none", False):
|
|
110
110
|
warnings.warn(
|
|
@@ -34,8 +34,8 @@ description = "Create Wheel from CMake projects"
|
|
|
34
34
|
license = "BSD-2-Clause"
|
|
35
35
|
name = "cmeel"
|
|
36
36
|
readme = "README.md"
|
|
37
|
-
requires-python = ">=3.
|
|
38
|
-
version = "0.
|
|
37
|
+
requires-python = ">=3.9"
|
|
38
|
+
version = "0.59.0"
|
|
39
39
|
|
|
40
40
|
[project.optional-dependencies]
|
|
41
41
|
build = [
|
|
@@ -59,9 +59,6 @@ include = ["cmeel", "cmeel.pth", "cmeel_pth.py"]
|
|
|
59
59
|
[tool.hatch.build.targets.wheel]
|
|
60
60
|
include = ["cmeel", "cmeel.pth", "cmeel_pth.py"]
|
|
61
61
|
|
|
62
|
-
[tool.ruff]
|
|
63
|
-
target-version = "py38"
|
|
64
|
-
|
|
65
62
|
[tool.ruff.lint]
|
|
66
63
|
extend-ignore = ["COM812", "D203", "D213"]
|
|
67
64
|
extend-select = ["A", "B", "C", "COM", "D", "EM", "EXE", "G", "I", "N", "PTH", "RET", "RUF", "UP", "W", "YTT"]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|