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:
230
230
231
231
# If running in manylinux:
232
232
# 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/...
240
234
241
235
parser = argparse .ArgumentParser (prog = f"{ Path (sys .argv [0 ]).name } -s downstream" )
242
236
parser .add_argument ("project" , help = "A project to build" )
@@ -270,9 +264,7 @@ def downstream(session: nox.Session) -> None:
270
264
session .chdir (proj_dir )
271
265
272
266
# 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" )
276
268
requires = [
277
269
x
278
270
for x in pyproject ["build-system" ]["requires" ]
@@ -289,7 +281,7 @@ def downstream(session: nox.Session) -> None:
289
281
session .chdir (args .subdir )
290
282
291
283
if args .editable :
292
- session .install ("-e." )
284
+ session .install ("-e." , "--no-build-isolation" )
293
285
else :
294
286
session .run (
295
287
"python" ,
Original file line number Diff line number Diff line change @@ -126,6 +126,10 @@ version.source = "vcs"
126
126
build.hooks.vcs.version-file = " src/scikit_build_core/_version.py"
127
127
128
128
129
+ [tool .uv .pip ]
130
+ reinstall-package = [" scikit-build-core" ]
131
+
132
+
129
133
[tool .pytest .ini_options ]
130
134
minversion = " 7.0"
131
135
addopts = [" -rfEsX" , " --strict-markers" , " --strict-config" ]
Original file line number Diff line number Diff line change @@ -87,21 +87,26 @@ def find_spec(
87
87
submodule_search_locations = list (self .submodule_search_locations [fullname ])
88
88
else :
89
89
submodule_search_locations = None
90
+
90
91
if fullname in self .known_wheel_files :
91
92
redir = self .known_wheel_files [fullname ]
92
93
if self .rebuild_flag :
93
94
self .rebuild ()
94
95
return importlib .util .spec_from_file_location (
95
96
fullname ,
96
97
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 ,
98
101
)
99
102
if fullname in self .known_source_files :
100
103
redir = self .known_source_files [fullname ]
101
104
return importlib .util .spec_from_file_location (
102
105
fullname ,
103
106
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 ,
105
110
)
106
111
return None
107
112
You can’t perform that action at this time.
0 commit comments