Skip to content

Commit b6d7001

Browse files
flound1129claude
andcommitted
fix(build): handle read-only source tree in PEP 517 builds
get_version() writes RELEASE-VERSION which fails when pip runs setup.py in build isolation with a read-only source copy. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent f8b52f5 commit b6d7001

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

version.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,11 @@
4242
def get_version():
4343
version = '%s.dev%d' % (BASE_VERSION, int(time.time()))
4444

45-
with open(VERSION_FILE, 'w') as f:
46-
f.write('%s\n' % version)
45+
try:
46+
with open(VERSION_FILE, 'w') as f:
47+
f.write('%s\n' % version)
48+
except OSError:
49+
pass
4750

4851
return version
4952

0 commit comments

Comments
 (0)