Search is not available for this dataset
identifier
stringlengths
1
155
parameters
stringlengths
2
6.09k
docstring
stringlengths
11
63.4k
docstring_summary
stringlengths
0
63.4k
function
stringlengths
29
99.8k
function_tokens
list
start_point
list
end_point
list
language
stringclasses
1 value
docstring_language
stringlengths
2
7
docstring_language_predictions
stringlengths
18
23
is_langid_reliable
stringclasses
2 values
check_extras
(dist, attr, value)
Verify that extras_require mapping is valid
Verify that extras_require mapping is valid
def check_extras(dist, attr, value): """Verify that extras_require mapping is valid""" try: list(itertools.starmap(_check_extra, value.items())) except (TypeError, ValueError, AttributeError): raise DistutilsSetupError( "'extras_require' must be a dictionary whose values are " ...
[ "def", "check_extras", "(", "dist", ",", "attr", ",", "value", ")", ":", "try", ":", "list", "(", "itertools", ".", "starmap", "(", "_check_extra", ",", "value", ".", "items", "(", ")", ")", ")", "except", "(", "TypeError", ",", "ValueError", ",", "A...
[ 176, 0 ]
[ 185, 9 ]
python
en
['en', 'en', 'en']
True
assert_bool
(dist, attr, value)
Verify that value is True, False, 0, or 1
Verify that value is True, False, 0, or 1
def assert_bool(dist, attr, value): """Verify that value is True, False, 0, or 1""" if bool(value) != value: tmpl = "{attr!r} must be a boolean value (got {value!r})" raise DistutilsSetupError(tmpl.format(attr=attr, value=value))
[ "def", "assert_bool", "(", "dist", ",", "attr", ",", "value", ")", ":", "if", "bool", "(", "value", ")", "!=", "value", ":", "tmpl", "=", "\"{attr!r} must be a boolean value (got {value!r})\"", "raise", "DistutilsSetupError", "(", "tmpl", ".", "format", "(", "...
[ 195, 0 ]
[ 199, 70 ]
python
en
['en', 'en', 'en']
True
check_requirements
(dist, attr, value)
Verify that install_requires is a valid requirements list
Verify that install_requires is a valid requirements list
def check_requirements(dist, attr, value): """Verify that install_requires is a valid requirements list""" try: list(pkg_resources.parse_requirements(value)) if isinstance(value, (dict, set)): raise TypeError("Unordered types are not allowed") except (TypeError, ValueError) as er...
[ "def", "check_requirements", "(", "dist", ",", "attr", ",", "value", ")", ":", "try", ":", "list", "(", "pkg_resources", ".", "parse_requirements", "(", "value", ")", ")", "if", "isinstance", "(", "value", ",", "(", "dict", ",", "set", ")", ")", ":", ...
[ 202, 0 ]
[ 213, 70 ]
python
en
['en', 'en', 'en']
True
check_specifier
(dist, attr, value)
Verify that value is a valid version specifier
Verify that value is a valid version specifier
def check_specifier(dist, attr, value): """Verify that value is a valid version specifier""" try: packaging.specifiers.SpecifierSet(value) except packaging.specifiers.InvalidSpecifier as error: tmpl = ( "{attr!r} must be a string " "containing valid version specifiers...
[ "def", "check_specifier", "(", "dist", ",", "attr", ",", "value", ")", ":", "try", ":", "packaging", ".", "specifiers", ".", "SpecifierSet", "(", "value", ")", "except", "packaging", ".", "specifiers", ".", "InvalidSpecifier", "as", "error", ":", "tmpl", "...
[ 216, 0 ]
[ 225, 70 ]
python
en
['en', 'en', 'en']
True
check_entry_points
(dist, attr, value)
Verify that entry_points map is parseable
Verify that entry_points map is parseable
def check_entry_points(dist, attr, value): """Verify that entry_points map is parseable""" try: pkg_resources.EntryPoint.parse_map(value) except ValueError as e: raise DistutilsSetupError(e)
[ "def", "check_entry_points", "(", "dist", ",", "attr", ",", "value", ")", ":", "try", ":", "pkg_resources", ".", "EntryPoint", ".", "parse_map", "(", "value", ")", "except", "ValueError", "as", "e", ":", "raise", "DistutilsSetupError", "(", "e", ")" ]
[ 228, 0 ]
[ 233, 36 ]
python
en
['en', 'en', 'en']
True
check_package_data
(dist, attr, value)
Verify that value is a dictionary of package names to glob lists
Verify that value is a dictionary of package names to glob lists
def check_package_data(dist, attr, value): """Verify that value is a dictionary of package names to glob lists""" if isinstance(value, dict): for k, v in value.items(): if not isinstance(k, str): break try: iter(v) except TypeError: ...
[ "def", "check_package_data", "(", "dist", ",", "attr", ",", "value", ")", ":", "if", "isinstance", "(", "value", ",", "dict", ")", ":", "for", "k", ",", "v", "in", "value", ".", "items", "(", ")", ":", "if", "not", "isinstance", "(", "k", ",", "s...
[ 241, 0 ]
[ 256, 5 ]
python
en
['en', 'en', 'en']
True
Distribution._finalize_requires
(self)
Set `metadata.python_requires` and fix environment markers in `install_requires` and `extras_require`.
Set `metadata.python_requires` and fix environment markers in `install_requires` and `extras_require`.
def _finalize_requires(self): """ Set `metadata.python_requires` and fix environment markers in `install_requires` and `extras_require`. """ if getattr(self, 'python_requires', None): self.metadata.python_requires = self.python_requires if getattr(self, 'extr...
[ "def", "_finalize_requires", "(", "self", ")", ":", "if", "getattr", "(", "self", ",", "'python_requires'", ",", "None", ")", ":", "self", ".", "metadata", ".", "python_requires", "=", "self", ".", "python_requires", "if", "getattr", "(", "self", ",", "'ex...
[ 409, 4 ]
[ 427, 49 ]
python
en
['en', 'error', 'th']
False
Distribution._convert_extras_requirements
(self)
Convert requirements in `extras_require` of the form `"extra": ["barbazquux; {marker}"]` to `"extra:{marker}": ["barbazquux"]`.
Convert requirements in `extras_require` of the form `"extra": ["barbazquux; {marker}"]` to `"extra:{marker}": ["barbazquux"]`.
def _convert_extras_requirements(self): """ Convert requirements in `extras_require` of the form `"extra": ["barbazquux; {marker}"]` to `"extra:{marker}": ["barbazquux"]`. """ spec_ext_reqs = getattr(self, 'extras_require', None) or {} self._tmp_extras_require = d...
[ "def", "_convert_extras_requirements", "(", "self", ")", ":", "spec_ext_reqs", "=", "getattr", "(", "self", ",", "'extras_require'", ",", "None", ")", "or", "{", "}", "self", ".", "_tmp_extras_require", "=", "defaultdict", "(", "list", ")", "for", "section", ...
[ 429, 4 ]
[ 442, 68 ]
python
en
['en', 'error', 'th']
False
Distribution._suffix_for
(req)
For a requirement, return the 'extras_require' suffix for that requirement.
For a requirement, return the 'extras_require' suffix for that requirement.
def _suffix_for(req): """ For a requirement, return the 'extras_require' suffix for that requirement. """ return ':' + str(req.marker) if req.marker else ''
[ "def", "_suffix_for", "(", "req", ")", ":", "return", "':'", "+", "str", "(", "req", ".", "marker", ")", "if", "req", ".", "marker", "else", "''" ]
[ 445, 4 ]
[ 450, 58 ]
python
en
['en', 'error', 'th']
False
Distribution._move_install_requirements_markers
(self)
Move requirements in `install_requires` that are using environment markers `extras_require`.
Move requirements in `install_requires` that are using environment markers `extras_require`.
def _move_install_requirements_markers(self): """ Move requirements in `install_requires` that are using environment markers `extras_require`. """ # divide the install_requires into two sets, simple ones still # handled by install_requires and more complex ones handled ...
[ "def", "_move_install_requirements_markers", "(", "self", ")", ":", "# divide the install_requires into two sets, simple ones still", "# handled by install_requires and more complex ones handled", "# by extras_require.", "def", "is_simple_req", "(", "req", ")", ":", "return", "not", ...
[ 452, 4 ]
[ 476, 9 ]
python
en
['en', 'error', 'th']
False
Distribution._clean_req
(self, req)
Given a Requirement, remove environment markers and return it.
Given a Requirement, remove environment markers and return it.
def _clean_req(self, req): """ Given a Requirement, remove environment markers and return it. """ req.marker = None return req
[ "def", "_clean_req", "(", "self", ",", "req", ")", ":", "req", ".", "marker", "=", "None", "return", "req" ]
[ 478, 4 ]
[ 483, 18 ]
python
en
['en', 'error', 'th']
False
Distribution.parse_config_files
(self, filenames=None, ignore_option_errors=False)
Parses configuration files from various levels and loads configuration.
Parses configuration files from various levels and loads configuration.
def parse_config_files(self, filenames=None, ignore_option_errors=False): """Parses configuration files from various levels and loads configuration. """ _Distribution.parse_config_files(self, filenames=filenames) parse_configuration(self, self.command_options, ...
[ "def", "parse_config_files", "(", "self", ",", "filenames", "=", "None", ",", "ignore_option_errors", "=", "False", ")", ":", "_Distribution", ".", "parse_config_files", "(", "self", ",", "filenames", "=", "filenames", ")", "parse_configuration", "(", "self", ",...
[ 485, 4 ]
[ 494, 33 ]
python
en
['en', 'en', 'en']
True
Distribution.parse_command_line
(self)
Process features after parsing command line options
Process features after parsing command line options
def parse_command_line(self): """Process features after parsing command line options""" result = _Distribution.parse_command_line(self) if self.features: self._finalize_features() return result
[ "def", "parse_command_line", "(", "self", ")", ":", "result", "=", "_Distribution", ".", "parse_command_line", "(", "self", ")", "if", "self", ".", "features", ":", "self", ".", "_finalize_features", "(", ")", "return", "result" ]
[ 496, 4 ]
[ 501, 21 ]
python
en
['en', 'en', 'en']
True
Distribution._feature_attrname
(self, name)
Convert feature name to corresponding option attribute name
Convert feature name to corresponding option attribute name
def _feature_attrname(self, name): """Convert feature name to corresponding option attribute name""" return 'with_' + name.replace('-', '_')
[ "def", "_feature_attrname", "(", "self", ",", "name", ")", ":", "return", "'with_'", "+", "name", ".", "replace", "(", "'-'", ",", "'_'", ")" ]
[ 503, 4 ]
[ 505, 47 ]
python
en
['en', 'en', 'en']
True
Distribution.fetch_build_eggs
(self, requires)
Resolve pre-setup requirements
Resolve pre-setup requirements
def fetch_build_eggs(self, requires): """Resolve pre-setup requirements""" resolved_dists = pkg_resources.working_set.resolve( pkg_resources.parse_requirements(requires), installer=self.fetch_build_egg, replace_conflicting=True, ) for dist in resolved_...
[ "def", "fetch_build_eggs", "(", "self", ",", "requires", ")", ":", "resolved_dists", "=", "pkg_resources", ".", "working_set", ".", "resolve", "(", "pkg_resources", ".", "parse_requirements", "(", "requires", ")", ",", "installer", "=", "self", ".", "fetch_build...
[ 507, 4 ]
[ 516, 29 ]
python
en
['en', 'en', 'en']
True
Distribution.fetch_build_egg
(self, req)
Fetch an egg needed for building
Fetch an egg needed for building
def fetch_build_egg(self, req): """Fetch an egg needed for building""" from setuptools.command.easy_install import easy_install dist = self.__class__({'script_args': ['easy_install']}) opts = dist.get_option_dict('easy_install') opts.clear() opts.update( (k, v...
[ "def", "fetch_build_egg", "(", "self", ",", "req", ")", ":", "from", "setuptools", ".", "command", ".", "easy_install", "import", "easy_install", "dist", "=", "self", ".", "__class__", "(", "{", "'script_args'", ":", "[", "'easy_install'", "]", "}", ")", "...
[ 552, 4 ]
[ 579, 36 ]
python
en
['en', 'en', 'en']
True
Distribution._set_global_opts_from_features
(self)
Add --with-X/--without-X options based on optional features
Add --with-X/--without-X options based on optional features
def _set_global_opts_from_features(self): """Add --with-X/--without-X options based on optional features""" go = [] no = self.negative_opt.copy() for name, feature in self.features.items(): self._set_feature(name, None) feature.validate(self) if fea...
[ "def", "_set_global_opts_from_features", "(", "self", ")", ":", "go", "=", "[", "]", "no", "=", "self", ".", "negative_opt", ".", "copy", "(", ")", "for", "name", ",", "feature", "in", "self", ".", "features", ".", "items", "(", ")", ":", "self", "."...
[ 581, 4 ]
[ 606, 52 ]
python
en
['en', 'en', 'en']
True
Distribution._finalize_features
(self)
Add/remove features and resolve dependencies between them
Add/remove features and resolve dependencies between them
def _finalize_features(self): """Add/remove features and resolve dependencies between them""" # First, flag all the enabled items (and thus their dependencies) for name, feature in self.features.items(): enabled = self.feature_is_included(name) if enabled or (enabled is ...
[ "def", "_finalize_features", "(", "self", ")", ":", "# First, flag all the enabled items (and thus their dependencies)", "for", "name", ",", "feature", "in", "self", ".", "features", ".", "items", "(", ")", ":", "enabled", "=", "self", ".", "feature_is_included", "(...
[ 608, 4 ]
[ 623, 42 ]
python
en
['en', 'en', 'en']
True
Distribution.get_command_class
(self, command)
Pluggable version of get_command_class()
Pluggable version of get_command_class()
def get_command_class(self, command): """Pluggable version of get_command_class()""" if command in self.cmdclass: return self.cmdclass[command] eps = pkg_resources.iter_entry_points('distutils.commands', command) for ep in eps: ep.require(installer=self.fetch_bui...
[ "def", "get_command_class", "(", "self", ",", "command", ")", ":", "if", "command", "in", "self", ".", "cmdclass", ":", "return", "self", ".", "cmdclass", "[", "command", "]", "eps", "=", "pkg_resources", ".", "iter_entry_points", "(", "'distutils.commands'", ...
[ 625, 4 ]
[ 636, 65 ]
python
en
['en', 'en', 'en']
True
Distribution._set_feature
(self, name, status)
Set feature's inclusion status
Set feature's inclusion status
def _set_feature(self, name, status): """Set feature's inclusion status""" setattr(self, self._feature_attrname(name), status)
[ "def", "_set_feature", "(", "self", ",", "name", ",", "status", ")", ":", "setattr", "(", "self", ",", "self", ".", "_feature_attrname", "(", "name", ")", ",", "status", ")" ]
[ 654, 4 ]
[ 656, 59 ]
python
en
['en', 'fr', 'en']
True
Distribution.feature_is_included
(self, name)
Return 1 if feature is included, 0 if excluded, 'None' if unknown
Return 1 if feature is included, 0 if excluded, 'None' if unknown
def feature_is_included(self, name): """Return 1 if feature is included, 0 if excluded, 'None' if unknown""" return getattr(self, self._feature_attrname(name))
[ "def", "feature_is_included", "(", "self", ",", "name", ")", ":", "return", "getattr", "(", "self", ",", "self", ".", "_feature_attrname", "(", "name", ")", ")" ]
[ 658, 4 ]
[ 660, 58 ]
python
en
['en', 'en', 'en']
True
Distribution.include_feature
(self, name)
Request inclusion of feature named 'name
Request inclusion of feature named 'name
def include_feature(self, name): """Request inclusion of feature named 'name'""" if self.feature_is_included(name) == 0: descr = self.features[name].description raise DistutilsOptionError( descr + " is required, but was excluded or is not available" )...
[ "def", "include_feature", "(", "self", ",", "name", ")", ":", "if", "self", ".", "feature_is_included", "(", "name", ")", "==", "0", ":", "descr", "=", "self", ".", "features", "[", "name", "]", ".", "description", "raise", "DistutilsOptionError", "(", "...
[ 662, 4 ]
[ 671, 34 ]
python
en
['en', 'en', 'en']
True
Distribution.include
(self, **attrs)
Add items to distribution that are named in keyword arguments For example, 'dist.exclude(py_modules=["x"])' would add 'x' to the distribution's 'py_modules' attribute, if it was not already there. Currently, this method only supports inclusion for attributes that are lists or t...
Add items to distribution that are named in keyword arguments
def include(self, **attrs): """Add items to distribution that are named in keyword arguments For example, 'dist.exclude(py_modules=["x"])' would add 'x' to the distribution's 'py_modules' attribute, if it was not already there. Currently, this method only supports inclusion for...
[ "def", "include", "(", "self", ",", "*", "*", "attrs", ")", ":", "for", "k", ",", "v", "in", "attrs", ".", "items", "(", ")", ":", "include", "=", "getattr", "(", "self", ",", "'_include_'", "+", "k", ",", "None", ")", "if", "include", ":", "in...
[ 673, 4 ]
[ 693, 40 ]
python
en
['en', 'en', 'en']
True
Distribution.exclude_package
(self, package)
Remove packages, modules, and extensions in named package
Remove packages, modules, and extensions in named package
def exclude_package(self, package): """Remove packages, modules, and extensions in named package""" pfx = package + '.' if self.packages: self.packages = [ p for p in self.packages if p != package and not p.startswith(pfx) ] if se...
[ "def", "exclude_package", "(", "self", ",", "package", ")", ":", "pfx", "=", "package", "+", "'.'", "if", "self", ".", "packages", ":", "self", ".", "packages", "=", "[", "p", "for", "p", "in", "self", ".", "packages", "if", "p", "!=", "package", "...
[ 695, 4 ]
[ 715, 13 ]
python
en
['en', 'en', 'en']
True
Distribution.has_contents_for
(self, package)
Return true if 'exclude_package(package)' would do something
Return true if 'exclude_package(package)' would do something
def has_contents_for(self, package): """Return true if 'exclude_package(package)' would do something""" pfx = package + '.' for p in self.iter_distribution_names(): if p == package or p.startswith(pfx): return True
[ "def", "has_contents_for", "(", "self", ",", "package", ")", ":", "pfx", "=", "package", "+", "'.'", "for", "p", "in", "self", ".", "iter_distribution_names", "(", ")", ":", "if", "p", "==", "package", "or", "p", ".", "startswith", "(", "pfx", ")", "...
[ 717, 4 ]
[ 724, 27 ]
python
en
['en', 'en', 'en']
True
Distribution._exclude_misc
(self, name, value)
Handle 'exclude()' for list/tuple attrs without a special handler
Handle 'exclude()' for list/tuple attrs without a special handler
def _exclude_misc(self, name, value): """Handle 'exclude()' for list/tuple attrs without a special handler""" if not isinstance(value, sequence): raise DistutilsSetupError( "%s: setting must be a list or tuple (%r)" % (name, value) ) try: old =...
[ "def", "_exclude_misc", "(", "self", ",", "name", ",", "value", ")", ":", "if", "not", "isinstance", "(", "value", ",", "sequence", ")", ":", "raise", "DistutilsSetupError", "(", "\"%s: setting must be a list or tuple (%r)\"", "%", "(", "name", ",", "value", "...
[ 726, 4 ]
[ 743, 76 ]
python
en
['en', 'en', 'en']
True
Distribution._include_misc
(self, name, value)
Handle 'include()' for list/tuple attrs without a special handler
Handle 'include()' for list/tuple attrs without a special handler
def _include_misc(self, name, value): """Handle 'include()' for list/tuple attrs without a special handler""" if not isinstance(value, sequence): raise DistutilsSetupError( "%s: setting must be a list (%r)" % (name, value) ) try: old = getattr...
[ "def", "_include_misc", "(", "self", ",", "name", ",", "value", ")", ":", "if", "not", "isinstance", "(", "value", ",", "sequence", ")", ":", "raise", "DistutilsSetupError", "(", "\"%s: setting must be a list (%r)\"", "%", "(", "name", ",", "value", ")", ")"...
[ 745, 4 ]
[ 766, 42 ]
python
en
['en', 'en', 'en']
True
Distribution.exclude
(self, **attrs)
Remove items from distribution that are named in keyword arguments For example, 'dist.exclude(py_modules=["x"])' would remove 'x' from the distribution's 'py_modules' attribute. Excluding packages uses the 'exclude_package()' method, so all of the package's contained packages, modules,...
Remove items from distribution that are named in keyword arguments
def exclude(self, **attrs): """Remove items from distribution that are named in keyword arguments For example, 'dist.exclude(py_modules=["x"])' would remove 'x' from the distribution's 'py_modules' attribute. Excluding packages uses the 'exclude_package()' method, so all of the package...
[ "def", "exclude", "(", "self", ",", "*", "*", "attrs", ")", ":", "for", "k", ",", "v", "in", "attrs", ".", "items", "(", ")", ":", "exclude", "=", "getattr", "(", "self", ",", "'_exclude_'", "+", "k", ",", "None", ")", "if", "exclude", ":", "ex...
[ 768, 4 ]
[ 789, 40 ]
python
en
['en', 'en', 'en']
True
Distribution.get_cmdline_options
(self)
Return a '{cmd: {opt:val}}' map of all command-line options Option names are all long, but do not include the leading '--', and contain dashes rather than underscores. If the option doesn't take an argument (e.g. '--quiet'), the 'val' is 'None'. Note that options provided by config fi...
Return a '{cmd: {opt:val}}' map of all command-line options
def get_cmdline_options(self): """Return a '{cmd: {opt:val}}' map of all command-line options Option names are all long, but do not include the leading '--', and contain dashes rather than underscores. If the option doesn't take an argument (e.g. '--quiet'), the 'val' is 'None'. ...
[ "def", "get_cmdline_options", "(", "self", ")", ":", "d", "=", "{", "}", "for", "cmd", ",", "opts", "in", "self", ".", "command_options", ".", "items", "(", ")", ":", "for", "opt", ",", "(", "src", ",", "val", ")", "in", "opts", ".", "items", "("...
[ 824, 4 ]
[ 862, 16 ]
python
en
['en', 'en', 'en']
True
Distribution.iter_distribution_names
(self)
Yield all packages, modules, and extension names in distribution
Yield all packages, modules, and extension names in distribution
def iter_distribution_names(self): """Yield all packages, modules, and extension names in distribution""" for pkg in self.packages or (): yield pkg for module in self.py_modules or (): yield module for ext in self.ext_modules or (): if isinstance(ex...
[ "def", "iter_distribution_names", "(", "self", ")", ":", "for", "pkg", "in", "self", ".", "packages", "or", "(", ")", ":", "yield", "pkg", "for", "module", "in", "self", ".", "py_modules", "or", "(", ")", ":", "yield", "module", "for", "ext", "in", "...
[ 864, 4 ]
[ 880, 22 ]
python
en
['en', 'en', 'en']
True
Distribution.handle_display_options
(self, option_order)
If there were any non-global "display-only" options (--help-commands or the metadata display options) on the command line, display the requested info and return true; else return false.
If there were any non-global "display-only" options (--help-commands or the metadata display options) on the command line, display the requested info and return true; else return false.
def handle_display_options(self, option_order): """If there were any non-global "display-only" options (--help-commands or the metadata display options) on the command line, display the requested info and return true; else return false. """ import sys if six.PY2 ...
[ "def", "handle_display_options", "(", "self", ",", "option_order", ")", ":", "import", "sys", "if", "six", ".", "PY2", "or", "self", ".", "help_commands", ":", "return", "_Distribution", ".", "handle_display_options", "(", "self", ",", "option_order", ")", "# ...
[ 882, 4 ]
[ 915, 79 ]
python
en
['en', 'en', 'en']
True
Feature.include_by_default
(self)
Should this feature be included by default?
Should this feature be included by default?
def include_by_default(self): """Should this feature be included by default?""" return self.available and self.standard
[ "def", "include_by_default", "(", "self", ")", ":", "return", "self", ".", "available", "and", "self", ".", "standard" ]
[ 1013, 4 ]
[ 1015, 47 ]
python
en
['en', 'en', 'en']
True
Feature.include_in
(self, dist)
Ensure feature and its requirements are included in distribution You may override this in a subclass to perform additional operations on the distribution. Note that this method may be called more than once per feature, and so should be idempotent.
Ensure feature and its requirements are included in distribution
def include_in(self, dist): """Ensure feature and its requirements are included in distribution You may override this in a subclass to perform additional operations on the distribution. Note that this method may be called more than once per feature, and so should be idempotent. ...
[ "def", "include_in", "(", "self", ",", "dist", ")", ":", "if", "not", "self", ".", "available", ":", "raise", "DistutilsPlatformError", "(", "self", ".", "description", "+", "\" is required, \"", "\"but is not available on this platform\"", ")", "dist", ".", "incl...
[ 1017, 4 ]
[ 1035, 35 ]
python
en
['en', 'en', 'en']
True
Feature.exclude_from
(self, dist)
Ensure feature is excluded from distribution You may override this in a subclass to perform additional operations on the distribution. This method will be called at most once per feature, and only after all included features have been asked to include themselves.
Ensure feature is excluded from distribution
def exclude_from(self, dist): """Ensure feature is excluded from distribution You may override this in a subclass to perform additional operations on the distribution. This method will be called at most once per feature, and only after all included features have been asked to i...
[ "def", "exclude_from", "(", "self", ",", "dist", ")", ":", "dist", ".", "exclude", "(", "*", "*", "self", ".", "extras", ")", "if", "self", ".", "remove", ":", "for", "item", "in", "self", ".", "remove", ":", "dist", ".", "exclude_package", "(", "i...
[ 1037, 4 ]
[ 1050, 42 ]
python
en
['en', 'en', 'en']
True
Feature.validate
(self, dist)
Verify that feature makes sense in context of distribution This method is called by the distribution just before it parses its command line. It checks to ensure that the 'remove' attribute, if any, contains only valid package/module names that are present in the base distribution when ...
Verify that feature makes sense in context of distribution
def validate(self, dist): """Verify that feature makes sense in context of distribution This method is called by the distribution just before it parses its command line. It checks to ensure that the 'remove' attribute, if any, contains only valid package/module names that are present i...
[ "def", "validate", "(", "self", ",", "dist", ")", ":", "for", "item", "in", "self", ".", "remove", ":", "if", "not", "dist", ".", "has_contents_for", "(", "item", ")", ":", "raise", "DistutilsSetupError", "(", "\"%s wants to be able to remove %s, but the distrib...
[ 1052, 4 ]
[ 1069, 17 ]
python
en
['en', 'en', 'en']
True
FBCodeBuilder.render
(self, steps)
Converts nested actions to your builder's expected output format. Typically takes the output of build().
def render(self, steps): ''' Converts nested actions to your builder's expected output format. Typically takes the output of build(). ''' res = self._render_impl(steps) # Implementation-dependent # Now that the output is rendered, we expect all options to have ...
[ "def", "render", "(", "self", ",", "steps", ")", ":", "res", "=", "self", ".", "_render_impl", "(", "steps", ")", "# Implementation-dependent", "# Now that the output is rendered, we expect all options to have", "# been used.", "unused_options", "=", "set", "(", "self",...
[ 118, 4 ]
[ 137, 18 ]
python
en
['en', 'error', 'th']
False
FBCodeBuilder.setup
(self)
Your builder may want to install packages here.
Your builder may want to install packages here.
def setup(self): 'Your builder may want to install packages here.' raise NotImplementedError
[ "def", "setup", "(", "self", ")", ":", "raise", "NotImplementedError" ]
[ 145, 4 ]
[ 147, 33 ]
python
en
['en', 'en', 'en']
True
FBCodeBuilder.diagnostics
(self)
Log some system diagnostics before/after setup for ease of debugging
Log some system diagnostics before/after setup for ease of debugging
def diagnostics(self): 'Log some system diagnostics before/after setup for ease of debugging' # The builder's repr is not used in a command to avoid pointlessly # invalidating Docker's build cache. return self.step('Diagnostics', [ self.comment('Builder {0}'.format(repr(self)...
[ "def", "diagnostics", "(", "self", ")", ":", "# The builder's repr is not used in a command to avoid pointlessly", "# invalidating Docker's build cache.", "return", "self", ".", "step", "(", "'Diagnostics'", ",", "[", "self", ".", "comment", "(", "'Builder {0}'", ".", "fo...
[ 149, 4 ]
[ 159, 10 ]
python
en
['en', 'da', 'en']
True
FBCodeBuilder.step
(self, name, actions)
A labeled collection of actions or other steps
A labeled collection of actions or other steps
def step(self, name, actions): 'A labeled collection of actions or other steps' raise NotImplementedError
[ "def", "step", "(", "self", ",", "name", ",", "actions", ")", ":", "raise", "NotImplementedError" ]
[ 161, 4 ]
[ 163, 33 ]
python
en
['en', 'en', 'en']
True
FBCodeBuilder.run
(self, shell_cmd)
Run this bash command
Run this bash command
def run(self, shell_cmd): 'Run this bash command' raise NotImplementedError
[ "def", "run", "(", "self", ",", "shell_cmd", ")", ":", "raise", "NotImplementedError" ]
[ 165, 4 ]
[ 167, 33 ]
python
en
['en', 'en', 'en']
True
FBCodeBuilder.workdir
(self, dir)
Create this directory if it does not exist, and change into it
Create this directory if it does not exist, and change into it
def workdir(self, dir): 'Create this directory if it does not exist, and change into it' raise NotImplementedError
[ "def", "workdir", "(", "self", ",", "dir", ")", ":", "raise", "NotImplementedError" ]
[ 169, 4 ]
[ 171, 33 ]
python
en
['en', 'en', 'en']
True
FBCodeBuilder.copy_local_repo
(self, dir, dest_name)
Copy the local repo at `dir` into this step's `workdir()`, analog of: cp -r /path/to/folly folly
Copy the local repo at `dir` into this step's `workdir()`, analog of: cp -r /path/to/folly folly
def copy_local_repo(self, dir, dest_name): ''' Copy the local repo at `dir` into this step's `workdir()`, analog of: cp -r /path/to/folly folly ''' raise NotImplementedError
[ "def", "copy_local_repo", "(", "self", ",", "dir", ",", "dest_name", ")", ":", "raise", "NotImplementedError" ]
[ 173, 4 ]
[ 178, 33 ]
python
en
['en', 'error', 'th']
False
FBCodeBuilder.fb_github_project_workdir
(self, project_and_path, github_org='facebook')
This helper lets Facebook-internal CI special-cases FB projects
This helper lets Facebook-internal CI special-cases FB projects
def fb_github_project_workdir(self, project_and_path, github_org='facebook'): 'This helper lets Facebook-internal CI special-cases FB projects' project, path = project_and_path.split('/', 1) return self.github_project_workdir(github_org + '/' + project, path)
[ "def", "fb_github_project_workdir", "(", "self", ",", "project_and_path", ",", "github_org", "=", "'facebook'", ")", ":", "project", ",", "path", "=", "project_and_path", ".", "split", "(", "'/'", ",", "1", ")", "return", "self", ".", "github_project_workdir", ...
[ 276, 4 ]
[ 279, 76 ]
python
en
['en', 'en', 'en']
True
_should_use_osx_framework_prefix
()
Check for Apple's ``osx_framework_library`` scheme. Python distributed by Apple's Command Line Tools has this special scheme that's used when: * This is a framework build. * We are installing into the system prefix. This does not account for ``pip install --prefix`` (also means we're not inst...
Check for Apple's ``osx_framework_library`` scheme.
def _should_use_osx_framework_prefix() -> bool: """Check for Apple's ``osx_framework_library`` scheme. Python distributed by Apple's Command Line Tools has this special scheme that's used when: * This is a framework build. * We are installing into the system prefix. This does not account for ...
[ "def", "_should_use_osx_framework_prefix", "(", ")", "->", "bool", ":", "return", "(", "\"osx_framework_library\"", "in", "_AVAILABLE_SCHEMES", "and", "not", "running_under_virtualenv", "(", ")", "and", "is_osx_framework", "(", ")", ")" ]
[ 29, 0 ]
[ 52, 5 ]
python
en
['en', 'en', 'en']
True
_infer_prefix
()
Try to find a prefix scheme for the current platform. This tries: * A special ``osx_framework_library`` for Python distributed by Apple's Command Line Tools, when not running in a virtual environment. * Implementation + OS, used by PyPy on Windows (``pypy_nt``). * Implementation without OS, used...
Try to find a prefix scheme for the current platform.
def _infer_prefix() -> str: """Try to find a prefix scheme for the current platform. This tries: * A special ``osx_framework_library`` for Python distributed by Apple's Command Line Tools, when not running in a virtual environment. * Implementation + OS, used by PyPy on Windows (``pypy_nt``). ...
[ "def", "_infer_prefix", "(", ")", "->", "str", ":", "if", "_PREFERRED_SCHEME_API", ":", "return", "_PREFERRED_SCHEME_API", "(", "\"prefix\"", ")", "if", "_should_use_osx_framework_prefix", "(", ")", ":", "return", "\"osx_framework_library\"", "implementation_suffixed", ...
[ 55, 0 ]
[ 83, 25 ]
python
en
['en', 'en', 'en']
True
_infer_user
()
Try to find a user scheme for the current platform.
Try to find a user scheme for the current platform.
def _infer_user() -> str: """Try to find a user scheme for the current platform.""" if _PREFERRED_SCHEME_API: return _PREFERRED_SCHEME_API("user") if is_osx_framework() and not running_under_virtualenv(): suffixed = "osx_framework_user" else: suffixed = f"{os.name}_user" if s...
[ "def", "_infer_user", "(", ")", "->", "str", ":", "if", "_PREFERRED_SCHEME_API", ":", "return", "_PREFERRED_SCHEME_API", "(", "\"user\"", ")", "if", "is_osx_framework", "(", ")", "and", "not", "running_under_virtualenv", "(", ")", ":", "suffixed", "=", "\"osx_fr...
[ 86, 0 ]
[ 98, 23 ]
python
en
['en', 'en', 'en']
True
_infer_home
()
Try to find a home for the current platform.
Try to find a home for the current platform.
def _infer_home() -> str: """Try to find a home for the current platform.""" if _PREFERRED_SCHEME_API: return _PREFERRED_SCHEME_API("home") suffixed = f"{os.name}_home" if suffixed in _AVAILABLE_SCHEMES: return suffixed return "posix_home"
[ "def", "_infer_home", "(", ")", "->", "str", ":", "if", "_PREFERRED_SCHEME_API", ":", "return", "_PREFERRED_SCHEME_API", "(", "\"home\"", ")", "suffixed", "=", "f\"{os.name}_home\"", "if", "suffixed", "in", "_AVAILABLE_SCHEMES", ":", "return", "suffixed", "return", ...
[ 101, 0 ]
[ 108, 23 ]
python
en
['en', 'en', 'en']
True
get_scheme
( dist_name: str, user: bool = False, home: typing.Optional[str] = None, root: typing.Optional[str] = None, isolated: bool = False, prefix: typing.Optional[str] = None, )
Get the "scheme" corresponding to the input parameters. :param dist_name: the name of the package to retrieve the scheme for, used in the headers scheme path :param user: indicates to use the "user" scheme :param home: indicates to use the "home" scheme :param root: root under which other ...
Get the "scheme" corresponding to the input parameters.
def get_scheme( dist_name: str, user: bool = False, home: typing.Optional[str] = None, root: typing.Optional[str] = None, isolated: bool = False, prefix: typing.Optional[str] = None, ) -> Scheme: """ Get the "scheme" corresponding to the input parameters. :param dist_name: the name ...
[ "def", "get_scheme", "(", "dist_name", ":", "str", ",", "user", ":", "bool", "=", "False", ",", "home", ":", "typing", ".", "Optional", "[", "str", "]", "=", "None", ",", "root", ":", "typing", ".", "Optional", "[", "str", "]", "=", "None", ",", ...
[ 124, 0 ]
[ 198, 17 ]
python
en
['en', 'error', 'th']
False
msvc9_find_vcvarsall
(version)
Patched "distutils.msvc9compiler.find_vcvarsall" to use the standalone compiler build for Python (VCForPython). Fall back to original behavior when the standalone compiler is not available. Redirect the path of "vcvarsall.bat". Known supported compilers ------------------------- Microsoft...
Patched "distutils.msvc9compiler.find_vcvarsall" to use the standalone compiler build for Python (VCForPython). Fall back to original behavior when the standalone compiler is not available.
def msvc9_find_vcvarsall(version): """ Patched "distutils.msvc9compiler.find_vcvarsall" to use the standalone compiler build for Python (VCForPython). Fall back to original behavior when the standalone compiler is not available. Redirect the path of "vcvarsall.bat". Known supported compilers ...
[ "def", "msvc9_find_vcvarsall", "(", "version", ")", ":", "VC_BASE", "=", "r'Software\\%sMicrosoft\\DevDiv\\VCForPython\\%0.1f'", "key", "=", "VC_BASE", "%", "(", "''", ",", "version", ")", "try", ":", "# Per-user installs register the compiler path here", "productdir", "=...
[ 62, 0 ]
[ 102, 55 ]
python
en
['en', 'error', 'th']
False
msvc9_query_vcvarsall
(ver, arch='x86', *args, **kwargs)
Patched "distutils.msvc9compiler.query_vcvarsall" for support extra compilers. Set environment without use of "vcvarsall.bat". Known supported compilers ------------------------- Microsoft Visual C++ 9.0: Microsoft Visual C++ Compiler for Python 2.7 (x86, amd64) Microsoft Wind...
Patched "distutils.msvc9compiler.query_vcvarsall" for support extra compilers.
def msvc9_query_vcvarsall(ver, arch='x86', *args, **kwargs): """ Patched "distutils.msvc9compiler.query_vcvarsall" for support extra compilers. Set environment without use of "vcvarsall.bat". Known supported compilers ------------------------- Microsoft Visual C++ 9.0: Microsoft Vi...
[ "def", "msvc9_query_vcvarsall", "(", "ver", ",", "arch", "=", "'x86'", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "# Try to get environement from vcvarsall.bat (Classical way)", "try", ":", "orig", "=", "get_unpatched", "(", "msvc9_query_vcvarsall", ")", ...
[ 105, 0 ]
[ 149, 13 ]
python
en
['en', 'error', 'th']
False
msvc14_get_vc_env
(plat_spec)
Patched "distutils._msvccompiler._get_vc_env" for support extra compilers. Set environment without use of "vcvarsall.bat". Known supported compilers ------------------------- Microsoft Visual C++ 14.0: Microsoft Visual C++ Build Tools 2015 (x86, x64, arm) Microsoft Visual Stud...
Patched "distutils._msvccompiler._get_vc_env" for support extra compilers.
def msvc14_get_vc_env(plat_spec): """ Patched "distutils._msvccompiler._get_vc_env" for support extra compilers. Set environment without use of "vcvarsall.bat". Known supported compilers ------------------------- Microsoft Visual C++ 14.0: Microsoft Visual C++ Build Tools 2015 (x86...
[ "def", "msvc14_get_vc_env", "(", "plat_spec", ")", ":", "# Try to get environment from vcvarsall.bat (Classical way)", "try", ":", "return", "get_unpatched", "(", "msvc14_get_vc_env", ")", "(", "plat_spec", ")", "except", "distutils", ".", "errors", ".", "DistutilsPlatfor...
[ 152, 0 ]
[ 187, 13 ]
python
en
['en', 'error', 'th']
False
msvc14_gen_lib_options
(*args, **kwargs)
Patched "distutils._msvccompiler.gen_lib_options" for fix compatibility between "numpy.distutils" and "distutils._msvccompiler" (for Numpy < 1.11.2)
Patched "distutils._msvccompiler.gen_lib_options" for fix compatibility between "numpy.distutils" and "distutils._msvccompiler" (for Numpy < 1.11.2)
def msvc14_gen_lib_options(*args, **kwargs): """ Patched "distutils._msvccompiler.gen_lib_options" for fix compatibility between "numpy.distutils" and "distutils._msvccompiler" (for Numpy < 1.11.2) """ if "numpy.distutils" in sys.modules: import numpy as np if LegacyVersion(np.__...
[ "def", "msvc14_gen_lib_options", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "if", "\"numpy.distutils\"", "in", "sys", ".", "modules", ":", "import", "numpy", "as", "np", "if", "LegacyVersion", "(", "np", ".", "__version__", ")", "<", "LegacyVersi...
[ 190, 0 ]
[ 200, 65 ]
python
en
['en', 'error', 'th']
False
_augment_exception
(exc, version, arch='')
Add details to the exception message to help guide the user as to what action will resolve it.
Add details to the exception message to help guide the user as to what action will resolve it.
def _augment_exception(exc, version, arch=''): """ Add details to the exception message to help guide the user as to what action will resolve it. """ # Error if MSVC++ directory not found or environment not set message = exc.args[0] if "vcvarsall" in message.lower() or "visual c" in message...
[ "def", "_augment_exception", "(", "exc", ",", "version", ",", "arch", "=", "''", ")", ":", "# Error if MSVC++ directory not found or environment not set", "message", "=", "exc", ".", "args", "[", "0", "]", "if", "\"vcvarsall\"", "in", "message", ".", "lower", "(...
[ 203, 0 ]
[ 237, 26 ]
python
en
['en', 'error', 'th']
False
PlatformInfo.current_dir
(self, hidex86=False, x64=False)
Current platform specific subfolder. Parameters ---------- hidex86: bool return '' and not '\x86' if architecture is x86. x64: bool return '\x64' and not '\amd64' if architecture is amd64. Return ------ subfolder: str ...
Current platform specific subfolder.
def current_dir(self, hidex86=False, x64=False): """ Current platform specific subfolder. Parameters ---------- hidex86: bool return '' and not '\x86' if architecture is x86. x64: bool return '\x64' and not '\amd64' if architecture is amd64. ...
[ "def", "current_dir", "(", "self", ",", "hidex86", "=", "False", ",", "x64", "=", "False", ")", ":", "return", "(", "''", "if", "(", "self", ".", "current_cpu", "==", "'x86'", "and", "hidex86", ")", "else", "r'\\x64'", "if", "(", "self", ".", "curren...
[ 264, 4 ]
[ 284, 9 ]
python
en
['en', 'error', 'th']
False
PlatformInfo.target_dir
(self, hidex86=False, x64=False)
r""" Target platform specific subfolder. Parameters ---------- hidex86: bool return '' and not '\x86' if architecture is x86. x64: bool return '\x64' and not '\amd64' if architecture is amd64. Return ------ subfolder: str ...
r""" Target platform specific subfolder.
def target_dir(self, hidex86=False, x64=False): r""" Target platform specific subfolder. Parameters ---------- hidex86: bool return '' and not '\x86' if architecture is x86. x64: bool return '\x64' and not '\amd64' if architecture is amd64. ...
[ "def", "target_dir", "(", "self", ",", "hidex86", "=", "False", ",", "x64", "=", "False", ")", ":", "return", "(", "''", "if", "(", "self", ".", "target_cpu", "==", "'x86'", "and", "hidex86", ")", "else", "r'\\x64'", "if", "(", "self", ".", "target_c...
[ 286, 4 ]
[ 306, 9 ]
python
cy
['en', 'cy', 'hi']
False
PlatformInfo.cross_dir
(self, forcex86=False)
r""" Cross platform specific subfolder. Parameters ---------- forcex86: bool Use 'x86' as current architecture even if current acritecture is not x86. Return ------ subfolder: str '' if target architecture is current architect...
r""" Cross platform specific subfolder.
def cross_dir(self, forcex86=False): r""" Cross platform specific subfolder. Parameters ---------- forcex86: bool Use 'x86' as current architecture even if current acritecture is not x86. Return ------ subfolder: str '...
[ "def", "cross_dir", "(", "self", ",", "forcex86", "=", "False", ")", ":", "current", "=", "'x86'", "if", "forcex86", "else", "self", ".", "current_cpu", "return", "(", "''", "if", "self", ".", "target_cpu", "==", "current", "else", "self", ".", "target_d...
[ 308, 4 ]
[ 328, 9 ]
python
cy
['en', 'cy', 'hi']
False
RegistryInfo.visualstudio
(self)
Microsoft Visual Studio root registry key.
Microsoft Visual Studio root registry key.
def visualstudio(self): """ Microsoft Visual Studio root registry key. """ return 'VisualStudio'
[ "def", "visualstudio", "(", "self", ")", ":", "return", "'VisualStudio'" ]
[ 349, 4 ]
[ 353, 29 ]
python
en
['en', 'error', 'th']
False
RegistryInfo.sxs
(self)
Microsoft Visual Studio SxS registry key.
Microsoft Visual Studio SxS registry key.
def sxs(self): """ Microsoft Visual Studio SxS registry key. """ return os.path.join(self.visualstudio, 'SxS')
[ "def", "sxs", "(", "self", ")", ":", "return", "os", ".", "path", ".", "join", "(", "self", ".", "visualstudio", ",", "'SxS'", ")" ]
[ 356, 4 ]
[ 360, 53 ]
python
en
['en', 'error', 'th']
False
RegistryInfo.vc
(self)
Microsoft Visual C++ VC7 registry key.
Microsoft Visual C++ VC7 registry key.
def vc(self): """ Microsoft Visual C++ VC7 registry key. """ return os.path.join(self.sxs, 'VC7')
[ "def", "vc", "(", "self", ")", ":", "return", "os", ".", "path", ".", "join", "(", "self", ".", "sxs", ",", "'VC7'", ")" ]
[ 363, 4 ]
[ 367, 44 ]
python
en
['en', 'error', 'th']
False
RegistryInfo.vs
(self)
Microsoft Visual Studio VS7 registry key.
Microsoft Visual Studio VS7 registry key.
def vs(self): """ Microsoft Visual Studio VS7 registry key. """ return os.path.join(self.sxs, 'VS7')
[ "def", "vs", "(", "self", ")", ":", "return", "os", ".", "path", ".", "join", "(", "self", ".", "sxs", ",", "'VS7'", ")" ]
[ 370, 4 ]
[ 374, 44 ]
python
en
['en', 'error', 'th']
False
RegistryInfo.vc_for_python
(self)
Microsoft Visual C++ for Python registry key.
Microsoft Visual C++ for Python registry key.
def vc_for_python(self): """ Microsoft Visual C++ for Python registry key. """ return r'DevDiv\VCForPython'
[ "def", "vc_for_python", "(", "self", ")", ":", "return", "r'DevDiv\\VCForPython'" ]
[ 377, 4 ]
[ 381, 36 ]
python
en
['en', 'error', 'th']
False
RegistryInfo.microsoft_sdk
(self)
Microsoft SDK registry key.
Microsoft SDK registry key.
def microsoft_sdk(self): """ Microsoft SDK registry key. """ return 'Microsoft SDKs'
[ "def", "microsoft_sdk", "(", "self", ")", ":", "return", "'Microsoft SDKs'" ]
[ 384, 4 ]
[ 388, 31 ]
python
en
['en', 'error', 'th']
False
RegistryInfo.windows_sdk
(self)
Microsoft Windows/Platform SDK registry key.
Microsoft Windows/Platform SDK registry key.
def windows_sdk(self): """ Microsoft Windows/Platform SDK registry key. """ return os.path.join(self.microsoft_sdk, 'Windows')
[ "def", "windows_sdk", "(", "self", ")", ":", "return", "os", ".", "path", ".", "join", "(", "self", ".", "microsoft_sdk", ",", "'Windows'", ")" ]
[ 391, 4 ]
[ 395, 58 ]
python
en
['en', 'error', 'th']
False
RegistryInfo.netfx_sdk
(self)
Microsoft .NET Framework SDK registry key.
Microsoft .NET Framework SDK registry key.
def netfx_sdk(self): """ Microsoft .NET Framework SDK registry key. """ return os.path.join(self.microsoft_sdk, 'NETFXSDK')
[ "def", "netfx_sdk", "(", "self", ")", ":", "return", "os", ".", "path", ".", "join", "(", "self", ".", "microsoft_sdk", ",", "'NETFXSDK'", ")" ]
[ 398, 4 ]
[ 402, 59 ]
python
en
['en', 'error', 'th']
False
RegistryInfo.windows_kits_roots
(self)
Microsoft Windows Kits Roots registry key.
Microsoft Windows Kits Roots registry key.
def windows_kits_roots(self): """ Microsoft Windows Kits Roots registry key. """ return r'Windows Kits\Installed Roots'
[ "def", "windows_kits_roots", "(", "self", ")", ":", "return", "r'Windows Kits\\Installed Roots'" ]
[ 405, 4 ]
[ 409, 46 ]
python
en
['en', 'error', 'th']
False
RegistryInfo.microsoft
(self, key, x86=False)
Return key in Microsoft software registry. Parameters ---------- key: str Registry key path where look. x86: str Force x86 software registry. Return ------ str: value
Return key in Microsoft software registry.
def microsoft(self, key, x86=False): """ Return key in Microsoft software registry. Parameters ---------- key: str Registry key path where look. x86: str Force x86 software registry. Return ------ str: value """ ...
[ "def", "microsoft", "(", "self", ",", "key", ",", "x86", "=", "False", ")", ":", "node64", "=", "''", "if", "self", ".", "pi", ".", "current_is_x86", "(", ")", "or", "x86", "else", "'Wow6432Node'", "return", "os", ".", "path", ".", "join", "(", "'S...
[ 411, 4 ]
[ 427, 65 ]
python
en
['en', 'error', 'th']
False
RegistryInfo.lookup
(self, key, name)
Look for values in registry in Microsoft software registry. Parameters ---------- key: str Registry key path where look. name: str Value name to find. Return ------ str: value
Look for values in registry in Microsoft software registry.
def lookup(self, key, name): """ Look for values in registry in Microsoft software registry. Parameters ---------- key: str Registry key path where look. name: str Value name to find. Return ------ str: value """ ...
[ "def", "lookup", "(", "self", ",", "key", ",", "name", ")", ":", "KEY_READ", "=", "winreg", ".", "KEY_READ", "openkey", "=", "winreg", ".", "OpenKey", "ms", "=", "self", ".", "microsoft", "for", "hkey", "in", "self", ".", "HKEYS", ":", "try", ":", ...
[ 429, 4 ]
[ 461, 20 ]
python
en
['en', 'error', 'th']
False
SystemInfo.find_available_vc_vers
(self)
Find all available Microsoft Visual C++ versions.
Find all available Microsoft Visual C++ versions.
def find_available_vc_vers(self): """ Find all available Microsoft Visual C++ versions. """ ms = self.ri.microsoft vckeys = (self.ri.vc, self.ri.vc_for_python, self.ri.vs) vc_vers = [] for hkey in self.ri.HKEYS: for key in vckeys: try: ...
[ "def", "find_available_vc_vers", "(", "self", ")", ":", "ms", "=", "self", ".", "ri", ".", "microsoft", "vckeys", "=", "(", "self", ".", "ri", ".", "vc", ",", "self", ".", "ri", ".", "vc_for_python", ",", "self", ".", "ri", ".", "vs", ")", "vc_vers...
[ 494, 4 ]
[ 522, 30 ]
python
en
['en', 'error', 'th']
False
SystemInfo.VSInstallDir
(self)
Microsoft Visual Studio directory.
Microsoft Visual Studio directory.
def VSInstallDir(self): """ Microsoft Visual Studio directory. """ # Default path name = 'Microsoft Visual Studio %0.1f' % self.vc_ver default = os.path.join(self.ProgramFilesx86, name) # Try to get path from registry, if fail use default path return self...
[ "def", "VSInstallDir", "(", "self", ")", ":", "# Default path", "name", "=", "'Microsoft Visual Studio %0.1f'", "%", "self", ".", "vc_ver", "default", "=", "os", ".", "path", ".", "join", "(", "self", ".", "ProgramFilesx86", ",", "name", ")", "# Try to get pat...
[ 525, 4 ]
[ 534, 75 ]
python
en
['en', 'error', 'th']
False
SystemInfo.VCInstallDir
(self)
Microsoft Visual C++ directory.
Microsoft Visual C++ directory.
def VCInstallDir(self): """ Microsoft Visual C++ directory. """ self.VSInstallDir guess_vc = self._guess_vc() or self._guess_vc_legacy() # Try to get "VC++ for Python" path from registry as default path reg_path = os.path.join(self.ri.vc_for_python, '%0.1f' % se...
[ "def", "VCInstallDir", "(", "self", ")", ":", "self", ".", "VSInstallDir", "guess_vc", "=", "self", ".", "_guess_vc", "(", ")", "or", "self", ".", "_guess_vc_legacy", "(", ")", "# Try to get \"VC++ for Python\" path from registry as default path", "reg_path", "=", "...
[ 537, 4 ]
[ 557, 19 ]
python
en
['en', 'error', 'th']
False
SystemInfo._guess_vc
(self)
Locate Visual C for 2017
Locate Visual C for 2017
def _guess_vc(self): """ Locate Visual C for 2017 """ if self.vc_ver <= 14.0: return default = r'VC\Tools\MSVC' guess_vc = os.path.join(self.VSInstallDir, default) # Subdir with VC exact version as name try: vc_exact_ver = os.listd...
[ "def", "_guess_vc", "(", "self", ")", ":", "if", "self", ".", "vc_ver", "<=", "14.0", ":", "return", "default", "=", "r'VC\\Tools\\MSVC'", "guess_vc", "=", "os", ".", "path", ".", "join", "(", "self", ".", "VSInstallDir", ",", "default", ")", "# Subdir w...
[ 559, 4 ]
[ 573, 16 ]
python
en
['en', 'error', 'th']
False
SystemInfo._guess_vc_legacy
(self)
Locate Visual C for versions prior to 2017
Locate Visual C for versions prior to 2017
def _guess_vc_legacy(self): """ Locate Visual C for versions prior to 2017 """ default = r'Microsoft Visual Studio %0.1f\VC' % self.vc_ver return os.path.join(self.ProgramFilesx86, default)
[ "def", "_guess_vc_legacy", "(", "self", ")", ":", "default", "=", "r'Microsoft Visual Studio %0.1f\\VC'", "%", "self", ".", "vc_ver", "return", "os", ".", "path", ".", "join", "(", "self", ".", "ProgramFilesx86", ",", "default", ")" ]
[ 575, 4 ]
[ 580, 58 ]
python
en
['en', 'error', 'th']
False
SystemInfo.WindowsSdkVersion
(self)
Microsoft Windows SDK versions for specified MSVC++ version.
Microsoft Windows SDK versions for specified MSVC++ version.
def WindowsSdkVersion(self): """ Microsoft Windows SDK versions for specified MSVC++ version. """ if self.vc_ver <= 9.0: return ('7.0', '6.1', '6.0a') elif self.vc_ver == 10.0: return ('7.1', '7.0a') elif self.vc_ver == 11.0: return ('8...
[ "def", "WindowsSdkVersion", "(", "self", ")", ":", "if", "self", ".", "vc_ver", "<=", "9.0", ":", "return", "(", "'7.0'", ",", "'6.1'", ",", "'6.0a'", ")", "elif", "self", ".", "vc_ver", "==", "10.0", ":", "return", "(", "'7.1'", ",", "'7.0a'", ")", ...
[ 583, 4 ]
[ 596, 34 ]
python
en
['en', 'error', 'th']
False
SystemInfo.WindowsSdkLastVersion
(self)
Microsoft Windows SDK last version
Microsoft Windows SDK last version
def WindowsSdkLastVersion(self): """ Microsoft Windows SDK last version """ return self._use_last_dir_name(os.path.join( self.WindowsSdkDir, 'lib'))
[ "def", "WindowsSdkLastVersion", "(", "self", ")", ":", "return", "self", ".", "_use_last_dir_name", "(", "os", ".", "path", ".", "join", "(", "self", ".", "WindowsSdkDir", ",", "'lib'", ")", ")" ]
[ 599, 4 ]
[ 604, 39 ]
python
en
['en', 'error', 'th']
False
SystemInfo.WindowsSdkDir
(self)
Microsoft Windows SDK directory.
Microsoft Windows SDK directory.
def WindowsSdkDir(self): """ Microsoft Windows SDK directory. """ sdkdir = '' for ver in self.WindowsSdkVersion: # Try to get it from registry loc = os.path.join(self.ri.windows_sdk, 'v%s' % ver) sdkdir = self.ri.lookup(loc, 'installationfolder...
[ "def", "WindowsSdkDir", "(", "self", ")", ":", "sdkdir", "=", "''", "for", "ver", "in", "self", ".", "WindowsSdkVersion", ":", "# Try to get it from registry", "loc", "=", "os", ".", "path", ".", "join", "(", "self", ".", "ri", ".", "windows_sdk", ",", "...
[ 607, 4 ]
[ 642, 21 ]
python
en
['en', 'error', 'th']
False
SystemInfo.WindowsSDKExecutablePath
(self)
Microsoft Windows SDK executable directory.
Microsoft Windows SDK executable directory.
def WindowsSDKExecutablePath(self): """ Microsoft Windows SDK executable directory. """ # Find WinSDK NetFx Tools registry dir name if self.vc_ver <= 11.0: netfxver = 35 arch = '' else: netfxver = 40 hidex86 = True if self.v...
[ "def", "WindowsSDKExecutablePath", "(", "self", ")", ":", "# Find WinSDK NetFx Tools registry dir name", "if", "self", ".", "vc_ver", "<=", "11.0", ":", "netfxver", "=", "35", "arch", "=", "''", "else", ":", "netfxver", "=", "40", "hidex86", "=", "True", "if",...
[ 645, 4 ]
[ 673, 23 ]
python
en
['en', 'error', 'th']
False
SystemInfo.FSharpInstallDir
(self)
Microsoft Visual F# directory.
Microsoft Visual F# directory.
def FSharpInstallDir(self): """ Microsoft Visual F# directory. """ path = r'%0.1f\Setup\F#' % self.vc_ver path = os.path.join(self.ri.visualstudio, path) return self.ri.lookup(path, 'productdir') or ''
[ "def", "FSharpInstallDir", "(", "self", ")", ":", "path", "=", "r'%0.1f\\Setup\\F#'", "%", "self", ".", "vc_ver", "path", "=", "os", ".", "path", ".", "join", "(", "self", ".", "ri", ".", "visualstudio", ",", "path", ")", "return", "self", ".", "ri", ...
[ 676, 4 ]
[ 682, 55 ]
python
en
['en', 'error', 'th']
False
SystemInfo.UniversalCRTSdkDir
(self)
Microsoft Universal CRT SDK directory.
Microsoft Universal CRT SDK directory.
def UniversalCRTSdkDir(self): """ Microsoft Universal CRT SDK directory. """ # Set Kit Roots versions for specified MSVC++ version if self.vc_ver >= 14.0: vers = ('10', '81') else: vers = () # Find path of the more recent Kit for v...
[ "def", "UniversalCRTSdkDir", "(", "self", ")", ":", "# Set Kit Roots versions for specified MSVC++ version", "if", "self", ".", "vc_ver", ">=", "14.0", ":", "vers", "=", "(", "'10'", ",", "'81'", ")", "else", ":", "vers", "=", "(", ")", "# Find path of the more ...
[ 685, 4 ]
[ 701, 27 ]
python
en
['en', 'error', 'th']
False
SystemInfo.UniversalCRTSdkLastVersion
(self)
Microsoft Universal C Runtime SDK last version
Microsoft Universal C Runtime SDK last version
def UniversalCRTSdkLastVersion(self): """ Microsoft Universal C Runtime SDK last version """ return self._use_last_dir_name(os.path.join( self.UniversalCRTSdkDir, 'lib'))
[ "def", "UniversalCRTSdkLastVersion", "(", "self", ")", ":", "return", "self", ".", "_use_last_dir_name", "(", "os", ".", "path", ".", "join", "(", "self", ".", "UniversalCRTSdkDir", ",", "'lib'", ")", ")" ]
[ 704, 4 ]
[ 709, 44 ]
python
en
['en', 'error', 'th']
False
SystemInfo.NetFxSdkVersion
(self)
Microsoft .NET Framework SDK versions.
Microsoft .NET Framework SDK versions.
def NetFxSdkVersion(self): """ Microsoft .NET Framework SDK versions. """ # Set FxSdk versions for specified MSVC++ version if self.vc_ver >= 14.0: return ('4.6.1', '4.6') else: return ()
[ "def", "NetFxSdkVersion", "(", "self", ")", ":", "# Set FxSdk versions for specified MSVC++ version", "if", "self", ".", "vc_ver", ">=", "14.0", ":", "return", "(", "'4.6.1'", ",", "'4.6'", ")", "else", ":", "return", "(", ")" ]
[ 712, 4 ]
[ 720, 21 ]
python
en
['en', 'error', 'th']
False
SystemInfo.NetFxSdkDir
(self)
Microsoft .NET Framework SDK directory.
Microsoft .NET Framework SDK directory.
def NetFxSdkDir(self): """ Microsoft .NET Framework SDK directory. """ for ver in self.NetFxSdkVersion: loc = os.path.join(self.ri.netfx_sdk, ver) sdkdir = self.ri.lookup(loc, 'kitsinstallationfolder') if sdkdir: break return sd...
[ "def", "NetFxSdkDir", "(", "self", ")", ":", "for", "ver", "in", "self", ".", "NetFxSdkVersion", ":", "loc", "=", "os", ".", "path", ".", "join", "(", "self", ".", "ri", ".", "netfx_sdk", ",", "ver", ")", "sdkdir", "=", "self", ".", "ri", ".", "l...
[ 723, 4 ]
[ 732, 27 ]
python
en
['en', 'error', 'th']
False
SystemInfo.FrameworkDir32
(self)
Microsoft .NET Framework 32bit directory.
Microsoft .NET Framework 32bit directory.
def FrameworkDir32(self): """ Microsoft .NET Framework 32bit directory. """ # Default path guess_fw = os.path.join(self.WinDir, r'Microsoft.NET\Framework') # Try to get path from registry, if fail use default path return self.ri.lookup(self.ri.vc, 'frameworkdir32...
[ "def", "FrameworkDir32", "(", "self", ")", ":", "# Default path", "guess_fw", "=", "os", ".", "path", ".", "join", "(", "self", ".", "WinDir", ",", "r'Microsoft.NET\\Framework'", ")", "# Try to get path from registry, if fail use default path", "return", "self", ".", ...
[ 735, 4 ]
[ 743, 71 ]
python
en
['en', 'error', 'th']
False
SystemInfo.FrameworkDir64
(self)
Microsoft .NET Framework 64bit directory.
Microsoft .NET Framework 64bit directory.
def FrameworkDir64(self): """ Microsoft .NET Framework 64bit directory. """ # Default path guess_fw = os.path.join(self.WinDir, r'Microsoft.NET\Framework64') # Try to get path from registry, if fail use default path return self.ri.lookup(self.ri.vc, 'frameworkdir...
[ "def", "FrameworkDir64", "(", "self", ")", ":", "# Default path", "guess_fw", "=", "os", ".", "path", ".", "join", "(", "self", ".", "WinDir", ",", "r'Microsoft.NET\\Framework64'", ")", "# Try to get path from registry, if fail use default path", "return", "self", "."...
[ 746, 4 ]
[ 754, 71 ]
python
en
['en', 'error', 'th']
False
SystemInfo.FrameworkVersion32
(self)
Microsoft .NET Framework 32bit versions.
Microsoft .NET Framework 32bit versions.
def FrameworkVersion32(self): """ Microsoft .NET Framework 32bit versions. """ return self._find_dot_net_versions(32)
[ "def", "FrameworkVersion32", "(", "self", ")", ":", "return", "self", ".", "_find_dot_net_versions", "(", "32", ")" ]
[ 757, 4 ]
[ 761, 46 ]
python
en
['en', 'error', 'th']
False
SystemInfo.FrameworkVersion64
(self)
Microsoft .NET Framework 64bit versions.
Microsoft .NET Framework 64bit versions.
def FrameworkVersion64(self): """ Microsoft .NET Framework 64bit versions. """ return self._find_dot_net_versions(64)
[ "def", "FrameworkVersion64", "(", "self", ")", ":", "return", "self", ".", "_find_dot_net_versions", "(", "64", ")" ]
[ 764, 4 ]
[ 768, 46 ]
python
en
['en', 'error', 'th']
False
SystemInfo._find_dot_net_versions
(self, bits)
Find Microsoft .NET Framework versions. Parameters ---------- bits: int Platform number of bits: 32 or 64.
Find Microsoft .NET Framework versions.
def _find_dot_net_versions(self, bits): """ Find Microsoft .NET Framework versions. Parameters ---------- bits: int Platform number of bits: 32 or 64. """ # Find actual .NET version in registry reg_ver = self.ri.lookup(self.ri.vc, 'frameworkve...
[ "def", "_find_dot_net_versions", "(", "self", ",", "bits", ")", ":", "# Find actual .NET version in registry", "reg_ver", "=", "self", ".", "ri", ".", "lookup", "(", "self", ".", "ri", ".", "vc", ",", "'frameworkver%d'", "%", "bits", ")", "dot_net_dir", "=", ...
[ 770, 4 ]
[ 794, 27 ]
python
en
['en', 'error', 'th']
False
SystemInfo._use_last_dir_name
(self, path, prefix='')
Return name of the last dir in path or '' if no dir found. Parameters ---------- path: str Use dirs in this path prefix: str Use only dirs startings by this prefix
Return name of the last dir in path or '' if no dir found.
def _use_last_dir_name(self, path, prefix=''): """ Return name of the last dir in path or '' if no dir found. Parameters ---------- path: str Use dirs in this path prefix: str Use only dirs startings by this prefix """ matching_dir...
[ "def", "_use_last_dir_name", "(", "self", ",", "path", ",", "prefix", "=", "''", ")", ":", "matching_dirs", "=", "(", "dir_name", "for", "dir_name", "in", "reversed", "(", "os", ".", "listdir", "(", "path", ")", ")", "if", "os", ".", "path", ".", "is...
[ 796, 4 ]
[ 813, 46 ]
python
en
['en', 'error', 'th']
False
EnvironmentInfo.vc_ver
(self)
Microsoft Visual C++ version.
Microsoft Visual C++ version.
def vc_ver(self): """ Microsoft Visual C++ version. """ return self.si.vc_ver
[ "def", "vc_ver", "(", "self", ")", ":", "return", "self", ".", "si", ".", "vc_ver" ]
[ 850, 4 ]
[ 854, 29 ]
python
en
['en', 'error', 'th']
False
EnvironmentInfo.VSTools
(self)
Microsoft Visual Studio Tools
Microsoft Visual Studio Tools
def VSTools(self): """ Microsoft Visual Studio Tools """ paths = [r'Common7\IDE', r'Common7\Tools'] if self.vc_ver >= 14.0: arch_subdir = self.pi.current_dir(hidex86=True, x64=True) paths += [r'Common7\IDE\CommonExtensions\Microsoft\TestWindow'] ...
[ "def", "VSTools", "(", "self", ")", ":", "paths", "=", "[", "r'Common7\\IDE'", ",", "r'Common7\\Tools'", "]", "if", "self", ".", "vc_ver", ">=", "14.0", ":", "arch_subdir", "=", "self", ".", "pi", ".", "current_dir", "(", "hidex86", "=", "True", ",", "...
[ 857, 4 ]
[ 869, 75 ]
python
en
['en', 'error', 'th']
False
EnvironmentInfo.VCIncludes
(self)
Microsoft Visual C++ & Microsoft Foundation Class Includes
Microsoft Visual C++ & Microsoft Foundation Class Includes
def VCIncludes(self): """ Microsoft Visual C++ & Microsoft Foundation Class Includes """ return [os.path.join(self.si.VCInstallDir, 'Include'), os.path.join(self.si.VCInstallDir, r'ATLMFC\Include')]
[ "def", "VCIncludes", "(", "self", ")", ":", "return", "[", "os", ".", "path", ".", "join", "(", "self", ".", "si", ".", "VCInstallDir", ",", "'Include'", ")", ",", "os", ".", "path", ".", "join", "(", "self", ".", "si", ".", "VCInstallDir", ",", ...
[ 872, 4 ]
[ 877, 70 ]
python
en
['en', 'error', 'th']
False
EnvironmentInfo.VCLibraries
(self)
Microsoft Visual C++ & Microsoft Foundation Class Libraries
Microsoft Visual C++ & Microsoft Foundation Class Libraries
def VCLibraries(self): """ Microsoft Visual C++ & Microsoft Foundation Class Libraries """ if self.vc_ver >= 15.0: arch_subdir = self.pi.target_dir(x64=True) else: arch_subdir = self.pi.target_dir(hidex86=True) paths = ['Lib%s' % arch_subdir, r'ATL...
[ "def", "VCLibraries", "(", "self", ")", ":", "if", "self", ".", "vc_ver", ">=", "15.0", ":", "arch_subdir", "=", "self", ".", "pi", ".", "target_dir", "(", "x64", "=", "True", ")", "else", ":", "arch_subdir", "=", "self", ".", "pi", ".", "target_dir"...
[ 880, 4 ]
[ 893, 75 ]
python
en
['en', 'error', 'th']
False
EnvironmentInfo.VCStoreRefs
(self)
Microsoft Visual C++ store references Libraries
Microsoft Visual C++ store references Libraries
def VCStoreRefs(self): """ Microsoft Visual C++ store references Libraries """ if self.vc_ver < 14.0: return [] return [os.path.join(self.si.VCInstallDir, r'Lib\store\references')]
[ "def", "VCStoreRefs", "(", "self", ")", ":", "if", "self", ".", "vc_ver", "<", "14.0", ":", "return", "[", "]", "return", "[", "os", ".", "path", ".", "join", "(", "self", ".", "si", ".", "VCInstallDir", ",", "r'Lib\\store\\references'", ")", "]" ]
[ 896, 4 ]
[ 902, 76 ]
python
en
['en', 'error', 'th']
False
EnvironmentInfo.VCTools
(self)
Microsoft Visual C++ Tools
Microsoft Visual C++ Tools
def VCTools(self): """ Microsoft Visual C++ Tools """ si = self.si tools = [os.path.join(si.VCInstallDir, 'VCPackages')] forcex86 = True if self.vc_ver <= 10.0 else False arch_subdir = self.pi.cross_dir(forcex86) if arch_subdir: tools += [os.p...
[ "def", "VCTools", "(", "self", ")", ":", "si", "=", "self", ".", "si", "tools", "=", "[", "os", ".", "path", ".", "join", "(", "si", ".", "VCInstallDir", ",", "'VCPackages'", ")", "]", "forcex86", "=", "True", "if", "self", ".", "vc_ver", "<=", "...
[ 905, 4 ]
[ 934, 20 ]
python
en
['en', 'error', 'th']
False
EnvironmentInfo.OSLibraries
(self)
Microsoft Windows SDK Libraries
Microsoft Windows SDK Libraries
def OSLibraries(self): """ Microsoft Windows SDK Libraries """ if self.vc_ver <= 10.0: arch_subdir = self.pi.target_dir(hidex86=True, x64=True) return [os.path.join(self.si.WindowsSdkDir, 'Lib%s' % arch_subdir)] else: arch_subdir = self.pi.tar...
[ "def", "OSLibraries", "(", "self", ")", ":", "if", "self", ".", "vc_ver", "<=", "10.0", ":", "arch_subdir", "=", "self", ".", "pi", ".", "target_dir", "(", "hidex86", "=", "True", ",", "x64", "=", "True", ")", "return", "[", "os", ".", "path", ".",...
[ 937, 4 ]
[ 949, 73 ]
python
en
['en', 'error', 'th']
False
EnvironmentInfo.OSIncludes
(self)
Microsoft Windows SDK Include
Microsoft Windows SDK Include
def OSIncludes(self): """ Microsoft Windows SDK Include """ include = os.path.join(self.si.WindowsSdkDir, 'include') if self.vc_ver <= 10.0: return [include, os.path.join(include, 'gl')] else: if self.vc_ver >= 14.0: sdkver = self...
[ "def", "OSIncludes", "(", "self", ")", ":", "include", "=", "os", ".", "path", ".", "join", "(", "self", ".", "si", ".", "WindowsSdkDir", ",", "'include'", ")", "if", "self", ".", "vc_ver", "<=", "10.0", ":", "return", "[", "include", ",", "os", "....
[ 952, 4 ]
[ 968, 62 ]
python
en
['en', 'error', 'th']
False
EnvironmentInfo.OSLibpath
(self)
Microsoft Windows SDK Libraries Paths
Microsoft Windows SDK Libraries Paths
def OSLibpath(self): """ Microsoft Windows SDK Libraries Paths """ ref = os.path.join(self.si.WindowsSdkDir, 'References') libpath = [] if self.vc_ver <= 9.0: libpath += self.OSLibraries if self.vc_ver >= 11.0: libpath += [os.path.join(re...
[ "def", "OSLibpath", "(", "self", ")", ":", "ref", "=", "os", ".", "path", ".", "join", "(", "self", ".", "si", ".", "WindowsSdkDir", ",", "'References'", ")", "libpath", "=", "[", "]", "if", "self", ".", "vc_ver", "<=", "9.0", ":", "libpath", "+=",...
[ 971, 4 ]
[ 1013, 22 ]
python
en
['en', 'error', 'th']
False
EnvironmentInfo.SdkTools
(self)
Microsoft Windows SDK Tools
Microsoft Windows SDK Tools
def SdkTools(self): """ Microsoft Windows SDK Tools """ return list(self._sdk_tools())
[ "def", "SdkTools", "(", "self", ")", ":", "return", "list", "(", "self", ".", "_sdk_tools", "(", ")", ")" ]
[ 1016, 4 ]
[ 1020, 38 ]
python
en
['en', 'error', 'th']
False
EnvironmentInfo._sdk_tools
(self)
Microsoft Windows SDK Tools paths generator
Microsoft Windows SDK Tools paths generator
def _sdk_tools(self): """ Microsoft Windows SDK Tools paths generator """ if self.vc_ver < 15.0: bin_dir = 'Bin' if self.vc_ver <= 11.0 else r'Bin\x86' yield os.path.join(self.si.WindowsSdkDir, bin_dir) if not self.pi.current_is_x86(): arch_su...
[ "def", "_sdk_tools", "(", "self", ")", ":", "if", "self", ".", "vc_ver", "<", "15.0", ":", "bin_dir", "=", "'Bin'", "if", "self", ".", "vc_ver", "<=", "11.0", "else", "r'Bin\\x86'", "yield", "os", ".", "path", ".", "join", "(", "self", ".", "si", "...
[ 1022, 4 ]
[ 1050, 50 ]
python
en
['en', 'error', 'th']
False
EnvironmentInfo._sdk_subdir
(self)
Microsoft Windows SDK version subdir
Microsoft Windows SDK version subdir
def _sdk_subdir(self): """ Microsoft Windows SDK version subdir """ ucrtver = self.si.WindowsSdkLastVersion return ('%s\\' % ucrtver) if ucrtver else ''
[ "def", "_sdk_subdir", "(", "self", ")", ":", "ucrtver", "=", "self", ".", "si", ".", "WindowsSdkLastVersion", "return", "(", "'%s\\\\'", "%", "ucrtver", ")", "if", "ucrtver", "else", "''" ]
[ 1053, 4 ]
[ 1058, 52 ]
python
en
['en', 'error', 'th']
False
EnvironmentInfo.SdkSetup
(self)
Microsoft Windows SDK Setup
Microsoft Windows SDK Setup
def SdkSetup(self): """ Microsoft Windows SDK Setup """ if self.vc_ver > 9.0: return [] return [os.path.join(self.si.WindowsSdkDir, 'Setup')]
[ "def", "SdkSetup", "(", "self", ")", ":", "if", "self", ".", "vc_ver", ">", "9.0", ":", "return", "[", "]", "return", "[", "os", ".", "path", ".", "join", "(", "self", ".", "si", ".", "WindowsSdkDir", ",", "'Setup'", ")", "]" ]
[ 1061, 4 ]
[ 1068, 61 ]
python
en
['en', 'error', 'th']
False