@@ -246,17 +246,38 @@ def tests_build_wheel(monkeypatch, tmpdir):
246246
247247 with zipfile .ZipFile (str (wheel )) as z :
248248 names = z .namelist ()
249+ share = zipfile .Path (z , "pybind11/share" )
250+ pkgconfig = (share / "pkgconfig/pybind11.pc" ).read_text (encoding = "utf-8" )
251+ cmakeconfig = (share / "cmake/pybind11/pybind11Config.cmake" ).read_text (
252+ encoding = "utf-8"
253+ )
249254
250255 trimmed = {n for n in names if "dist-info" not in n }
251256 trimmed |= {f"dist-info/{ n .split ('/' , 1 )[- 1 ]} " for n in names if "dist-info" in n }
257+
252258 assert files == trimmed
253259
260+ assert 'set(pybind11_INCLUDE_DIR "${PACKAGE_PREFIX_DIR}/include")' in cmakeconfig
261+
262+ version = wheel .basename .split ("-" )[1 ]
263+ simple_version = "." .join (version .split ("." )[:3 ])
264+ pkgconfig_expected = PKGCONFIG .format (VERSION = simple_version )
265+ assert pkgconfig_expected == pkgconfig
266+
254267
255268def tests_build_global_wheel (monkeypatch , tmpdir ):
256269 monkeypatch .chdir (MAIN_DIR )
257270 with build_global ():
258271 subprocess .run (
259- [sys .executable , "-m" , "pip" , "wheel" , "." , "-w" , str (tmpdir ), * UV_ARGS ],
272+ [
273+ sys .executable ,
274+ "-m" ,
275+ "build" ,
276+ "--wheel" ,
277+ "--outdir" ,
278+ str (tmpdir ),
279+ * UV_ARGS ,
280+ ],
260281 check = True ,
261282 )
262283
@@ -274,8 +295,21 @@ def tests_build_global_wheel(monkeypatch, tmpdir):
274295
275296 with zipfile .ZipFile (str (wheel )) as z :
276297 names = z .namelist ()
298+ beginning = names [0 ].split ("/" , 1 )[0 ].rsplit ("." , 1 )[0 ]
299+
300+ share = zipfile .Path (z , f"{ beginning } .data/data/share" )
301+ pkgconfig = (share / "pkgconfig/pybind11.pc" ).read_text (encoding = "utf-8" )
302+ cmakeconfig = (share / "cmake/pybind11/pybind11Config.cmake" ).read_text (
303+ encoding = "utf-8"
304+ )
277305
278- beginning = names [0 ].split ("/" , 1 )[0 ].rsplit ("." , 1 )[0 ]
279306 trimmed = {n [len (beginning ) + 1 :] for n in names }
280307
281308 assert files == trimmed
309+
310+ assert 'set(pybind11_INCLUDE_DIR "${PACKAGE_PREFIX_DIR}/include")' in cmakeconfig
311+
312+ version = wheel .basename .split ("-" )[1 ]
313+ simple_version = "." .join (version .split ("." )[:3 ])
314+ pkgconfig_expected = PKGCONFIG .format (VERSION = simple_version )
315+ assert pkgconfig_expected == pkgconfig
0 commit comments