summaryrefslogtreecommitdiff
path: root/doc/SConscript
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2019-07-14 08:35:24 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2019-07-14 08:35:24 +0200
commit697e33ed224b539a42ff68121f7497f5bbf941b2 (patch)
tree44ae83ad6ad4a7f6762a6d1bfde3766a1993b5ec /doc/SConscript
parentbaee03c569c91b745a1e025660b19a718db16e7d (diff)
New upstream version 3.0.5upstream/3.0.5
Diffstat (limited to 'doc/SConscript')
-rw-r--r--doc/SConscript27
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