Skip to content

Conversation

@vstinner
Copy link
Member

@vstinner vstinner commented May 5, 2017

Use a build/ directory in the build directory, not in the source
directory, since the source directory may be read-only and must not
be modified.

@vstinner vstinner added type-bug An unexpected behavior, bug, or error tests Tests in the Lib/test dir labels May 5, 2017
@vstinner
Copy link
Member Author

vstinner commented May 5, 2017

I tested again with a fresh read-only source directory and I'm able to build Python and run tests with this change (whereas running tests fails without this change).

@vstinner
Copy link
Member Author

vstinner commented May 9, 2017

Hum, it seems like the variable is not available on Windows:

C:\projects\cpython>"C:\projects\cpython\PCbuild\win32\python.exe"  -u -Wd -E -bb -m test  -uall -rwW --slowest --timeout 1200 -j0 
Traceback (most recent call last):
  ...
  File "C:\projects\cpython\lib\test\libregrtest\main.py", line 31, in <module>
    TEMPDIR = os.path.join(sysconfig.get_config_var('abs_builddir'), 'build')
  File "C:\projects\cpython\lib\ntpath.py", line 75, in join
    path = os.fspath(path)
TypeError: expected str, bytes or os.PathLike object, not NoneType

Use a build/ directory in the build directory, not in the source
directory, since the source directory may be read-only and must not
be modified.

Fallback on the source directory if the build directory is not
available (missing "abs_builddir" sysconfig variable).
@vstinner
Copy link
Member Author

I checked manually that it fixes the issue of read-only source tree: I'm now able to run tests from the build directory.

@vstinner vstinner merged commit f7e0784 into python:master Jun 14, 2017
@vstinner vstinner deleted the master_ro branch June 14, 2017 22:44
vstinner added a commit that referenced this pull request Jun 16, 2017
* bpo-30523: regrtest: Add --list-cases option (#2238)
* bpo-30284: Fix regrtest for out of tree build (#1481)
* bpo-30540: regrtest: add --matchfile option (#1909)
* bpo-30258: regrtest: Fix run_tests_multiprocess() (#1479)
* bpo-30263: regrtest: log system load (#1452)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants