cmeel 0.50.2__tar.gz → 0.52.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.

Potentially problematic release.


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

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cmeel
3
- Version: 0.50.2
3
+ Version: 0.52.1
4
4
  Summary: Create Wheel from CMake projects
5
5
  Home-page: https://github.com/cmake-wheel/cmeel
6
6
  License: BSD-2-Clause
@@ -16,13 +16,14 @@ Classifier: Programming Language :: Python :: 3.8
16
16
  Classifier: Programming Language :: Python :: 3.9
17
17
  Classifier: Programming Language :: Python :: 3.10
18
18
  Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
19
20
  Classifier: Topic :: Software Development :: Build Tools
20
21
  Classifier: Topic :: System :: Archiving :: Packaging
21
22
  Classifier: Topic :: System :: Software Distribution
22
23
  Provides-Extra: build
23
- Requires-Dist: cmake (>=3.27.2,<4.0.0) ; extra == "build"
24
+ Requires-Dist: cmake (>=3.27.7,<4.0.0) ; extra == "build"
24
25
  Requires-Dist: git-archive-all (>=1.23.1,<2.0.0) ; extra == "build"
25
- Requires-Dist: packaging (>=23.1,<24.0) ; extra == "build"
26
+ Requires-Dist: packaging (>=23.2,<24.0) ; extra == "build"
26
27
  Requires-Dist: tomli (>=2.0.1,<3.0.0) ; python_version < "3.11"
27
28
  Requires-Dist: wheel (>=0.41.1,<0.42.0) ; extra == "build"
28
29
  Project-URL: Documentation, https://cmeel.readthedocs.io/
@@ -34,7 +35,9 @@ Description-Content-Type: text/markdown
34
35
  [![PyPI version](https://badge.fury.io/py/cmeel.svg)](https://pypi.org/project/cmeel)
35
36
  [![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)
36
37
  [![Documentation Status](https://readthedocs.org/projects/cmeel/badge/?version=latest)](https://cmeel.readthedocs.io/en/latest/?badge=latest)
38
+
37
39
  [![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/)
38
41
  [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v1.json)](https://github.com/charliermarsh/ruff)
39
42
 
40
43
  Wheel build backend using CMake, to package anything with pip and distribute on PyPI.
@@ -63,7 +66,7 @@ This Install in `${PYTHON_SITELIB}/cmeel.prefix/`:
63
66
  packages work out of the box
64
67
  - Existing `${PYTHON_SITELIB}/cmeel.prefix` are automatically added to `$CMAKE_PREFIX_PATH`, so we can build CMake
65
68
  packages whose dependencies are provided by other packages installed with cmeel
66
- - Stuff in `${PYTHON_SITELIB}/cmeel.prefix/bin` is exposed via `cmeel.run:cmeel_run`
69
+ - Stuff in `${PYTHON_SITELIB}/cmeel.prefix/bin` is exposed via `cmeel.run:cmeel_run`, or copied if start with a shebang
67
70
 
68
71
  ## Basic pyproject.toml example
69
72
 
@@ -3,7 +3,9 @@
3
3
  [![PyPI version](https://badge.fury.io/py/cmeel.svg)](https://pypi.org/project/cmeel)
4
4
  [![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)
5
5
  [![Documentation Status](https://readthedocs.org/projects/cmeel/badge/?version=latest)](https://cmeel.readthedocs.io/en/latest/?badge=latest)
6
+
6
7
  [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
8
+ [![Poetry](https://img.shields.io/endpoint?url=https://python-poetry.org/badge/v0.json)](https://python-poetry.org/)
7
9
  [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v1.json)](https://github.com/charliermarsh/ruff)
8
10
 
9
11
  Wheel build backend using CMake, to package anything with pip and distribute on PyPI.
@@ -32,7 +34,7 @@ This Install in `${PYTHON_SITELIB}/cmeel.prefix/`:
32
34
  packages work out of the box
33
35
  - Existing `${PYTHON_SITELIB}/cmeel.prefix` are automatically added to `$CMAKE_PREFIX_PATH`, so we can build CMake
34
36
  packages whose dependencies are provided by other packages installed with cmeel
35
- - Stuff in `${PYTHON_SITELIB}/cmeel.prefix/bin` is exposed via `cmeel.run:cmeel_run`
37
+ - Stuff in `${PYTHON_SITELIB}/cmeel.prefix/bin` is exposed via `cmeel.run:cmeel_run`, or copied if start with a shebang
36
38
 
37
39
  ## Basic pyproject.toml example
38
40
 
@@ -89,8 +89,16 @@ class CmeelConfig:
89
89
  available = self._get_available_prefix()
90
90
  if available:
91
91
  cpp = ret.get("CMAKE_PREFIX_PATH", "")
92
- if available not in cpp.split(":"):
92
+ if str(available) not in cpp.split(":"):
93
93
  ret["CMAKE_PREFIX_PATH"] = f"{available}:{cpp}".strip(":")
94
+ 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(":")
94
102
  return ret
95
103
 
96
104
  def get_test_env(self) -> Dict[str, str]:
@@ -99,10 +107,10 @@ class CmeelConfig:
99
107
  ret.update(CTEST_OUTPUT_ON_FAILURE="1", CTEST_PARALLEL_LEVEL=self.test_jobs)
100
108
  return ret
101
109
 
102
- def _get_available_prefix(self) -> Optional[str]:
110
+ def _get_available_prefix(self) -> Optional[Path]:
103
111
  for path in sys.path:
104
112
  if CMEEL_PREFIX in path:
105
- return str(Path(path).parent.parent.parent)
113
+ return Path(path).parent.parent.parent
106
114
  return None
107
115
 
108
116
 
@@ -0,0 +1,10 @@
1
+ """Cmeel constants."""
2
+ import os
3
+ import sys
4
+
5
+ CMEEL_PREFIX = "cmeel.prefix"
6
+ SITELIB = os.path.join( # noqa: PTH118
7
+ "lib",
8
+ "python" + ".".join(sys.version.split(".")[:2]),
9
+ "site-packages",
10
+ )
@@ -29,7 +29,7 @@ def get_paths(cmd: str, prepend: bool = False, **kwargs) -> str:
29
29
  elif cmd == "pc":
30
30
  prefixes = [p / sub / "pkgconfig" for p in prefixes for sub in ["lib", "share"]]
31
31
 
32
- available = [str(p) for p in prefixes if p.exists()]
32
+ available = [str(p) for p in prefixes if p.is_dir()]
33
33
  if prepend:
34
34
  ret = []
35
35
  for prefix in available + os.environ.get(PATHS[cmd], "").split(os.pathsep):
@@ -173,8 +173,10 @@ def expose_bin(install: Path, wheel_dir: Path, distribution: str):
173
173
  scripts.mkdir(parents=True)
174
174
  for fn in bin_dir.glob("*"):
175
175
  executable = scripts / fn.name
176
+ with fn.open("rb") as fo:
177
+ is_script = fo.read(2) == b"#!"
176
178
  with executable.open("w") as fe:
177
- fe.write(EXECUTABLE)
179
+ fe.write(fn.read_text() if is_script else EXECUTABLE)
178
180
  executable.chmod(0o755)
179
181
 
180
182
 
@@ -23,12 +23,12 @@ include = ['cmeel.pth']
23
23
  license = "BSD-2-Clause"
24
24
  name = "cmeel"
25
25
  readme = "README.md"
26
- version = "0.50.2"
26
+ version = "0.52.1"
27
27
 
28
28
  [tool.poetry.dependencies]
29
- cmake = {optional = true, version = "^3.27.2"}
29
+ cmake = {optional = true, version = "^3.27.7"}
30
30
  git-archive-all = {optional = true, version = "^1.23.1"}
31
- packaging = {optional = true, version = "^23.1"}
31
+ packaging = {optional = true, version = "^23.2"}
32
32
  python = "^3.8"
33
33
  tomli = {python = "< 3.11", version = "^2.0.1"}
34
34
  wheel = {optional = true, version = "^0.41.1"}
@@ -40,15 +40,15 @@ build = ["cmake", "git-archive-all", "packaging", "wheel"]
40
40
  optional = true
41
41
 
42
42
  [tool.poetry.group.dev.dependencies]
43
- black = "^23.7.0"
44
- furo = "^2023.7.26"
43
+ black = "^23.11.0"
44
+ furo = "^2023.9.10"
45
45
  isort = "^5.12.0"
46
- mypy = "^1.4.1"
46
+ mypy = "^1.7.0"
47
47
  myst-parser = "^2.0.0"
48
48
  requests = "^2.31.0"
49
- ruff = "^0.0.282"
49
+ ruff = "^0.1.4"
50
50
  # safety = {allow-prereleases = true, version = "^2.4.0b1"} TODO: bump when they fix packaging support
51
- sphinx = "^7.1.2"
51
+ sphinx = {python = "^3.9", version = "^7.2.6"}
52
52
 
53
53
  [tool.poetry.scripts]
54
54
  cmeel = "cmeel.__main__:main"
@@ -1,8 +0,0 @@
1
- """Cmeel constants."""
2
- import os
3
- import sys
4
-
5
- CMEEL_PREFIX = "cmeel.prefix"
6
- SITELIB = os.sep.join( # noqa: PTH118
7
- ["lib", "python" + ".".join(sys.version.split(".")[:2]), "site-packages"],
8
- )
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