File tree Expand file tree Collapse file tree 3 files changed +14
-13
lines changed
src/scikit_build_core/resources Expand file tree Collapse file tree 3 files changed +14
-13
lines changed Original file line number Diff line number Diff line change @@ -230,13 +230,7 @@ def downstream(session: nox.Session) -> None:
230230
231231 # If running in manylinux:
232232 # docker run --rm -v $PWD:/sk -w /sk -t quay.io/pypa/manylinux2014_x86_64:latest \
233- # pipx run --system-site-packages nox -s downstream -- https://github.com/...
234- # (requires tomli, so allowing access to system-site-packages)
235-
236- if sys .version_info < (3 , 11 ):
237- import tomli as tomllib
238- else :
239- import tomllib
233+ # pipx run nox -s downstream -- https://github.com/...
240234
241235 parser = argparse .ArgumentParser (prog = f"{ Path (sys .argv [0 ]).name } -s downstream" )
242236 parser .add_argument ("project" , help = "A project to build" )
@@ -270,9 +264,7 @@ def downstream(session: nox.Session) -> None:
270264 session .chdir (proj_dir )
271265
272266 # Read and strip requirements
273- pyproject_toml = Path ("pyproject.toml" )
274- with pyproject_toml .open ("rb" ) as f :
275- pyproject = tomllib .load (f )
267+ pyproject = nox .project .load_toml ("pyproject.toml" )
276268 requires = [
277269 x
278270 for x in pyproject ["build-system" ]["requires" ]
@@ -289,7 +281,7 @@ def downstream(session: nox.Session) -> None:
289281 session .chdir (args .subdir )
290282
291283 if args .editable :
292- session .install ("-e." )
284+ session .install ("-e." , "--no-build-isolation" )
293285 else :
294286 session .run (
295287 "python" ,
Original file line number Diff line number Diff line change @@ -126,6 +126,10 @@ version.source = "vcs"
126126build.hooks.vcs.version-file = " src/scikit_build_core/_version.py"
127127
128128
129+ [tool .uv .pip ]
130+ reinstall-package = [" scikit-build-core" ]
131+
132+
129133[tool .pytest .ini_options ]
130134minversion = " 7.0"
131135addopts = [" -rfEsX" , " --strict-markers" , " --strict-config" ]
Original file line number Diff line number Diff line change @@ -87,21 +87,26 @@ def find_spec(
8787 submodule_search_locations = list (self .submodule_search_locations [fullname ])
8888 else :
8989 submodule_search_locations = None
90+
9091 if fullname in self .known_wheel_files :
9192 redir = self .known_wheel_files [fullname ]
9293 if self .rebuild_flag :
9394 self .rebuild ()
9495 return importlib .util .spec_from_file_location (
9596 fullname ,
9697 os .path .join (self .dir , redir ),
97- submodule_search_locations = submodule_search_locations ,
98+ submodule_search_locations = submodule_search_locations
99+ if redir .endswith (("__init__.py" , "__init__.pyc" ))
100+ else None ,
98101 )
99102 if fullname in self .known_source_files :
100103 redir = self .known_source_files [fullname ]
101104 return importlib .util .spec_from_file_location (
102105 fullname ,
103106 redir ,
104- submodule_search_locations = submodule_search_locations ,
107+ submodule_search_locations = submodule_search_locations
108+ if redir .endswith (("__init__.py" , "__init__.pyc" ))
109+ else None ,
105110 )
106111 return None
107112
You can’t perform that action at this time.
0 commit comments