forked from mirrors/gecko-dev
Bug 1601578 - mach - doc environment with python 3 r=ahal,firefox-build-system-reviewers,chmanchester
Differential Revision: https://phabricator.services.mozilla.com/D55937 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
038bd866b5
commit
41312ab8df
6 changed files with 61 additions and 78 deletions
1
mach
1
mach
|
|
@ -32,7 +32,6 @@ py2commands="
|
||||||
cramtest
|
cramtest
|
||||||
crashtest
|
crashtest
|
||||||
devtools-css-db
|
devtools-css-db
|
||||||
doc
|
|
||||||
doctor
|
doctor
|
||||||
empty-makefiles
|
empty-makefiles
|
||||||
file-info
|
file-info
|
||||||
|
|
|
||||||
|
|
@ -50,6 +50,7 @@ import mozpack.path as mozpath
|
||||||
from types import FunctionType
|
from types import FunctionType
|
||||||
|
|
||||||
import itertools
|
import itertools
|
||||||
|
import six
|
||||||
|
|
||||||
|
|
||||||
# The MOZ_HARDENING_CFLAGS and MOZ_HARDENING_LDFLAGS differ depending on whether
|
# The MOZ_HARDENING_CFLAGS and MOZ_HARDENING_LDFLAGS differ depending on whether
|
||||||
|
|
@ -313,7 +314,7 @@ class BaseCompileFlags(ContextDerivedValue, dict):
|
||||||
|
|
||||||
klass_name = self.__class__.__name__
|
klass_name = self.__class__.__name__
|
||||||
for k, v, build_vars in self.flag_variables:
|
for k, v, build_vars in self.flag_variables:
|
||||||
if not isinstance(k, unicode):
|
if not isinstance(k, six.text_type):
|
||||||
raise ValueError('Flag %s for %s is not a string'
|
raise ValueError('Flag %s for %s is not a string'
|
||||||
% (k, klass_name))
|
% (k, klass_name))
|
||||||
if not isinstance(build_vars, tuple):
|
if not isinstance(build_vars, tuple):
|
||||||
|
|
@ -328,7 +329,7 @@ class BaseCompileFlags(ContextDerivedValue, dict):
|
||||||
# a template were set and which were provided as defaults.
|
# a template were set and which were provided as defaults.
|
||||||
template_name = getattr(context, 'template', None)
|
template_name = getattr(context, 'template', None)
|
||||||
if template_name in (None, 'Gyp'):
|
if template_name in (None, 'Gyp'):
|
||||||
dict.__init__(self, ((k, v if v is None else TypedList(unicode)(v))
|
dict.__init__(self, ((k, v if v is None else TypedList(six.text_type)(v))
|
||||||
for k, v, _ in self.flag_variables))
|
for k, v, _ in self.flag_variables))
|
||||||
else:
|
else:
|
||||||
dict.__init__(self)
|
dict.__init__(self)
|
||||||
|
|
@ -611,7 +612,7 @@ class WasmFlags(TargetCompileFlags):
|
||||||
TargetCompileFlags.__init__(self, context)
|
TargetCompileFlags.__init__(self, context)
|
||||||
|
|
||||||
|
|
||||||
class FinalTargetValue(ContextDerivedValue, unicode):
|
class FinalTargetValue(ContextDerivedValue, six.text_type):
|
||||||
def __new__(cls, context, value=""):
|
def __new__(cls, context, value=""):
|
||||||
if not value:
|
if not value:
|
||||||
value = 'dist/'
|
value = 'dist/'
|
||||||
|
|
@ -621,7 +622,7 @@ class FinalTargetValue(ContextDerivedValue, unicode):
|
||||||
value += 'bin'
|
value += 'bin'
|
||||||
if context['DIST_SUBDIR']:
|
if context['DIST_SUBDIR']:
|
||||||
value += '/' + context['DIST_SUBDIR']
|
value += '/' + context['DIST_SUBDIR']
|
||||||
return unicode.__new__(cls, value)
|
return six.text_type.__new__(cls, value)
|
||||||
|
|
||||||
|
|
||||||
def Enum(*values):
|
def Enum(*values):
|
||||||
|
|
@ -670,7 +671,7 @@ class PathMeta(type):
|
||||||
return super(PathMeta, cls).__call__(context, value)
|
return super(PathMeta, cls).__call__(context, value)
|
||||||
|
|
||||||
|
|
||||||
class Path(ContextDerivedValue, unicode):
|
class Path(ContextDerivedValue, six.text_type):
|
||||||
"""Stores and resolves a source path relative to a given context
|
"""Stores and resolves a source path relative to a given context
|
||||||
|
|
||||||
This class is used as a backing type for some of the sandbox variables.
|
This class is used as a backing type for some of the sandbox variables.
|
||||||
|
|
@ -701,7 +702,7 @@ class Path(ContextDerivedValue, unicode):
|
||||||
def __cmp__(self, other):
|
def __cmp__(self, other):
|
||||||
if isinstance(other, Path) and self.srcdir != other.srcdir:
|
if isinstance(other, Path) and self.srcdir != other.srcdir:
|
||||||
return cmp(self.full_path, other.full_path)
|
return cmp(self.full_path, other.full_path)
|
||||||
return cmp(unicode(self), other)
|
return cmp(six.text_type(self), other)
|
||||||
|
|
||||||
# __cmp__ is not enough because unicode has __eq__, __ne__, etc. defined
|
# __cmp__ is not enough because unicode has __eq__, __ne__, etc. defined
|
||||||
# and __cmp__ is only used for those when they don't exist.
|
# and __cmp__ is only used for those when they don't exist.
|
||||||
|
|
@ -1014,18 +1015,18 @@ ReftestManifestList = OrderedPathListWithAction(read_reftest_manifest)
|
||||||
OrderedSourceList = ContextDerivedTypedList(SourcePath, StrictOrderingOnAppendList)
|
OrderedSourceList = ContextDerivedTypedList(SourcePath, StrictOrderingOnAppendList)
|
||||||
OrderedTestFlavorList = TypedList(Enum(*all_test_flavors()),
|
OrderedTestFlavorList = TypedList(Enum(*all_test_flavors()),
|
||||||
StrictOrderingOnAppendList)
|
StrictOrderingOnAppendList)
|
||||||
OrderedStringList = TypedList(unicode, StrictOrderingOnAppendList)
|
OrderedStringList = TypedList(six.text_type, StrictOrderingOnAppendList)
|
||||||
DependentTestsEntry = ContextDerivedTypedRecord(('files', OrderedSourceList),
|
DependentTestsEntry = ContextDerivedTypedRecord(('files', OrderedSourceList),
|
||||||
('tags', OrderedStringList),
|
('tags', OrderedStringList),
|
||||||
('flavors', OrderedTestFlavorList))
|
('flavors', OrderedTestFlavorList))
|
||||||
BugzillaComponent = TypedNamedTuple('BugzillaComponent',
|
BugzillaComponent = TypedNamedTuple('BugzillaComponent',
|
||||||
[('product', unicode), ('component', unicode)])
|
[('product', six.text_type), ('component', six.text_type)])
|
||||||
SchedulingComponents = ContextDerivedTypedRecord(
|
SchedulingComponents = ContextDerivedTypedRecord(
|
||||||
('inclusive', TypedList(unicode, StrictOrderingOnAppendList)),
|
('inclusive', TypedList(six.text_type, StrictOrderingOnAppendList)),
|
||||||
('exclusive', TypedList(unicode, StrictOrderingOnAppendList)))
|
('exclusive', TypedList(six.text_type, StrictOrderingOnAppendList)))
|
||||||
|
|
||||||
GeneratedFilesList = StrictOrderingOnAppendListWithFlagsFactory({
|
GeneratedFilesList = StrictOrderingOnAppendListWithFlagsFactory({
|
||||||
'script': unicode,
|
'script': six.text_type,
|
||||||
'inputs': list,
|
'inputs': list,
|
||||||
'force': bool,
|
'force': bool,
|
||||||
'flags': list, })
|
'flags': list, })
|
||||||
|
|
@ -1347,8 +1348,8 @@ VARIABLES = {
|
||||||
),
|
),
|
||||||
|
|
||||||
'RUST_LIBRARY_TARGET_DIR': (
|
'RUST_LIBRARY_TARGET_DIR': (
|
||||||
unicode,
|
six.text_type,
|
||||||
unicode,
|
six.text_type,
|
||||||
"""Where CARGO_TARGET_DIR should point when compiling this library. If
|
"""Where CARGO_TARGET_DIR should point when compiling this library. If
|
||||||
not set, it defaults to the current objdir. It should be a relative path
|
not set, it defaults to the current objdir. It should be a relative path
|
||||||
to the current objdir; absolute paths should not be used.
|
to the current objdir; absolute paths should not be used.
|
||||||
|
|
@ -1369,13 +1370,13 @@ VARIABLES = {
|
||||||
),
|
),
|
||||||
|
|
||||||
'RUST_TESTS': (
|
'RUST_TESTS': (
|
||||||
TypedList(unicode),
|
TypedList(six.text_type),
|
||||||
list,
|
list,
|
||||||
"""Names of Rust tests to build and run via `cargo test`.
|
"""Names of Rust tests to build and run via `cargo test`.
|
||||||
"""),
|
"""),
|
||||||
|
|
||||||
'RUST_TEST_FEATURES': (
|
'RUST_TEST_FEATURES': (
|
||||||
TypedList(unicode),
|
TypedList(six.text_type),
|
||||||
list,
|
list,
|
||||||
"""Cargo features to activate for RUST_TESTS.
|
"""Cargo features to activate for RUST_TESTS.
|
||||||
"""
|
"""
|
||||||
|
|
@ -1632,7 +1633,7 @@ VARIABLES = {
|
||||||
"""Like ``OBJDIR_FILES``, with preprocessing. Use sparingly.
|
"""Like ``OBJDIR_FILES``, with preprocessing. Use sparingly.
|
||||||
"""),
|
"""),
|
||||||
|
|
||||||
'FINAL_LIBRARY': (unicode, unicode,
|
'FINAL_LIBRARY': (six.text_type, six.text_type,
|
||||||
"""Library in which the objects of the current directory will be linked.
|
"""Library in which the objects of the current directory will be linked.
|
||||||
|
|
||||||
This variable contains the name of a library, defined elsewhere with
|
This variable contains the name of a library, defined elsewhere with
|
||||||
|
|
@ -1677,7 +1678,7 @@ VARIABLES = {
|
||||||
"""Source code files to compile with the wasm compiler.
|
"""Source code files to compile with the wasm compiler.
|
||||||
"""),
|
"""),
|
||||||
|
|
||||||
'HOST_LIBRARY_NAME': (unicode, unicode,
|
'HOST_LIBRARY_NAME': (six.text_type, six.text_type,
|
||||||
"""Name of target library generated when cross compiling.
|
"""Name of target library generated when cross compiling.
|
||||||
"""),
|
"""),
|
||||||
|
|
||||||
|
|
@ -1688,7 +1689,7 @@ VARIABLES = {
|
||||||
libraries that link into this library via FINAL_LIBRARY.
|
libraries that link into this library via FINAL_LIBRARY.
|
||||||
"""),
|
"""),
|
||||||
|
|
||||||
'LIBRARY_NAME': (unicode, unicode,
|
'LIBRARY_NAME': (six.text_type, six.text_type,
|
||||||
"""The code name of the library generated for a directory.
|
"""The code name of the library generated for a directory.
|
||||||
|
|
||||||
By default STATIC_LIBRARY_NAME and SHARED_LIBRARY_NAME take this name.
|
By default STATIC_LIBRARY_NAME and SHARED_LIBRARY_NAME take this name.
|
||||||
|
|
@ -1700,7 +1701,7 @@ VARIABLES = {
|
||||||
``example/components/xpcomsample.lib`` on Windows.
|
``example/components/xpcomsample.lib`` on Windows.
|
||||||
"""),
|
"""),
|
||||||
|
|
||||||
'SHARED_LIBRARY_NAME': (unicode, unicode,
|
'SHARED_LIBRARY_NAME': (six.text_type, six.text_type,
|
||||||
"""The name of the static library generated for a directory, if it needs to
|
"""The name of the static library generated for a directory, if it needs to
|
||||||
differ from the library code name.
|
differ from the library code name.
|
||||||
|
|
||||||
|
|
@ -1708,17 +1709,17 @@ VARIABLES = {
|
||||||
"""),
|
"""),
|
||||||
|
|
||||||
'SANDBOXED_WASM_LIBRARY_NAME': (
|
'SANDBOXED_WASM_LIBRARY_NAME': (
|
||||||
unicode, unicode,
|
six.text_type, six.text_type,
|
||||||
"""The name of the static sandboxed wasm library generated for a directory.
|
"""The name of the static sandboxed wasm library generated for a directory.
|
||||||
"""),
|
"""),
|
||||||
|
|
||||||
'SHARED_LIBRARY_OUTPUT_CATEGORY': (unicode, unicode,
|
'SHARED_LIBRARY_OUTPUT_CATEGORY': (six.text_type, six.text_type,
|
||||||
"""The output category for this context's shared library. If set this will
|
"""The output category for this context's shared library. If set this will
|
||||||
correspond to the build command that will build this shared library, and
|
correspond to the build command that will build this shared library, and
|
||||||
the library will not be built as part of the default build.
|
the library will not be built as part of the default build.
|
||||||
"""),
|
"""),
|
||||||
|
|
||||||
'RUST_LIBRARY_OUTPUT_CATEGORY': (unicode, unicode,
|
'RUST_LIBRARY_OUTPUT_CATEGORY': (six.text_type, six.text_type,
|
||||||
"""The output category for this context's rust library. If set this will
|
"""The output category for this context's rust library. If set this will
|
||||||
correspond to the build command that will build this rust library, and
|
correspond to the build command that will build this rust library, and
|
||||||
the library will not be built as part of the default build.
|
the library will not be built as part of the default build.
|
||||||
|
|
@ -1731,7 +1732,7 @@ VARIABLES = {
|
||||||
Implies FORCE_SHARED_LIB.
|
Implies FORCE_SHARED_LIB.
|
||||||
"""),
|
"""),
|
||||||
|
|
||||||
'STATIC_LIBRARY_NAME': (unicode, unicode,
|
'STATIC_LIBRARY_NAME': (six.text_type, six.text_type,
|
||||||
"""The name of the static library generated for a directory, if it needs to
|
"""The name of the static library generated for a directory, if it needs to
|
||||||
differ from the library code name.
|
differ from the library code name.
|
||||||
|
|
||||||
|
|
@ -1763,31 +1764,31 @@ VARIABLES = {
|
||||||
|
|
||||||
This variable contains a list of system libaries to link against.
|
This variable contains a list of system libaries to link against.
|
||||||
"""),
|
"""),
|
||||||
'RCFILE': (Path, unicode,
|
'RCFILE': (Path, six.text_type,
|
||||||
"""The program .rc file.
|
"""The program .rc file.
|
||||||
|
|
||||||
This variable can only be used on Windows.
|
This variable can only be used on Windows.
|
||||||
"""),
|
"""),
|
||||||
|
|
||||||
'RESFILE': (unicode, unicode,
|
'RESFILE': (six.text_type, six.text_type,
|
||||||
"""The program .res file.
|
"""The program .res file.
|
||||||
|
|
||||||
This variable can only be used on Windows.
|
This variable can only be used on Windows.
|
||||||
"""),
|
"""),
|
||||||
|
|
||||||
'RCINCLUDE': (Path, unicode,
|
'RCINCLUDE': (Path, six.text_type,
|
||||||
"""The resource script file to be included in the default .res file.
|
"""The resource script file to be included in the default .res file.
|
||||||
|
|
||||||
This variable can only be used on Windows.
|
This variable can only be used on Windows.
|
||||||
"""),
|
"""),
|
||||||
|
|
||||||
'DEFFILE': (Path, unicode,
|
'DEFFILE': (Path, six.text_type,
|
||||||
"""The program .def (module definition) file.
|
"""The program .def (module definition) file.
|
||||||
|
|
||||||
This variable can only be used on Windows.
|
This variable can only be used on Windows.
|
||||||
"""),
|
"""),
|
||||||
|
|
||||||
'SYMBOLS_FILE': (Path, unicode,
|
'SYMBOLS_FILE': (Path, six.text_type,
|
||||||
"""A file containing a list of symbols to export from a shared library.
|
"""A file containing a list of symbols to export from a shared library.
|
||||||
|
|
||||||
The given file contains a list of symbols to be exported, and is
|
The given file contains a list of symbols to be exported, and is
|
||||||
|
|
@ -1808,7 +1809,7 @@ VARIABLES = {
|
||||||
``BIN_SUFFIX``, the name will remain unchanged.
|
``BIN_SUFFIX``, the name will remain unchanged.
|
||||||
"""),
|
"""),
|
||||||
|
|
||||||
'SONAME': (unicode, unicode,
|
'SONAME': (six.text_type, six.text_type,
|
||||||
"""The soname of the shared object currently being linked
|
"""The soname of the shared object currently being linked
|
||||||
|
|
||||||
soname is the "logical name" of a shared object, often used to provide
|
soname is the "logical name" of a shared object, often used to provide
|
||||||
|
|
@ -1890,7 +1891,7 @@ VARIABLES = {
|
||||||
``GENERATED_FILES``.
|
``GENERATED_FILES``.
|
||||||
"""),
|
"""),
|
||||||
|
|
||||||
'PROGRAM': (unicode, unicode,
|
'PROGRAM': (six.text_type, six.text_type,
|
||||||
"""Compiled executable name.
|
"""Compiled executable name.
|
||||||
|
|
||||||
If the configuration token ``BIN_SUFFIX`` is set, its value will be
|
If the configuration token ``BIN_SUFFIX`` is set, its value will be
|
||||||
|
|
@ -1898,7 +1899,7 @@ VARIABLES = {
|
||||||
``BIN_SUFFIX``, ``PROGRAM`` will remain unchanged.
|
``BIN_SUFFIX``, ``PROGRAM`` will remain unchanged.
|
||||||
"""),
|
"""),
|
||||||
|
|
||||||
'HOST_PROGRAM': (unicode, unicode,
|
'HOST_PROGRAM': (six.text_type, six.text_type,
|
||||||
"""Compiled host executable name.
|
"""Compiled host executable name.
|
||||||
|
|
||||||
If the configuration token ``HOST_BIN_SUFFIX`` is set, its value will be
|
If the configuration token ``HOST_BIN_SUFFIX`` is set, its value will be
|
||||||
|
|
@ -1936,7 +1937,7 @@ VARIABLES = {
|
||||||
files.
|
files.
|
||||||
"""),
|
"""),
|
||||||
|
|
||||||
'XPIDL_MODULE': (unicode, unicode,
|
'XPIDL_MODULE': (six.text_type, six.text_type,
|
||||||
"""XPCOM Interface Definition Module Name.
|
"""XPCOM Interface Definition Module Name.
|
||||||
|
|
||||||
This is the name of the ``.xpt`` file that is created by linking
|
This is the name of the ``.xpt`` file that is created by linking
|
||||||
|
|
@ -2089,14 +2090,14 @@ VARIABLES = {
|
||||||
"""),
|
"""),
|
||||||
|
|
||||||
# The following variables are used to control the target of installed files.
|
# The following variables are used to control the target of installed files.
|
||||||
'XPI_NAME': (unicode, unicode,
|
'XPI_NAME': (six.text_type, six.text_type,
|
||||||
"""The name of an extension XPI to generate.
|
"""The name of an extension XPI to generate.
|
||||||
|
|
||||||
When this variable is present, the results of this directory will end up
|
When this variable is present, the results of this directory will end up
|
||||||
being packaged into an extension instead of the main dist/bin results.
|
being packaged into an extension instead of the main dist/bin results.
|
||||||
"""),
|
"""),
|
||||||
|
|
||||||
'DIST_SUBDIR': (unicode, unicode,
|
'DIST_SUBDIR': (six.text_type, six.text_type,
|
||||||
"""The name of an alternate directory to install files to.
|
"""The name of an alternate directory to install files to.
|
||||||
|
|
||||||
When this variable is present, the results of this directory will end up
|
When this variable is present, the results of this directory will end up
|
||||||
|
|
@ -2104,7 +2105,7 @@ VARIABLES = {
|
||||||
otherwise be placed.
|
otherwise be placed.
|
||||||
"""),
|
"""),
|
||||||
|
|
||||||
'FINAL_TARGET': (FinalTargetValue, unicode,
|
'FINAL_TARGET': (FinalTargetValue, six.text_type,
|
||||||
"""The name of the directory to install targets to.
|
"""The name of the directory to install targets to.
|
||||||
|
|
||||||
The directory is relative to the top of the object directory. The
|
The directory is relative to the top of the object directory. The
|
||||||
|
|
@ -2124,7 +2125,7 @@ VARIABLES = {
|
||||||
|
|
||||||
'GYP_DIRS': (StrictOrderingOnAppendListWithFlagsFactory({
|
'GYP_DIRS': (StrictOrderingOnAppendListWithFlagsFactory({
|
||||||
'variables': dict,
|
'variables': dict,
|
||||||
'input': unicode,
|
'input': six.text_type,
|
||||||
'sandbox_vars': dict,
|
'sandbox_vars': dict,
|
||||||
'no_chromium': bool,
|
'no_chromium': bool,
|
||||||
'no_unified': bool,
|
'no_unified': bool,
|
||||||
|
|
@ -2169,7 +2170,7 @@ VARIABLES = {
|
||||||
'sandbox_vars': dict,
|
'sandbox_vars': dict,
|
||||||
'non_unified_sources': StrictOrderingOnAppendList,
|
'non_unified_sources': StrictOrderingOnAppendList,
|
||||||
'mozilla_flags': list,
|
'mozilla_flags': list,
|
||||||
'gn_target': unicode,
|
'gn_target': six.text_type,
|
||||||
}), list,
|
}), list,
|
||||||
"""List of dirs containing gn files describing targets to build. Attributes:
|
"""List of dirs containing gn files describing targets to build. Attributes:
|
||||||
- variables, a dictionary containing variables and values to pass
|
- variables, a dictionary containing variables and values to pass
|
||||||
|
|
|
||||||
|
|
@ -19,4 +19,4 @@ sphinx = "~=1.8.5"
|
||||||
tornado = "~=5.1.1"
|
tornado = "~=5.1.1"
|
||||||
|
|
||||||
[requires]
|
[requires]
|
||||||
python_version = "2.7"
|
python_version = "3"
|
||||||
|
|
|
||||||
51
tools/docs/Pipfile.lock
generated
51
tools/docs/Pipfile.lock
generated
|
|
@ -1,11 +1,11 @@
|
||||||
{
|
{
|
||||||
"_meta": {
|
"_meta": {
|
||||||
"hash": {
|
"hash": {
|
||||||
"sha256": "b2ceda63df0d0688997816fab3f7d43ba3611f6a2a4352de2af14aa9a5305e4a"
|
"sha256": "0d78f0e6f293c9b18601f45dd8cf67d2a1b32aee95e083658a413141b69f94f1"
|
||||||
},
|
},
|
||||||
"pipfile-spec": 6,
|
"pipfile-spec": 6,
|
||||||
"requires": {
|
"requires": {
|
||||||
"python_version": "2.7"
|
"python_version": "3"
|
||||||
},
|
},
|
||||||
"sources": [
|
"sources": [
|
||||||
{
|
{
|
||||||
|
|
@ -97,21 +97,6 @@
|
||||||
],
|
],
|
||||||
"version": "==0.17.0"
|
"version": "==0.17.0"
|
||||||
},
|
},
|
||||||
"future": {
|
|
||||||
"hashes": [
|
|
||||||
"sha256:b1bead90b70cf6ec3f0710ae53a525360fa360d306a86583adc6bf83a4db537d"
|
|
||||||
],
|
|
||||||
"markers": "python_version < '3'",
|
|
||||||
"version": "==0.18.2"
|
|
||||||
},
|
|
||||||
"futures": {
|
|
||||||
"hashes": [
|
|
||||||
"sha256:49b3f5b064b6e3afc3316421a3f25f66c137ae88f068abbf72830170033c5e16",
|
|
||||||
"sha256:7e033af76a5e35f58e56da7a91e687706faf4e7bdfb2cbc3f2cca6b9bcda9794"
|
|
||||||
],
|
|
||||||
"markers": "python_version == '2.6' or python_version == '2.7'",
|
|
||||||
"version": "==3.3.0"
|
|
||||||
},
|
|
||||||
"idna": {
|
"idna": {
|
||||||
"hashes": [
|
"hashes": [
|
||||||
"sha256:c357b3f628cf53ae2c4c05627ecc484553142ca23264e593d327bcde5e9c3407",
|
"sha256:c357b3f628cf53ae2c4c05627ecc484553142ca23264e593d327bcde5e9c3407",
|
||||||
|
|
@ -196,10 +181,10 @@
|
||||||
},
|
},
|
||||||
"pygments": {
|
"pygments": {
|
||||||
"hashes": [
|
"hashes": [
|
||||||
"sha256:83ec6c6133ca6b529b7ff5aa826328fd14b5bb02a58c37f4f06384e96a0f94ab",
|
"sha256:2a3fe295e54a20164a9df49c75fa58526d3be48e14aceba6d6b1e8ac0bfd6f1b",
|
||||||
"sha256:b7949de3d396836085fea596998b135a22610bbcc4f2abfe9e448e44cbc58388"
|
"sha256:98c8aa5a9f778fcd1026a17361ddaf7330d1b7c62ae97c3bb0ae73e0b9b6b0fe"
|
||||||
],
|
],
|
||||||
"version": "==2.5.1"
|
"version": "==2.5.2"
|
||||||
},
|
},
|
||||||
"pyparsing": {
|
"pyparsing": {
|
||||||
"hashes": [
|
"hashes": [
|
||||||
|
|
@ -233,21 +218,19 @@
|
||||||
},
|
},
|
||||||
"pyyaml": {
|
"pyyaml": {
|
||||||
"hashes": [
|
"hashes": [
|
||||||
"sha256:0113bc0ec2ad727182326b61326afa3d1d8280ae1122493553fd6f4397f33df9",
|
"sha256:0e7f69397d53155e55d10ff68fdfb2cf630a35e6daf65cf0bdeaf04f127c09dc",
|
||||||
"sha256:01adf0b6c6f61bd11af6e10ca52b7d4057dd0be0343eb9283c878cf3af56aee4",
|
"sha256:2e9f0b7c5914367b0916c3c104a024bb68f269a486b9d04a2e8ac6f6597b7803",
|
||||||
"sha256:5124373960b0b3f4aa7df1707e63e9f109b5263eca5976c66e08b1c552d4eaf8",
|
"sha256:35ace9b4147848cafac3db142795ee42deebe9d0dad885ce643928e88daebdcc",
|
||||||
"sha256:5ca4f10adbddae56d824b2c09668e91219bb178a1eee1faa56af6f99f11bf696",
|
"sha256:38a4f0d114101c58c0f3a88aeaa44d63efd588845c5a2df5290b73db8f246d15",
|
||||||
"sha256:7907be34ffa3c5a32b60b95f4d95ea25361c951383a894fec31be7252b2b6f34",
|
"sha256:483eb6a33b671408c8529106df3707270bfacb2447bf8ad856a4b4f57f6e3075",
|
||||||
"sha256:7ec9b2a4ed5cad025c2278a1e6a19c011c80a3caaac804fd2d329e9cc2c287c9",
|
"sha256:4b6be5edb9f6bb73680f5bf4ee08ff25416d1400fbd4535fe0069b2994da07cd",
|
||||||
"sha256:87ae4c829bb25b9fe99cf71fbb2140c448f534e24c998cc60f39ae4f94396a73",
|
"sha256:7f38e35c00e160db592091751d385cd7b3046d6d51f578b29943225178257b31",
|
||||||
"sha256:9de9919becc9cc2ff03637872a440195ac4241c80536632fffeb6a1e25a74299",
|
"sha256:8100c896ecb361794d8bfdb9c11fce618c7cf83d624d73d5ab38aef3bc82d43f",
|
||||||
"sha256:a5a85b10e450c66b49f98846937e8cfca1db3127a9d5d1e31ca45c3d0bef4c5b",
|
"sha256:c0ee8eca2c582d29c3c2ec6e2c4f703d1b7f1fb10bc72317355a746057e7346c",
|
||||||
"sha256:b0997827b4f6a7c286c01c5f60384d218dca4ed7d9efa945c3e1aa623d5709ae",
|
"sha256:e4c015484ff0ff197564917b4b4246ca03f411b9bd7f16e02a2f586eb48b6d04",
|
||||||
"sha256:b631ef96d3222e62861443cc89d6563ba3eeb816eeb96b2629345ab795e53681",
|
"sha256:ebc4ed52dcc93eeebeae5cf5deb2ae4347b3a81c3fa12b0b8c976544829396a4"
|
||||||
"sha256:bf47c0607522fdbca6c9e817a6e81b08491de50f3766a7a0e6a5be7905961b41",
|
|
||||||
"sha256:f81025eddd0327c7d4cfe9b62cf33190e1e736cc6e97502b3ec425f574b3e7a8"
|
|
||||||
],
|
],
|
||||||
"version": "==5.1.2"
|
"version": "==5.2"
|
||||||
},
|
},
|
||||||
"recommonmark": {
|
"recommonmark": {
|
||||||
"hashes": [
|
"hashes": [
|
||||||
|
|
|
||||||
|
|
@ -234,7 +234,7 @@ class Documentation(MachCommandBase):
|
||||||
except subprocess.CalledProcessError:
|
except subprocess.CalledProcessError:
|
||||||
version = None
|
version = None
|
||||||
|
|
||||||
if not version or not version.startswith('3.5'):
|
if not version or not version.startswith(b'3.5'):
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -122,12 +122,12 @@ class _SphinxManager(object):
|
||||||
If this is the case, we read the information, create a temporary file,
|
If this is the case, we read the information, create a temporary file,
|
||||||
reuse the front matter info into the md file
|
reuse the front matter info into the md file
|
||||||
"""
|
"""
|
||||||
with open(markdown_file) as f:
|
with open(markdown_file, "r") as f:
|
||||||
# Load the front matter header
|
# Load the front matter header
|
||||||
post = frontmatter.load(f)
|
post = frontmatter.load(f)
|
||||||
if len(post.keys()) > 0:
|
if len(post.keys()) > 0:
|
||||||
# Has a front matter, use it
|
# Has a front matter, use it
|
||||||
with tempfile.NamedTemporaryFile(delete=False) as fh:
|
with tempfile.NamedTemporaryFile("w", delete=False) as fh:
|
||||||
# Use the frontmatter title
|
# Use the frontmatter title
|
||||||
fh.write(post["title"] + "\n")
|
fh.write(post["title"] + "\n")
|
||||||
# Add the md syntax for the title
|
# Add the md syntax for the title
|
||||||
|
|
@ -169,7 +169,7 @@ class _SphinxManager(object):
|
||||||
m.populate_registry(copier)
|
m.populate_registry(copier)
|
||||||
copier.copy(self.staging_dir, remove_empty_directories=False)
|
copier.copy(self.staging_dir, remove_empty_directories=False)
|
||||||
|
|
||||||
with open(self.index_path, 'rb') as fh:
|
with open(self.index_path, 'r') as fh:
|
||||||
data = fh.read()
|
data = fh.read()
|
||||||
|
|
||||||
def is_toplevel(key):
|
def is_toplevel(key):
|
||||||
|
|
@ -207,7 +207,7 @@ class _SphinxManager(object):
|
||||||
|
|
||||||
data = data.format(**CATEGORIES)
|
data = data.format(**CATEGORIES)
|
||||||
|
|
||||||
with open(os.path.join(self.staging_dir, 'index.rst'), 'wb') as fh:
|
with open(os.path.join(self.staging_dir, 'index.rst'), 'w') as fh:
|
||||||
fh.write(data)
|
fh.write(data)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue