cmeel 0.53.3__py3-none-any.whl → 0.55.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/__init__.py CHANGED
@@ -1,4 +1,5 @@
1
1
  """Cmeel module."""
2
+
2
3
  # ruff: noqa: F401
3
4
 
4
5
  from .build import build_editable, build_sdist, build_wheel
cmeel/config.py CHANGED
@@ -2,8 +2,9 @@
2
2
 
3
3
  Parse various configuration files and environment variables.
4
4
  """
5
- import os
5
+
6
6
  import sys
7
+ from os import environ, pathsep
7
8
  from pathlib import Path
8
9
  from tempfile import TemporaryDirectory
9
10
  from typing import Any, Dict, List, Optional, Union
@@ -14,6 +15,7 @@ except ModuleNotFoundError:
14
15
  import tomli as tomllib # type: ignore
15
16
 
16
17
  from .consts import CMEEL_PREFIX, SITELIB
18
+ from .env import get_paths
17
19
 
18
20
 
19
21
  class CmeelConfig:
@@ -22,7 +24,7 @@ class CmeelConfig:
22
24
  def __init__(self) -> None:
23
25
  """Get config variables from environment, local, and global config files."""
24
26
  config_home = Path("~/.config").expanduser()
25
- config_home = Path(os.environ.get("XDG_CONFIG_HOME", config_home))
27
+ config_home = Path(environ.get("XDG_CONFIG_HOME", config_home))
26
28
  config_path = config_home / "cmeel"
27
29
  config_file = config_path / "cmeel.toml"
28
30
 
@@ -31,9 +33,9 @@ class CmeelConfig:
31
33
  with config_file.open("rb") as f:
32
34
  self.conf = tomllib.load(f)
33
35
  if self.conf.get("default-env", True):
34
- self.env = os.environ.copy()
36
+ self.env = environ.copy()
35
37
  else:
36
- self.env = {p: os.environ[p] for p in ["PATH", "PYTHONPATH"]}
38
+ self.env = {p: environ[p] for p in ["PATH", "PYTHONPATH"]}
37
39
  self.jobs = int(self.conf.get("jobs", self.env.get("CMEEL_JOBS", "4")))
38
40
  self.test_jobs = self.conf.get(
39
41
  "test-jobs",
@@ -79,7 +81,7 @@ class CmeelConfig:
79
81
  ]
80
82
  if project in self.conf:
81
83
  ret += self.conf[project].get("configure-args", [])
82
- if "CMEEL_CMAKE_ARGS" in configure_env and configure_env["CMEEL_CMAKE_ARGS"]:
84
+ if configure_env.get("CMEEL_CMAKE_ARGS"):
83
85
  ret += configure_env["CMEEL_CMAKE_ARGS"].split()
84
86
  return ret
85
87
 
@@ -89,22 +91,24 @@ class CmeelConfig:
89
91
  available = self._get_available_prefix()
90
92
  if available:
91
93
  cpp = ret.get("CMAKE_PREFIX_PATH", "")
92
- if str(available) not in cpp.split(":"):
93
- 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)
94
96
  pcp = ret.get("PKG_CONFIG_PATH", "")
95
- lpcp = available / "lib" / "pkgconfig"
96
- if lpcp.is_dir() and str(lpcp) not in pcp.split(":"):
97
- pcp = f"{lpcp}:{pcp}"
98
- spcp = available / "share" / "pkgconfig"
99
- if spcp.is_dir() and str(spcp) not in pcp.split(":"):
100
- pcp = f"{spcp}:{pcp}"
101
- 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)
102
102
  return ret
103
103
 
104
104
  def get_test_env(self) -> Dict[str, str]:
105
105
  """Get test environment."""
106
106
  ret = self.env.copy()
107
- 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
+ )
108
112
  return ret
109
113
 
110
114
  def _get_available_prefix(self) -> Optional[Path]:
cmeel/consts.py CHANGED
@@ -1,4 +1,5 @@
1
1
  """Cmeel constants."""
2
+
2
3
  import os
3
4
  import sys
4
5
 
cmeel/release.py CHANGED
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env python
2
2
  """Helper to release a cmeel project."""
3
+
3
4
  from logging import getLogger
4
5
  from pathlib import Path
5
6
  from subprocess import check_call
cmeel/run.py CHANGED
@@ -1,4 +1,5 @@
1
1
  """Cmeel run."""
2
+
2
3
  import os
3
4
  import sys
4
5
  from pathlib import Path
@@ -1,33 +1,27 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: cmeel
3
- Version: 0.53.3
3
+ Version: 0.55.0
4
4
  Summary: Create Wheel from CMake projects
5
- Home-page: https://github.com/cmake-wheel/cmeel
6
- License: BSD-2-Clause
7
- Author: Guilhem Saurel
8
- Author-email: guilhem.saurel@laas.fr
9
- Requires-Python: >=3.8,<4.0
10
- Classifier: License :: OSI Approved :: BSD License
5
+ Project-URL: Changelog, https://github.com/cmake-wheel/cmeel/blob/main/CHANGELOG.md
6
+ Project-URL: Documentation, https://cmeel.readthedocs.io/
7
+ Project-URL: Homepage, https://github.com/cmake-wheel/cmeel
8
+ Author-email: Guilhem Saurel <guilhem.saurel@laas.fr>
9
+ License-Expression: BSD-2-Clause
10
+ License-File: LICENSE
11
11
  Classifier: Operating System :: MacOS
12
12
  Classifier: Operating System :: POSIX :: Linux
13
13
  Classifier: Programming Language :: C++
14
14
  Classifier: Programming Language :: Python :: 3
15
- Classifier: Programming Language :: Python :: 3.8
16
- Classifier: Programming Language :: Python :: 3.9
17
- Classifier: Programming Language :: Python :: 3.10
18
- Classifier: Programming Language :: Python :: 3.11
19
- Classifier: Programming Language :: Python :: 3.12
20
15
  Classifier: Topic :: Software Development :: Build Tools
21
16
  Classifier: Topic :: System :: Archiving :: Packaging
22
17
  Classifier: Topic :: System :: Software Distribution
18
+ Requires-Python: >=3.8
19
+ Requires-Dist: tomli>=2.1.0; python_full_version < '3.11'
23
20
  Provides-Extra: build
24
- Requires-Dist: cmake (>=3.27.9,<4.0.0) ; extra == "build"
25
- Requires-Dist: git-archive-all (>=1.23.1,<2.0.0) ; extra == "build"
26
- Requires-Dist: packaging (>=23.2,<24.0) ; extra == "build"
27
- Requires-Dist: tomli (>=2.0.1,<3.0.0) ; python_version < "3.11"
28
- Requires-Dist: wheel (>=0.42.0) ; extra == "build"
29
- Project-URL: Documentation, https://cmeel.readthedocs.io/
30
- Project-URL: changelog, https://github.com/cmake-wheel/cmeel/blob/main/CHANGELOG.md
21
+ Requires-Dist: cmake>=3.31.2; extra == 'build'
22
+ Requires-Dist: git-archive-all; extra == 'build'
23
+ Requires-Dist: packaging>=24.2; extra == 'build'
24
+ Requires-Dist: wheel>=0.45.1; extra == 'build'
31
25
  Description-Content-Type: text/markdown
32
26
 
33
27
  # CMake Wheel: cmeel
@@ -37,10 +31,10 @@ Description-Content-Type: text/markdown
37
31
  [![Documentation Status](https://readthedocs.org/projects/cmeel/badge/?version=latest)](https://cmeel.readthedocs.io/en/latest/?badge=latest)
38
32
 
39
33
  [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
40
- [![Poetry](https://img.shields.io/endpoint?url=https://python-poetry.org/badge/v0.json)](https://python-poetry.org/)
41
34
  [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v1.json)](https://github.com/charliermarsh/ruff)
35
+ [![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)
42
36
 
43
- Wheel build backend using CMake, to package anything with pip and distribute on PyPI.
37
+ Wheel build backend using CMake, to package any CMake project with pip and distribute on PyPI.
44
38
 
45
39
  Following those relevant PEPs:
46
40
  - [PEP 427](https://peps.python.org/pep-0427/), The Wheel Binary Package Format 1.0
@@ -101,4 +95,3 @@ If you want to use the helpers provided by cmeel, to *eg*. test building a proje
101
95
 
102
96
  Otherwise, if you just want to use the build backend, there is no need to install anything: your frontent (*eg.* `pip`)
103
97
  should do this for you
104
-
@@ -0,0 +1,22 @@
1
+ cmeel.pth,sha256=Pi2XRAF8aHNCSsmsY4BRKVM-nJ1epGAzJY-59aHSXEU,17
2
+ cmeel_pth.py,sha256=TMr5IM0Ql3yVFgcfY5KVocFwstv5OUxfgrfEpalPx_Q,638
3
+ cmeel/__init__.py,sha256=CVMZrq5xEht3crMfpb_uDxFrxter5FB8TbRd69Z4wYQ,175
4
+ cmeel/__main__.py,sha256=gLQ5_di07raiL6u75jpE36QydXlsbBzSdff9mVKtbg4,2042
5
+ cmeel/backports.py,sha256=ZJ34NDWgrlrSkq8AGrKof9SQexQH8sver2HmJIur80c,1473
6
+ cmeel/build.py,sha256=iYcKI1CCiRry2ESee1gUrL71N8-6rC_yie97hCfKgz0,867
7
+ cmeel/cmeel.py,sha256=inrhra_VOA0005ExK4oFNX4EWljbgS4pnx6S0dkvxoA,249
8
+ cmeel/config.py,sha256=sdELrlIzhND4KcxSaEUTdxxJWX3cF_J35jTCd9YmRRw,4107
9
+ cmeel/consts.py,sha256=ol8loHUtvIkuINu4Go5ko7Sfkb7Ht9XBjjmPP-Sjcoo,252
10
+ cmeel/docker.py,sha256=wT-VZuGKj1wcdldwgsYcWmJK_rjo2Eh1USEDMOmlsBU,2775
11
+ cmeel/env.py,sha256=4AymbjlT3iNqYeeI70u3ZQMpiQfYo2vbNoZ4F15QbYQ,1235
12
+ cmeel/impl.py,sha256=XBVIWmi17a3fcFyYvQA7cS3xeglwjVRQUj25IQOfg0k,6376
13
+ cmeel/metadata.py,sha256=1zFAmsW4xzeBZxGhro6XXLhWUJ2ZRLXxTelumzyWaRk,8606
14
+ cmeel/release.py,sha256=svN_mQwu9HeKTF3517zNd0XPkbZeNS21aps6NiW-e7A,1357
15
+ cmeel/run.py,sha256=AaXiEvM7DhI0gbAzjBmBKt7KoHRAD8jrxWRghxXmeec,744
16
+ cmeel/sdist.py,sha256=DA5h9IrQfhuoQucYfv73S8jpKNY2ThfIrVSKSvsJ5ec,1961
17
+ cmeel/utils.py,sha256=1q-iQdhxNXluQoUPME1k34YClFUQ4KSwMcIHpREYHEY,8114
18
+ cmeel-0.55.0.dist-info/METADATA,sha256=kqn21BGzeTJQoJ3PviM9U1WLlAZTvVyrizi_oOKQCK0,4818
19
+ cmeel-0.55.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
20
+ cmeel-0.55.0.dist-info/entry_points.txt,sha256=xtIRc5QUYVGuGehxx2BrMEs3qoQ44cXF7D96_tfpZDM,46
21
+ cmeel-0.55.0.dist-info/licenses/LICENSE,sha256=4QHEuqIDbscybBc21CcazwRjix-rV-AH2QAZ4IqxlzQ,1324
22
+ cmeel-0.55.0.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: poetry-core 1.8.1
2
+ Generator: hatchling 1.27.0
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ cmeel = cmeel.__main__:main
cmeel_pth.py CHANGED
@@ -1,4 +1,5 @@
1
1
  """Append cmeel prefix sitelib to sys.path."""
2
+
2
3
  import os
3
4
  import sys
4
5
  from pathlib import Path
@@ -1,22 +0,0 @@
1
- cmeel/__init__.py,sha256=jvH9AfgPjLuLGlaGFhblaGKPKE-BLoB6iDeoYyXxm1Q,174
2
- cmeel/__main__.py,sha256=gLQ5_di07raiL6u75jpE36QydXlsbBzSdff9mVKtbg4,2042
3
- cmeel/backports.py,sha256=ZJ34NDWgrlrSkq8AGrKof9SQexQH8sver2HmJIur80c,1473
4
- cmeel/build.py,sha256=iYcKI1CCiRry2ESee1gUrL71N8-6rC_yie97hCfKgz0,867
5
- cmeel/cmeel.py,sha256=inrhra_VOA0005ExK4oFNX4EWljbgS4pnx6S0dkvxoA,249
6
- cmeel/config.py,sha256=VC-alM66D5P-gOhNMRnNAHbdjVV7gMUhKD82A213DeA,4089
7
- cmeel/consts.py,sha256=80CoYQ1vi70yJc9I6Y0f_pzkk7NPu5d-wUIYsWSDqPA,251
8
- cmeel/docker.py,sha256=wT-VZuGKj1wcdldwgsYcWmJK_rjo2Eh1USEDMOmlsBU,2775
9
- cmeel/env.py,sha256=4AymbjlT3iNqYeeI70u3ZQMpiQfYo2vbNoZ4F15QbYQ,1235
10
- cmeel/impl.py,sha256=XBVIWmi17a3fcFyYvQA7cS3xeglwjVRQUj25IQOfg0k,6376
11
- cmeel/metadata.py,sha256=1zFAmsW4xzeBZxGhro6XXLhWUJ2ZRLXxTelumzyWaRk,8606
12
- cmeel/release.py,sha256=j8vxeAevtUFfwlV4gXGJ6tWqR-CNHn_d69FRhgeWkjY,1356
13
- cmeel/run.py,sha256=sD2Is7MEb5yIUu6dMjzyOJgb-ErJh-EBII9WzL13zco,743
14
- cmeel/sdist.py,sha256=DA5h9IrQfhuoQucYfv73S8jpKNY2ThfIrVSKSvsJ5ec,1961
15
- cmeel/utils.py,sha256=1q-iQdhxNXluQoUPME1k34YClFUQ4KSwMcIHpREYHEY,8114
16
- cmeel.pth,sha256=Pi2XRAF8aHNCSsmsY4BRKVM-nJ1epGAzJY-59aHSXEU,17
17
- cmeel_pth.py,sha256=Uh-cE5_zavE--acettj04aMNbu2QIZy7Uagf3YH8u1A,637
18
- cmeel-0.53.3.dist-info/LICENSE,sha256=4QHEuqIDbscybBc21CcazwRjix-rV-AH2QAZ4IqxlzQ,1324
19
- cmeel-0.53.3.dist-info/METADATA,sha256=Hmo4HBPopLZ5AoqHJonu83BF-sZbOaMnSNmSJL5Gw0M,5096
20
- cmeel-0.53.3.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
21
- cmeel-0.53.3.dist-info/entry_points.txt,sha256=AiK0nCTi1LpRXxyiSCcbPsLYIpSvYW8GF7jcllMIl1U,45
22
- cmeel-0.53.3.dist-info/RECORD,,
@@ -1,3 +0,0 @@
1
- [console_scripts]
2
- cmeel=cmeel.__main__:main
3
-