hatch-cpp 0.3.2__tar.gz → 0.3.3__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.
Files changed (66) hide show
  1. {hatch_cpp-0.3.2 → hatch_cpp-0.3.3}/.gitignore +6 -4
  2. {hatch_cpp-0.3.2 → hatch_cpp-0.3.3}/PKG-INFO +6 -5
  3. {hatch_cpp-0.3.2 → hatch_cpp-0.3.3}/hatch_cpp/__init__.py +1 -1
  4. {hatch_cpp-0.3.2 → hatch_cpp-0.3.3}/hatch_cpp/toolchains/common.py +5 -1
  5. {hatch_cpp-0.3.2 → hatch_cpp-0.3.3}/pyproject.toml +40 -22
  6. {hatch_cpp-0.3.2 → hatch_cpp-0.3.3}/LICENSE +0 -0
  7. {hatch_cpp-0.3.2 → hatch_cpp-0.3.3}/README.md +0 -0
  8. {hatch_cpp-0.3.2 → hatch_cpp-0.3.3}/hatch_cpp/config.py +0 -0
  9. {hatch_cpp-0.3.2 → hatch_cpp-0.3.3}/hatch_cpp/hooks.py +0 -0
  10. {hatch_cpp-0.3.2 → hatch_cpp-0.3.3}/hatch_cpp/plugin.py +0 -0
  11. {hatch_cpp-0.3.2 → hatch_cpp-0.3.3}/hatch_cpp/tests/test_hatch_build.py +0 -0
  12. {hatch_cpp-0.3.2 → hatch_cpp-0.3.3}/hatch_cpp/tests/test_platform_specific.py +0 -0
  13. {hatch_cpp-0.3.2 → hatch_cpp-0.3.3}/hatch_cpp/tests/test_project_basic/cpp/project/basic.cpp +0 -0
  14. {hatch_cpp-0.3.2 → hatch_cpp-0.3.3}/hatch_cpp/tests/test_project_basic/cpp/project/basic.hpp +0 -0
  15. {hatch_cpp-0.3.2 → hatch_cpp-0.3.3}/hatch_cpp/tests/test_project_basic/project/__init__.py +0 -0
  16. {hatch_cpp-0.3.2 → hatch_cpp-0.3.3}/hatch_cpp/tests/test_project_basic/pyproject.toml +0 -0
  17. {hatch_cpp-0.3.2 → hatch_cpp-0.3.3}/hatch_cpp/tests/test_project_cmake/CMakeLists.txt +0 -0
  18. {hatch_cpp-0.3.2 → hatch_cpp-0.3.3}/hatch_cpp/tests/test_project_cmake/Makefile +0 -0
  19. {hatch_cpp-0.3.2 → hatch_cpp-0.3.3}/hatch_cpp/tests/test_project_cmake/cpp/project/basic.cpp +0 -0
  20. {hatch_cpp-0.3.2 → hatch_cpp-0.3.3}/hatch_cpp/tests/test_project_cmake/cpp/project/basic.hpp +0 -0
  21. {hatch_cpp-0.3.2 → hatch_cpp-0.3.3}/hatch_cpp/tests/test_project_cmake/project/__init__.py +0 -0
  22. {hatch_cpp-0.3.2 → hatch_cpp-0.3.3}/hatch_cpp/tests/test_project_cmake/project/include/project/basic.hpp +0 -0
  23. {hatch_cpp-0.3.2 → hatch_cpp-0.3.3}/hatch_cpp/tests/test_project_cmake/pyproject.toml +0 -0
  24. {hatch_cpp-0.3.2 → hatch_cpp-0.3.3}/hatch_cpp/tests/test_project_cmake_vcpkg/CMakeLists.txt +0 -0
  25. {hatch_cpp-0.3.2 → hatch_cpp-0.3.3}/hatch_cpp/tests/test_project_cmake_vcpkg/Makefile +0 -0
  26. {hatch_cpp-0.3.2 → hatch_cpp-0.3.3}/hatch_cpp/tests/test_project_cmake_vcpkg/cpp/project/basic.cpp +0 -0
  27. {hatch_cpp-0.3.2 → hatch_cpp-0.3.3}/hatch_cpp/tests/test_project_cmake_vcpkg/cpp/project/basic.hpp +0 -0
  28. {hatch_cpp-0.3.2 → hatch_cpp-0.3.3}/hatch_cpp/tests/test_project_cmake_vcpkg/project/__init__.py +0 -0
  29. {hatch_cpp-0.3.2 → hatch_cpp-0.3.3}/hatch_cpp/tests/test_project_cmake_vcpkg/project/include/project/basic.hpp +0 -0
  30. {hatch_cpp-0.3.2 → hatch_cpp-0.3.3}/hatch_cpp/tests/test_project_cmake_vcpkg/pyproject.toml +0 -0
  31. {hatch_cpp-0.3.2 → hatch_cpp-0.3.3}/hatch_cpp/tests/test_project_cmake_vcpkg/vcpkg.json +0 -0
  32. {hatch_cpp-0.3.2 → hatch_cpp-0.3.3}/hatch_cpp/tests/test_project_hatch_build/cpp/project/basic.cpp +0 -0
  33. {hatch_cpp-0.3.2 → hatch_cpp-0.3.3}/hatch_cpp/tests/test_project_hatch_build/cpp/project/basic.hpp +0 -0
  34. {hatch_cpp-0.3.2 → hatch_cpp-0.3.3}/hatch_cpp/tests/test_project_hatch_build/project/__init__.py +0 -0
  35. {hatch_cpp-0.3.2 → hatch_cpp-0.3.3}/hatch_cpp/tests/test_project_hatch_build/pyproject.toml +0 -0
  36. {hatch_cpp-0.3.2 → hatch_cpp-0.3.3}/hatch_cpp/tests/test_project_limited_api/cpp/project/basic.cpp +0 -0
  37. {hatch_cpp-0.3.2 → hatch_cpp-0.3.3}/hatch_cpp/tests/test_project_limited_api/cpp/project/basic.hpp +0 -0
  38. {hatch_cpp-0.3.2 → hatch_cpp-0.3.3}/hatch_cpp/tests/test_project_limited_api/project/__init__.py +0 -0
  39. {hatch_cpp-0.3.2 → hatch_cpp-0.3.3}/hatch_cpp/tests/test_project_limited_api/pyproject.toml +0 -0
  40. {hatch_cpp-0.3.2 → hatch_cpp-0.3.3}/hatch_cpp/tests/test_project_nanobind/cpp/project/basic.cpp +0 -0
  41. {hatch_cpp-0.3.2 → hatch_cpp-0.3.3}/hatch_cpp/tests/test_project_nanobind/cpp/project/basic.hpp +0 -0
  42. {hatch_cpp-0.3.2 → hatch_cpp-0.3.3}/hatch_cpp/tests/test_project_nanobind/project/__init__.py +0 -0
  43. {hatch_cpp-0.3.2 → hatch_cpp-0.3.3}/hatch_cpp/tests/test_project_nanobind/pyproject.toml +0 -0
  44. {hatch_cpp-0.3.2 → hatch_cpp-0.3.3}/hatch_cpp/tests/test_project_override_classes/cpp/project/basic.cpp +0 -0
  45. {hatch_cpp-0.3.2 → hatch_cpp-0.3.3}/hatch_cpp/tests/test_project_override_classes/cpp/project/basic.hpp +0 -0
  46. {hatch_cpp-0.3.2 → hatch_cpp-0.3.3}/hatch_cpp/tests/test_project_override_classes/project/__init__.py +0 -0
  47. {hatch_cpp-0.3.2 → hatch_cpp-0.3.3}/hatch_cpp/tests/test_project_override_classes/pyproject.toml +0 -0
  48. {hatch_cpp-0.3.2 → hatch_cpp-0.3.3}/hatch_cpp/tests/test_project_override_toolchain/cpp/project/basic.cpp +0 -0
  49. {hatch_cpp-0.3.2 → hatch_cpp-0.3.3}/hatch_cpp/tests/test_project_override_toolchain/cpp/project/basic.hpp +0 -0
  50. {hatch_cpp-0.3.2 → hatch_cpp-0.3.3}/hatch_cpp/tests/test_project_override_toolchain/project/__init__.py +0 -0
  51. {hatch_cpp-0.3.2 → hatch_cpp-0.3.3}/hatch_cpp/tests/test_project_override_toolchain/pyproject.toml +0 -0
  52. {hatch_cpp-0.3.2 → hatch_cpp-0.3.3}/hatch_cpp/tests/test_project_pybind/cpp/project/basic.cpp +0 -0
  53. {hatch_cpp-0.3.2 → hatch_cpp-0.3.3}/hatch_cpp/tests/test_project_pybind/cpp/project/basic.hpp +0 -0
  54. {hatch_cpp-0.3.2 → hatch_cpp-0.3.3}/hatch_cpp/tests/test_project_pybind/project/__init__.py +0 -0
  55. {hatch_cpp-0.3.2 → hatch_cpp-0.3.3}/hatch_cpp/tests/test_project_pybind/pyproject.toml +0 -0
  56. {hatch_cpp-0.3.2 → hatch_cpp-0.3.3}/hatch_cpp/tests/test_project_pybind_vcpkg/cpp/project/basic.cpp +0 -0
  57. {hatch_cpp-0.3.2 → hatch_cpp-0.3.3}/hatch_cpp/tests/test_project_pybind_vcpkg/cpp/project/basic.hpp +0 -0
  58. {hatch_cpp-0.3.2 → hatch_cpp-0.3.3}/hatch_cpp/tests/test_project_pybind_vcpkg/project/__init__.py +0 -0
  59. {hatch_cpp-0.3.2 → hatch_cpp-0.3.3}/hatch_cpp/tests/test_project_pybind_vcpkg/pyproject.toml +0 -0
  60. {hatch_cpp-0.3.2 → hatch_cpp-0.3.3}/hatch_cpp/tests/test_project_pybind_vcpkg/vcpkg.json +0 -0
  61. {hatch_cpp-0.3.2 → hatch_cpp-0.3.3}/hatch_cpp/tests/test_projects.py +0 -0
  62. {hatch_cpp-0.3.2 → hatch_cpp-0.3.3}/hatch_cpp/tests/test_structs.py +0 -0
  63. {hatch_cpp-0.3.2 → hatch_cpp-0.3.3}/hatch_cpp/toolchains/__init__.py +0 -0
  64. {hatch_cpp-0.3.2 → hatch_cpp-0.3.3}/hatch_cpp/toolchains/cmake.py +0 -0
  65. {hatch_cpp-0.3.2 → hatch_cpp-0.3.3}/hatch_cpp/toolchains/vcpkg.py +0 -0
  66. {hatch_cpp-0.3.2 → hatch_cpp-0.3.3}/hatch_cpp/utils.py +0 -0
@@ -141,14 +141,12 @@ js/node_modules
141
141
  js/test-results
142
142
  js/playwright-report
143
143
  js/*.tgz
144
- hatch_cpp/extension
145
144
 
146
145
  # Jupyter
147
146
  .ipynb_checkpoints
148
147
  .autoversion
149
148
  Untitled*.ipynb
150
- !hatch_cpp/extension/hatch_cpp.json
151
- !hatch_cpp/extension/install.json
149
+ hatch_cpp/extension
152
150
  hatch_cpp/nbextension
153
151
  hatch_cpp/labextension
154
152
 
@@ -158,5 +156,9 @@ hatch_cpp/labextension
158
156
  # Rust
159
157
  target
160
158
 
159
+ # Hydra
160
+ outputs/
161
+ multirun/
162
+
161
163
  vcpkg
162
- vcpkg_installed
164
+ vcpkg_installed
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: hatch-cpp
3
- Version: 0.3.2
3
+ Version: 0.3.3
4
4
  Summary: Hatch plugin for C++ builds
5
5
  Project-URL: Repository, https://github.com/python-project-templates/hatch-cpp
6
6
  Project-URL: Homepage, https://github.com/python-project-templates/hatch-cpp
@@ -27,19 +27,20 @@ Requires-Dist: pydantic
27
27
  Provides-Extra: develop
28
28
  Requires-Dist: build; extra == 'develop'
29
29
  Requires-Dist: bump-my-version; extra == 'develop'
30
- Requires-Dist: check-manifest; extra == 'develop'
31
- Requires-Dist: codespell<2.5,>=2.4; extra == 'develop'
30
+ Requires-Dist: check-dist; extra == 'develop'
31
+ Requires-Dist: codespell; extra == 'develop'
32
32
  Requires-Dist: hatch-build>=0.3.2; extra == 'develop'
33
33
  Requires-Dist: hatchling; extra == 'develop'
34
+ Requires-Dist: mdformat; extra == 'develop'
34
35
  Requires-Dist: mdformat-tables>=1; extra == 'develop'
35
- Requires-Dist: mdformat<1.1,>=0.7.22; extra == 'develop'
36
36
  Requires-Dist: nanobind<2.12.0; extra == 'develop'
37
37
  Requires-Dist: pybind11; extra == 'develop'
38
38
  Requires-Dist: pytest; extra == 'develop'
39
39
  Requires-Dist: pytest-cov; extra == 'develop'
40
- Requires-Dist: ruff<0.15,>=0.9; extra == 'develop'
40
+ Requires-Dist: ruff; extra == 'develop'
41
41
  Requires-Dist: toml; extra == 'develop'
42
42
  Requires-Dist: twine; extra == 'develop'
43
+ Requires-Dist: ty; extra == 'develop'
43
44
  Requires-Dist: uv; extra == 'develop'
44
45
  Requires-Dist: wheel; extra == 'develop'
45
46
  Description-Content-Type: text/markdown
@@ -1,4 +1,4 @@
1
- __version__ = "0.3.2"
1
+ __version__ = "0.3.3"
2
2
 
3
3
  from .config import *
4
4
  from .hooks import *
@@ -4,7 +4,7 @@ from os import environ
4
4
  from pathlib import Path
5
5
  from re import match
6
6
  from shutil import which
7
- from sys import executable, platform as sys_platform
7
+ from sys import base_exec_prefix, exec_prefix, executable, platform as sys_platform
8
8
  from sysconfig import get_config_var, get_path
9
9
  from typing import Any, List, Literal, Optional
10
10
 
@@ -369,10 +369,14 @@ class HatchCppPlatform(BaseModel):
369
369
  flags += f" /Fe:{library.get_qualified_name(self.platform)}"
370
370
  flags += " /link /DLL"
371
371
  # Add Python libs directory - check multiple possible locations
372
+ # In virtual environments, sys.executable is in the venv, but pythonXX.lib
373
+ # lives under the base Python installation's 'libs' directory.
372
374
  python_libs_paths = [
373
375
  Path(executable).parent / "libs", # Standard Python install
374
376
  Path(executable).parent.parent / "libs", # Some virtualenv layouts
375
377
  Path(get_config_var("installed_base") or "") / "libs", # sysconfig approach
378
+ Path(exec_prefix) / "libs", # exec_prefix approach
379
+ Path(base_exec_prefix) / "libs", # base_exec_prefix approach
376
380
  ]
377
381
  for libs_path in python_libs_paths:
378
382
  if libs_path.exists():
@@ -1,14 +1,18 @@
1
1
  [build-system]
2
- requires = ["hatchling"]
2
+ requires = [
3
+ "hatchling",
4
+ ]
3
5
  build-backend = "hatchling.build"
4
6
 
5
7
  [project]
6
8
  name = "hatch-cpp"
7
- authors = [{name = "the hatch-cpp authors", email = "t.paine154@gmail.com"}]
9
+ authors = [
10
+ {name = "the hatch-cpp authors", email = "t.paine154@gmail.com"},
11
+ ]
8
12
  description = "Hatch plugin for C++ builds"
9
13
  readme = "README.md"
10
14
  license = { text = "Apache-2.0" }
11
- version = "0.3.2"
15
+ version = "0.3.3"
12
16
  requires-python = ">=3.10"
13
17
  keywords = [
14
18
  "hatch",
@@ -44,16 +48,17 @@ dependencies = [
44
48
  develop = [
45
49
  "build",
46
50
  "bump-my-version",
47
- "check-manifest",
48
- "codespell>=2.4,<2.5",
51
+ "check-dist",
52
+ "codespell",
49
53
  "hatchling",
50
54
  "hatch-build>=0.3.2",
51
- "mdformat>=0.7.22,<1.1",
55
+ "mdformat",
52
56
  "mdformat-tables>=1",
53
57
  "pytest",
54
58
  "pytest-cov",
55
- "ruff>=0.9,<0.15",
59
+ "ruff",
56
60
  "twine",
61
+ "ty",
57
62
  "uv",
58
63
  "wheel",
59
64
  # test
@@ -75,7 +80,7 @@ Repository = "https://github.com/python-project-templates/hatch-cpp"
75
80
  Homepage = "https://github.com/python-project-templates/hatch-cpp"
76
81
 
77
82
  [tool.bumpversion]
78
- current_version = "0.3.2"
83
+ current_version = "0.3.3"
79
84
  commit = true
80
85
  tag = true
81
86
  commit_args = "-s"
@@ -90,13 +95,6 @@ filename = "pyproject.toml"
90
95
  search = 'version = "{current_version}"'
91
96
  replace = 'version = "{new_version}"'
92
97
 
93
- [tool.check-manifest]
94
- ignore = [
95
- ".copier-answers.yaml",
96
- "Makefile",
97
- "docs/**/*",
98
- ]
99
-
100
98
  [tool.coverage.run]
101
99
  branch = false
102
100
  omit = [
@@ -118,26 +116,46 @@ artifacts = []
118
116
  src = "/"
119
117
 
120
118
  [tool.hatch.build.targets.sdist]
121
- packages = ["hatch_cpp"]
119
+ packages = [
120
+ "hatch_cpp",
121
+ ]
122
122
 
123
123
  [tool.hatch.build.targets.wheel]
124
- packages = ["hatch_cpp"]
124
+ packages = [
125
+ "hatch_cpp",
126
+ ]
125
127
 
126
128
  [tool.pytest.ini_options]
127
- addopts = ["-vvv", "--junitxml=junit.xml"]
129
+ addopts = [
130
+ "-vvv",
131
+ "--junitxml=junit.xml",
132
+ ]
128
133
  testpaths = "hatch_cpp/tests"
129
134
 
130
135
  [tool.ruff]
131
136
  line-length = 150
132
137
 
133
138
  [tool.ruff.lint]
134
- extend-select = ["I"]
139
+ extend-select = [
140
+ "I",
141
+ ]
135
142
 
136
143
  [tool.ruff.lint.isort]
137
144
  combine-as-imports = true
138
145
  default-section = "third-party"
139
- known-first-party = ["hatch_cpp"]
140
- section-order = ["future", "standard-library", "third-party", "first-party", "local-folder"]
146
+ known-first-party = [
147
+ "hatch_cpp",
148
+ ]
149
+ section-order = [
150
+ "future",
151
+ "standard-library",
152
+ "third-party",
153
+ "first-party",
154
+ "local-folder",
155
+ ]
141
156
 
142
157
  [tool.ruff.lint.per-file-ignores]
143
- "__init__.py" = ["F401", "F403"]
158
+ "__init__.py" = [
159
+ "F401",
160
+ "F403",
161
+ ]
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes