Skip to content

Commit

Permalink
build: make srcdir read-only
Browse files Browse the repository at this point in the history
Co-authored-by: layday <layday@protonmail.com>
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
  • Loading branch information
henryiii and layday committed May 24, 2022
1 parent 39456c1 commit 041129b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/build/__init__.py
Expand Up @@ -279,7 +279,7 @@ def __init__(
The default runner simply calls the backend hooks in a subprocess, writing backend output
to stdout/stderr.
"""
self.srcdir: str = os.path.abspath(srcdir)
self._srcdir: str = os.path.abspath(srcdir)
_validate_source_directory(srcdir)

spec_file = os.path.join(srcdir, 'pyproject.toml')
Expand Down Expand Up @@ -319,6 +319,11 @@ def _runner(
extra_environ['PATH'] = os.pathsep.join(paths)
self._hook_runner(cmd, cwd, extra_environ)

@property
def srcdir(self) -> str:
"""Project source directory."""
return self._srcdir

@property
def python_executable(self) -> str:
"""
Expand Down

0 comments on commit 041129b

Please sign in to comment.