Skip to content

Commit

Permalink
preparations for separate version status files
Browse files Browse the repository at this point in the history
  • Loading branch information
mara004 committed Sep 13, 2022
1 parent c4014a1 commit 4c8b832
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,13 @@
PlatformNames,
)

PresetupFile = join(SourceTree, "data", ".presetup_done.txt")

# TODO(#136@geisserml) Replace with separate version status files per platform.

StatusFile = join(SourceTree, "data", ".presetup_done.txt")

def check_presetup():
if os.path.exists(StatusFile):
def need_presetup():
if os.path.exists(PresetupFile):
return False
else:
with open(StatusFile, "w") as fh:
with open(PresetupFile, "w") as fh:
fh.write("")
return True

Expand All @@ -47,6 +44,7 @@ def install_handler(w_presetup):
"You can attempt a source build, but it's unlikely to work out due to binary toolchain requirements of PDFium's build system. Doing cross-compilation or using a different build system might be possible, though. Please get in touch with the project maintainers."
)

# TODO(#136@geisserml) Use separate version status files per platform.
if w_presetup:
update_pdfium.main([Host.platform])
mkwheel(Host.platform)
Expand All @@ -71,7 +69,7 @@ def main():
target = os.environ.get(BinaryTargetVar, None)

if target in (None, "auto"):
w_presetup = check_presetup()
w_presetup = need_presetup()
if w_presetup:
check_deps.main()
install_handler(w_presetup)
Expand Down

0 comments on commit 4c8b832

Please sign in to comment.