File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -670,6 +670,10 @@ def __init__(
670
670
# make sure the build dir exists
671
671
self ._build_dir .mkdir (exist_ok = True , parents = True )
672
672
673
+ # if the build dir is empty, add .gitignore and .hgignore files
674
+ if not any (self ._build_dir .iterdir ()):
675
+ _add_ignore_files (self ._build_dir )
676
+
673
677
# setuptools-like ARCHFLAGS environment variable support
674
678
if sysconfig .get_platform ().startswith ('macosx-' ):
675
679
archflags = os .environ .get ('ARCHFLAGS' , '' ).strip ()
@@ -1112,11 +1116,7 @@ def build_editable(
1112
1116
if not config_settings :
1113
1117
config_settings = {}
1114
1118
if 'build-dir' not in config_settings and 'builddir' not in config_settings :
1115
- build_dir = pathlib .Path ('build' )
1116
- build_dir .mkdir (exist_ok = True )
1117
- if not next (build_dir .iterdir (), None ):
1118
- _add_ignore_files (build_dir )
1119
- config_settings ['build-dir' ] = os .fspath (build_dir / str (mesonpy ._tags .get_abi_tag ()))
1119
+ config_settings ['build-dir' ] = 'build/' + mesonpy ._tags .get_abi_tag ()
1120
1120
1121
1121
out = pathlib .Path (wheel_directory )
1122
1122
with _project (config_settings ) as project :
You can’t perform that action at this time.
0 commit comments