aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/project/boost/archive.py
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2021-03-23 20:39:06 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2021-03-23 20:49:39 +0300
commitf2806f803c62f25b2435e03aaaf6652c4650633e (patch)
treefdd55107590f960345fbb241e2e10cc0b7ec5608 /project/boost/archive.py
parentproject: minor refactoring (diff)
downloadcmake-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.py8
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