diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2019-07-24 09:57:09 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2019-07-24 09:57:09 +0200 |
commit | c7665433b2004d2b404d6fb9d6fd064998486f63 (patch) | |
tree | 8525ef6d24f7c6ceb238945ebb2cc997c7afc905 /doc/SConscript | |
parent | e48d2727885efda8369c7edbc2e3929a59532adc (diff) | |
parent | 6e228c305122f0564eda1e67d56651f8386d24d7 (diff) |
Merge branch 'release/debian/3.1.0+repack-1'debian/3.1.0+repack-1
Diffstat (limited to 'doc/SConscript')
-rw-r--r-- | doc/SConscript | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/doc/SConscript b/doc/SConscript index 46d4533..fd518f9 100644 --- a/doc/SConscript +++ b/doc/SConscript @@ -3,7 +3,7 @@ # # -# Copyright (c) 2001 - 2017 The SCons Foundation +# Copyright (c) 2001 - 2019 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -63,6 +63,7 @@ env = env.Clone() build = os.path.join(build_dir, 'doc') + epydoc_cli = whereis('epydoc') gs = whereis('gs') lynx = whereis('lynx') @@ -130,8 +131,9 @@ if skip_doc: if not os.path.isdir(scdir): os.makedirs(scdir) - import datetime - today = datetime.date.today().strftime("%m/%d/%Y") + import time + today = time.strftime("%Y-%m-%d", + time.gmtime(int(os.environ.get('SOURCE_DATE_EPOCH', time.time())))) version = env.subst('$VERSION') for m in man_page_list: man, _ = os.path.splitext(m) @@ -324,7 +326,7 @@ else: # get included by the document XML files in the subdirectories. # manifest = File('MANIFEST').rstr() - src_files = bootstrap.parseManifestLines('.', open(manifest).readlines()) + src_files = bootstrap.parseManifestLines('.', manifest) for s in src_files: if not s: continue @@ -349,7 +351,7 @@ else: if not os.path.exists(os.path.join(build, doc, 'titlepage')): env.Execute(Mkdir(os.path.join(build, doc, 'titlepage'))) manifest = File(os.path.join(doc, 'MANIFEST')).rstr() - src_files = bootstrap.parseManifestLines(doc, open(manifest).readlines()) + src_files = bootstrap.parseManifestLines(doc, manifest) for s in src_files: if not s: continue @@ -569,12 +571,15 @@ if not epydoc_cli and not epydoc: else: # XXX Should be in common with reading the same thing in # the SConstruct file. - e = os.path.join('#src', 'engine') - manifest_in = File(os.path.join(e, 'MANIFEST.in')).rstr() - sources = bootstrap.parseManifestLines(e, open(manifest_in).readlines()) - sources = [x for x in sources if x.find('Platform') == -1] + # bootstrap.py runs outside of SCons, so need to process the path + e = Dir(os.path.join('#src', 'engine')).rstr() + sources = bootstrap.parseManifestLines(e, os.path.join(e, 'MANIFEST.in')) + + # Omit some files: + # + # Don't omit Platform as we need Platform.virtualenv for the examples to be run + # sources = [x for x in sources if x.find('Platform') == -1] sources = [x for x in sources if x.find('Tool') == -1] - # XXX sources = [x for x in sources if x.find('Options') == -1] e = os.path.join(build, '..', 'scons', 'engine') @@ -586,7 +591,7 @@ else: tar_deps.append(htmldir) tar_list.append(htmldir) - if not epydoc_cli: + if sys.platform == 'darwin' or not epydoc_cli: print("doc: command line epydoc is not found, skipping PDF/PS/Tex output") else: # PDF and PostScript and TeX are built from the |