Fix tests failing if "build" in project absolute path (#2055)
For Arch Linux package builds, the source is checked out in a path like:
/build/python-dulwich/src/dulwich
This causes
`test_source.py::SourceCodeComplianceTests::_get_dulwich_python_files()`
to return no Python files, and subsequently the following to tests to
fail:
-
`tests/test_source.py::SourceCodeComplianceTests::test_all_files_have_preamble`
-
`tests/test_source.py::SourceCodeComplianceTests::test_os_environ_usage_restricted`
The root cause of this is that the check for `build` and `__pycache__`
are to broad and will skip any roots with these words anywhere in the
path - which is the case for us (/build...).