cmeel 0.54.2__tar.gz → 0.55.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.

Potentially problematic release.


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

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cmeel
3
- Version: 0.54.2
3
+ Version: 0.55.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/
@@ -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,9 @@ 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"]}
38
39
  self.jobs = int(self.conf.get("jobs", self.env.get("CMEEL_JOBS", "4")))
39
40
  self.test_jobs = self.conf.get(
40
41
  "test-jobs",
@@ -90,22 +91,24 @@ class CmeelConfig:
90
91
  available = self._get_available_prefix()
91
92
  if available:
92
93
  cpp = ret.get("CMAKE_PREFIX_PATH", "")
93
- if str(available) not in cpp.split(":"):
94
- ret["CMAKE_PREFIX_PATH"] = f"{available}:{cpp}".strip(":")
94
+ if str(available) not in cpp.split(pathsep):
95
+ ret["CMAKE_PREFIX_PATH"] = f"{available}{pathsep}{cpp}".strip(pathsep)
95
96
  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(":")
97
+ for subdir in ("lib", "share"):
98
+ lpcp = available / subdir / "pkgconfig"
99
+ if lpcp.is_dir() and str(lpcp) not in pcp.split(pathsep):
100
+ pcp = f"{lpcp}{pathsep}{pcp}"
101
+ ret["PKG_CONFIG_PATH"] = pcp.strip(pathsep)
103
102
  return ret
104
103
 
105
104
  def get_test_env(self) -> Dict[str, str]:
106
105
  """Get test environment."""
107
106
  ret = self.env.copy()
108
- ret.update(CTEST_OUTPUT_ON_FAILURE="1", CTEST_PARALLEL_LEVEL=self.test_jobs)
107
+ ret.update(
108
+ CTEST_OUTPUT_ON_FAILURE="1",
109
+ CTEST_PARALLEL_LEVEL=self.test_jobs,
110
+ LD_LIBRARY_PATH=get_paths("lib"),
111
+ )
109
112
  return ret
110
113
 
111
114
  def _get_available_prefix(self) -> Optional[Path]:
@@ -35,7 +35,7 @@ license = "BSD-2-Clause"
35
35
  name = "cmeel"
36
36
  readme = "README.md"
37
37
  requires-python = ">=3.8"
38
- version = "0.54.2"
38
+ version = "0.55.0"
39
39
 
40
40
  [project.optional-dependencies]
41
41
  build = [
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
File without changes
File without changes
File without changes
File without changes