cmeel 0.54.2__py3-none-any.whl → 0.56.0__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.

Potentially problematic release.


This version of cmeel might be problematic. Click here for more details.

cmeel/config.py CHANGED
@@ -3,8 +3,8 @@
3
3
  Parse various configuration files and environment variables.
4
4
  """
5
5
 
6
- import os
7
6
  import sys
7
+ from os import environ, pathsep
8
8
  from pathlib import Path
9
9
  from tempfile import TemporaryDirectory
10
10
  from typing import Any, Dict, List, Optional, Union
@@ -15,6 +15,7 @@ except ModuleNotFoundError:
15
15
  import tomli as tomllib # type: ignore
16
16
 
17
17
  from .consts import CMEEL_PREFIX, SITELIB
18
+ from .env import get_paths
18
19
 
19
20
 
20
21
  class CmeelConfig:
@@ -23,7 +24,7 @@ class CmeelConfig:
23
24
  def __init__(self) -> None:
24
25
  """Get config variables from environment, local, and global config files."""
25
26
  config_home = Path("~/.config").expanduser()
26
- config_home = Path(os.environ.get("XDG_CONFIG_HOME", config_home))
27
+ config_home = Path(environ.get("XDG_CONFIG_HOME", config_home))
27
28
  config_path = config_home / "cmeel"
28
29
  config_file = config_path / "cmeel.toml"
29
30
 
@@ -32,9 +33,10 @@ class CmeelConfig:
32
33
  with config_file.open("rb") as f:
33
34
  self.conf = tomllib.load(f)
34
35
  if self.conf.get("default-env", True):
35
- self.env = os.environ.copy()
36
+ self.env = environ.copy()
36
37
  else:
37
- self.env = {p: os.environ[p] for p in ["PATH", "PYTHONPATH"]}
38
+ self.env = {p: environ[p] for p in ["PATH", "PYTHONPATH"]}
39
+ self.env["CMEEL_BUILD"] = "1"
38
40
  self.jobs = int(self.conf.get("jobs", self.env.get("CMEEL_JOBS", "4")))
39
41
  self.test_jobs = self.conf.get(
40
42
  "test-jobs",
@@ -90,22 +92,24 @@ class CmeelConfig:
90
92
  available = self._get_available_prefix()
91
93
  if available:
92
94
  cpp = ret.get("CMAKE_PREFIX_PATH", "")
93
- if str(available) not in cpp.split(":"):
94
- ret["CMAKE_PREFIX_PATH"] = f"{available}:{cpp}".strip(":")
95
+ if str(available) not in cpp.split(pathsep):
96
+ ret["CMAKE_PREFIX_PATH"] = f"{available}{pathsep}{cpp}".strip(pathsep)
95
97
  pcp = ret.get("PKG_CONFIG_PATH", "")
96
- lpcp = available / "lib" / "pkgconfig"
97
- if lpcp.is_dir() and str(lpcp) not in pcp.split(":"):
98
- pcp = f"{lpcp}:{pcp}"
99
- spcp = available / "share" / "pkgconfig"
100
- if spcp.is_dir() and str(spcp) not in pcp.split(":"):
101
- pcp = f"{spcp}:{pcp}"
102
- ret["PKG_CONFIG_PATH"] = pcp.strip(":")
98
+ for subdir in ("lib", "share"):
99
+ lpcp = available / subdir / "pkgconfig"
100
+ if lpcp.is_dir() and str(lpcp) not in pcp.split(pathsep):
101
+ pcp = f"{lpcp}{pathsep}{pcp}"
102
+ ret["PKG_CONFIG_PATH"] = pcp.strip(pathsep)
103
103
  return ret
104
104
 
105
105
  def get_test_env(self) -> Dict[str, str]:
106
106
  """Get test environment."""
107
107
  ret = self.env.copy()
108
- ret.update(CTEST_OUTPUT_ON_FAILURE="1", CTEST_PARALLEL_LEVEL=self.test_jobs)
108
+ ret.update(
109
+ CTEST_OUTPUT_ON_FAILURE="1",
110
+ CTEST_PARALLEL_LEVEL=self.test_jobs,
111
+ LD_LIBRARY_PATH=get_paths("lib"),
112
+ )
109
113
  return ret
110
114
 
111
115
  def _get_available_prefix(self) -> Optional[Path]:
cmeel/docker.py CHANGED
@@ -23,7 +23,7 @@ def add_docker_arguments(subparsers):
23
23
  sub.add_argument(
24
24
  "-p",
25
25
  "--python",
26
- default="python3.11",
26
+ default="python3.13",
27
27
  help="python interpreter inside that image",
28
28
  )
29
29
  sub.add_argument(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cmeel
3
- Version: 0.54.2
3
+ Version: 0.56.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/
@@ -30,7 +30,6 @@ Description-Content-Type: text/markdown
30
30
  [![pre-commit.ci status](https://results.pre-commit.ci/badge/github/cmake-wheel/cmeel/main.svg)](https://results.pre-commit.ci/latest/github/cmake-wheel/cmeel/main)
31
31
  [![Documentation Status](https://readthedocs.org/projects/cmeel/badge/?version=latest)](https://cmeel.readthedocs.io/en/latest/?badge=latest)
32
32
 
33
- [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
34
33
  [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v1.json)](https://github.com/charliermarsh/ruff)
35
34
  [![uv](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/uv/main/assets/badge/v0.json)](https://github.com/astral-sh/uv)
36
35
 
@@ -5,9 +5,9 @@ cmeel/__main__.py,sha256=gLQ5_di07raiL6u75jpE36QydXlsbBzSdff9mVKtbg4,2042
5
5
  cmeel/backports.py,sha256=ZJ34NDWgrlrSkq8AGrKof9SQexQH8sver2HmJIur80c,1473
6
6
  cmeel/build.py,sha256=iYcKI1CCiRry2ESee1gUrL71N8-6rC_yie97hCfKgz0,867
7
7
  cmeel/cmeel.py,sha256=inrhra_VOA0005ExK4oFNX4EWljbgS4pnx6S0dkvxoA,249
8
- cmeel/config.py,sha256=aO4dZKiNLcRESXc1kXrKtMIWxJ6dr9ZfnfTe88iLkg8,4054
8
+ cmeel/config.py,sha256=KDv-h4DSLRSKYBeb8TcDTN2Cu6_tFdR2w2Ekh3ZZvp4,4145
9
9
  cmeel/consts.py,sha256=ol8loHUtvIkuINu4Go5ko7Sfkb7Ht9XBjjmPP-Sjcoo,252
10
- cmeel/docker.py,sha256=wT-VZuGKj1wcdldwgsYcWmJK_rjo2Eh1USEDMOmlsBU,2775
10
+ cmeel/docker.py,sha256=enT7gsB55WKcQ0U6_CwswFgqra2auS5ZRKsglgE3phA,2775
11
11
  cmeel/env.py,sha256=4AymbjlT3iNqYeeI70u3ZQMpiQfYo2vbNoZ4F15QbYQ,1235
12
12
  cmeel/impl.py,sha256=XBVIWmi17a3fcFyYvQA7cS3xeglwjVRQUj25IQOfg0k,6376
13
13
  cmeel/metadata.py,sha256=1zFAmsW4xzeBZxGhro6XXLhWUJ2ZRLXxTelumzyWaRk,8606
@@ -15,8 +15,8 @@ cmeel/release.py,sha256=svN_mQwu9HeKTF3517zNd0XPkbZeNS21aps6NiW-e7A,1357
15
15
  cmeel/run.py,sha256=AaXiEvM7DhI0gbAzjBmBKt7KoHRAD8jrxWRghxXmeec,744
16
16
  cmeel/sdist.py,sha256=DA5h9IrQfhuoQucYfv73S8jpKNY2ThfIrVSKSvsJ5ec,1961
17
17
  cmeel/utils.py,sha256=1q-iQdhxNXluQoUPME1k34YClFUQ4KSwMcIHpREYHEY,8114
18
- cmeel-0.54.2.dist-info/METADATA,sha256=RA-WAyF6a8TvCAAR8vAdaFThQnsB6q2P07UMexvY2CA,4818
19
- cmeel-0.54.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
20
- cmeel-0.54.2.dist-info/entry_points.txt,sha256=xtIRc5QUYVGuGehxx2BrMEs3qoQ44cXF7D96_tfpZDM,46
21
- cmeel-0.54.2.dist-info/licenses/LICENSE,sha256=4QHEuqIDbscybBc21CcazwRjix-rV-AH2QAZ4IqxlzQ,1324
22
- cmeel-0.54.2.dist-info/RECORD,,
18
+ cmeel-0.56.0.dist-info/METADATA,sha256=SyhhQG9ly3DiEmZXXA01H0imknUlSqfhoDZlTPzHnbg,4705
19
+ cmeel-0.56.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
20
+ cmeel-0.56.0.dist-info/entry_points.txt,sha256=xtIRc5QUYVGuGehxx2BrMEs3qoQ44cXF7D96_tfpZDM,46
21
+ cmeel-0.56.0.dist-info/licenses/LICENSE,sha256=4QHEuqIDbscybBc21CcazwRjix-rV-AH2QAZ4IqxlzQ,1324
22
+ cmeel-0.56.0.dist-info/RECORD,,
File without changes