Skip to content

Commit 62f3aa1

Browse files
committed
Make virtualenv inside the project work
1 parent 9e0f784 commit 62f3aa1

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,4 @@ packagecache
3030
/docs/hotdoc-private*
3131

3232
*.pyc
33+
/*venv*

run_project_tests.py

+9-9
Original file line numberDiff line numberDiff line change
@@ -1115,16 +1115,15 @@ def check_format():
11151115
'.build',
11161116
'.md',
11171117
}
1118+
skip_dirs = {
1119+
'.dub', # external deps are here
1120+
'.pytest_cache',
1121+
'meson-logs', 'meson-private',
1122+
'.eggs', '_cache', # e.g. .mypy_cache
1123+
'venv', # virtualenvs have DOS line endings
1124+
}
11181125
for (root, _, filenames) in os.walk('.'):
1119-
if '.dub' in root: # external deps are here
1120-
continue
1121-
if '.pytest_cache' in root:
1122-
continue
1123-
if 'meson-logs' in root or 'meson-private' in root:
1124-
continue
1125-
if '__CMake_build' in root:
1126-
continue
1127-
if '.eggs' in root or '_cache' in root: # e.g. .mypy_cache
1126+
if any([x in root for x in skip_dirs]):
11281127
continue
11291128
for fname in filenames:
11301129
file = Path(fname)
@@ -1248,6 +1247,7 @@ def get_version(t: dict) -> str:
12481247
options.extra_args += ['--cross-file', options.cross_file]
12491248

12501249
print('Meson build system', meson_version, 'Project Tests')
1250+
print('Using python', sys.version.split('\n')[0])
12511251
setup_commands(options.backend)
12521252
detect_system_compiler(options)
12531253
print_tool_versions()

0 commit comments

Comments
 (0)