diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2021-03-23 20:39:06 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2021-03-23 20:49:39 +0300 |
commit | f2806f803c62f25b2435e03aaaf6652c4650633e (patch) | |
tree | fdd55107590f960345fbb241e2e10cc0b7ec5608 /project/boost/archive.py | |
parent | project: minor refactoring (diff) | |
download | cmake-common-f2806f803c62f25b2435e03aaaf6652c4650633e.tar.gz cmake-common-f2806f803c62f25b2435e03aaaf6652c4650633e.zip |
project.boost: refactoring
The extremely convoluted BoostBuildToolset situation is no more.
Diffstat (limited to 'project/boost/archive.py')
-rw-r--r-- | project/boost/archive.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/project/boost/archive.py b/project/boost/archive.py index 5316005..e15e457 100644 --- a/project/boost/archive.py +++ b/project/boost/archive.py @@ -75,7 +75,9 @@ class TemporaryStorage(ArchiveStorage): @contextmanager def write_archive(self, version, contents): - tmp = temp_file(contents, prefix=f'boost_{version}_', + tmp = temp_file(prefix=f'boost_{version}_', suffix=version.archive_ext, dir=self._dir) - with tmp as path: - yield path + with tmp as archive_path: + with open(archive_path, mode='wb') as fd: + fd.write(contents) + yield archive_path |