Home
last modified time | relevance | path

Searched +full:python +full:- +full:pathlib (Results 1 – 25 of 355) sorted by relevance

12345678910>>...15

/external/python/cpython3/Tools/wasm/
Dwasm_build.py2 """Build script for Python on WebAssembly platforms.
4 $ ./Tools/wasm/wasm_builder.py emscripten-browser build repl
5 $ ./Tools/wasm/wasm_builder.py emscripten-node-dl build test
8 Primary build targets are "emscripten-node-dl" (NodeJS, dynamic linking),
9 "emscripten-browser", and "wasi".
16 and falls back to /opt/wasi-sdk.
18 The 'build' Python interpreter must be rebuilt every time Python's byte code
21 ./Tools/wasm/wasm_builder.py --clean build build
29 import pathlib
42 # for Python 3.8
[all …]
Dwasm_assets.py1 #!/usr/bin/env python
4 The WASM asset bundles are pre-loaded by the final WASM build. The bundle
7 - a stripped down, pyc-only stdlib zip file, e.g. {PREFIX}/lib/python311.zip
8 - os.py as marker module {PREFIX}/lib/python3.11/os.py
9 - empty lib-dynload directory, to make sure it is copied into the bundle {PREFIX}/lib/python3.11/li…
13 import pathlib
20 SRCDIR = pathlib.Path(__file__).parent.parent.parent.absolute()
25 WASM_LIB = pathlib.PurePath("lib")
27 WASM_LIB / f"python{sys.version_info.major}{sys.version_info.minor}.zip"
30 WASM_LIB / f"python{sys.version_info.major}.{sys.version_info.minor}"
[all …]
/external/python/pyfakefs/
DCHANGES.md7 * removed support for Python 3.7 (end of life)
13 ## [Version 5.2.3](https://pypi.python.org/pypi/pyfakefs/5.2.3) (2023-08-18)
21 ## [Version 5.2.3](https://pypi.python.org/pypi/pyfakefs/5.2.3) (2023-07-10)
22 Adds compatibility with PyPy 3.10 and Python 3.12.
25 * Re-create temp directory if it had been created before on resetting file system
27 * Exclude pytest `pathlib` modules from patching to avoid mixup of patched/unpatched
29 * Adapt to changes in Python 3.12 beta1 (only working partially,
31 * Adapt to changes in `shutil` in Python 3.12 beta2 (see [#814](../../issues/814)).
35 * Added a note regarding the incompatibility of the built-in `sqlite3` module with
39 * Added pytype check for non-test modules in CI (see [#599](../../issues/599)).
[all …]
/external/python/pyfakefs/pyfakefs/
Dfake_pathlib.py5 # http://www.apache.org/licenses/LICENSE-2.0
13 """A fake implementation for pathlib working with FakeFilesystem.
19 If using fake_filesystem_unittest.TestCase, pathlib gets replaced
22 * Stand-alone with FakeFilesystem:
37 import pathlib
41 from pathlib import PurePath
55 # pylint: disable=protected-access
61 # in Python 3.12, the flavour is no longer an own class,
62 # but points to the os-specific path module (posixpath/ntpath)
94 accessor = pathlib._Accessor # type: ignore[attr-defined]
[all …]
/external/python/pyfakefs/pyfakefs/tests/
Dfake_pathlib_test.py6 # http://www.apache.org/licenses/LICENSE-2.0
19 python docs.
24 import pathlib
55 self.pathlib = pathlib
56 self.path = pathlib.Path
69 self.assertTrue(isinstance(path, self.pathlib.WindowsPath))
70 self.assertTrue(isinstance(path, self.pathlib.PureWindowsPath))
71 self.assertTrue(self.pathlib.PurePosixPath())
75 self.pathlib.PosixPath()
77 self.assertTrue(self.pathlib.PosixPath())
[all …]
/external/pigweed/pw_module/py/
Dcheck_test.py7 # https://www.apache.org/licenses/LICENSE-2.0
17 import pathlib
40 full_file_path = pathlib.Path(self.test_dir, path)
54 directory = str(pathlib.Path(self.test_dir, directory))
61 directory = str(pathlib.Path(self.test_dir, directory))
67 # Have Python code --> have setup.py.
69 # Python files; no setup --> error.
76 # Python files; have setup.py --> ok.
80 # Have C++ code --> have C++ tests.
89 # Have Python code --> have Python tests.
[all …]
/external/google-cloud-java/owl-bot-postprocessor/synthtool/sources/
Dgit.py7 # https://www.apache.org/licenses/LICENSE-2.0
16 import pathlib
34 def make_repo_clone_url(repo: str) -> str:
35 """Returns a fully-qualified repo URL on GitHub from a string containing
47 def _local_default_branch(path: pathlib.Path) -> Union[str, None]:
55 path {pathlib.Path} - Path to the local git clone
58 string -- The inferred default branch.
62 ["git", "branch", "--sort=-committerdate", "--format=%(refname:short)"],
65 .decode("utf-8")
76 dest: pathlib.Path = None,
[all …]
/external/pigweed/pw_doctor/py/pw_doctor/
Ddoctor.py8 # https://www.apache.org/licenses/LICENSE-2.0
22 import pathlib
37 return proc.stdout.decode('utf-8')
66 except: # pylint: disable=bare-except
100 except: # pylint: disable=bare-except
147 ) -> bool:
150 # Support `mac-arm64` through Rosetta until `mac-arm64` binaries are ready
165 env_root = pathlib.Path(os.environ['_PW_ACTUAL_ENVIRONMENT_ROOT'])
199 root = pathlib.Path(os.environ['PW_ROOT']).resolve()
209 git_root = pathlib.Path(
[all …]
/external/python/pyfakefs/docs/
Dusage.rst5 --------------
18 .. code:: python
27 (invalid-name)``,
31 .. code:: python
34 def fake_filesystem(fs): # pylint:disable=invalid-name
40 Class-, module- and session-scoped fixtures
42 For convenience, class-, module- and session-scoped fixtures with the same
54 If you are using the Python ``unittest`` package, the easiest approach is to
61 .. code:: python
82 .. code:: python
[all …]
/external/pigweed/pw_build/py/pw_build/
Dcreate_gn_venv.py7 # https://www.apache.org/licenses/LICENSE-2.0
18 import pathlib
26 def _parse_args() -> argparse.Namespace:
29 '--depfile',
30 type=pathlib.Path,
35 '--destination-dir',
36 type=pathlib.Path,
41 '--stampfile',
42 type=pathlib.Path,
49 def _rm_dir(path_to_delete: pathlib.Path) -> None:
[all …]
/external/python/cpython2/PCbuild/
Dget_external.py5 import pathlib
10 def fetch_zip(commit_hash, zip_dir, *, org='python', binary=False, verbose):
11 repo = f'cpython-{"bin" if binary else "source"}-deps'
33 p.add_argument('-v', '--verbose', action='store_true')
34 p.add_argument('-b', '--binary', action='store_true',
36 p.add_argument('-O', '--organization',
37 help='Organization owning the deps repos', default='python')
38 p.add_argument('-e', '--externals-dir', type=pathlib.Path,
40 default=pathlib.Path(__file__).parent.parent / 'externals')
/external/bazelbuild-rules_python/gazelle/modules_mapping/
Dgenerator.py7 # http://www.apache.org/licenses/LICENSE-2.0
17 import pathlib
49 ext = pathlib.Path(path).suffix
62 module = root[: -len("/__init__.py")].replace("/", ".")
70 ext = "".join(pathlib.Path(root).suffixes)
71 module = root[: -len(ext)].replace("/", ".")
96 pp = pathlib.PurePath(path)
102 + "https://www.python.org/dev/peps/pep-0427/#file-name-convention"
104 return pp.name[: pp.name.find("-")]
108 # Ref: https://www.python.org/dev/peps/pep-0427/#file-contents.
[all …]
/external/python/parse_type/tasks/
D_tasklet_cleanup.py1 # -*- coding: UTF-8 -*-
6 PYTHON PACKAGE REQUIREMENTS:
7 * path.py >= 8.2.1 (as path-object abstraction)
8 * pathlib (for ant-like wildcard patterns; since: python > 3.5)
9 * pycmd (required-by: clean_python())
12 -------------------------------------------------------------------------------
17 .. code-block:: yaml
19 # -- FILE: invoke.yaml
23 - **/tmp/
25 - **/*.log
[all …]
/external/python/google-api-python-client/scripts/
Dbuildprbody_test.py7 # http://www.apache.org/licenses/LICENSE-2.0
19 import pathlib
26 SCRIPTS_DIR = pathlib.Path(__file__).parent.resolve()
31 bigquery v2 https://github.com/googleapis/google-api-python-client/commit/123
32 cloudtasks v2 https://github.com/googleapis/google-api-python-client/commit/456
35 feat(bigquery): update the api https://github.com/googleapis/google-api-python-client/commit/123
36 feat(cloudtasks): update the api https://github.com/googleapis/google-api-python-client/commit/456
37 feat(drive): update the api https://github.com/googleapis/google-api-python-client/commit/789
46 base_uri = "https://github.com/googleapis/google-api-python-client/commit/"
/external/tensorflow/tensorflow/tools/docs/
Dgenerate2.py7 # http://www.apache.org/licenses/LICENSE-2.0
18 python generate2.py --output_dir=/tmp/out
29 import pathlib
47 from tensorflow.python.framework import ops
48 from tensorflow.python.util import tf_export
49 from tensorflow.python.util import tf_inspect
54 # pylint: disable=g-import-not-at-top
56 from tensorflow.python.types import doc_typealias
61 # pylint: enable=g-import-not-at-top
90 "Include meta-data search hints at the top of each file.")
[all …]
/external/python/cpython3/PCbuild/
Dget_external.py5 import pathlib
12 def fetch_zip(commit_hash, zip_dir, *, org='python', binary=False, verbose):
13 repo = f'cpython-{"bin" if binary else "source"}-deps'
35 p.add_argument('-v', '--verbose', action='store_true')
36 p.add_argument('-b', '--binary', action='store_true',
38 p.add_argument('-O', '--organization',
39 help='Organization owning the deps repos', default='python')
40 p.add_argument('-e', '--externals-dir', type=pathlib.Path,
42 default=pathlib.Path(__file__).parent.parent / 'externals')
/external/cronet/third_party/libc++/src/test/libcxx/
Dtransitive_includes_to_csv.py1 #!/usr/bin/env python
2 # ===----------------------------------------------------------------------===##
6 # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
8 # ===----------------------------------------------------------------------===##
11 from typing import List # Needed for python 3.8 compatibility.
13 import pathlib
21 level: int = -1
24 def parse_line(line: str) -> header:
26 Parse an output line from --trace-includes into a `header`.
40 # the pattern to avoid needing another level of escaping on the Python string
[all …]
/external/pigweed/pw_package/
Ddocs.rst1 .. _module-pw_package:
8 :ref:`module-pw_env_setup`. Examples of reasons packages should be managed using
19 -----
21 -----
28 ``pw package install <package-name>``
29 Installs ``<package-name>``. Exactly how this works is package-dependent,
32 ``--force`` to remove the package before installing.
34 ``pw package status <package-name>``
35 Indicates whether ``<package-name>`` is installed.
37 ``pw package remove <package-name>``
[all …]
/external/bazelbuild-rules_python/tools/private/update_deps/
Dargs.py7 # http://www.apache.org/licenses/LICENSE-2.0
17 import pathlib
19 from python.runfiles import runfiles
22 def path_from_runfiles(input: str) -> pathlib.Path:
29 the pathlib.Path path to a file which is verified to exist.
31 path = pathlib.Path(runfiles.Create().Rlocation(input))
/external/pigweed/pw_package/py/pw_package/packages/
Dboringssl.py7 # https://www.apache.org/licenses/LICENSE-2.0
17 import pathlib
24 def boringssl_repo_path(path: pathlib.Path) -> pathlib.Path:
45 def status(self, path: pathlib.Path) -> bool:
53 def install(self, path: pathlib.Path) -> None:
64 subprocess.run(['python', script, 'gn'], cwd=path)
68 def info(self, path: pathlib.Path) -> Sequence[str]:
/external/python/cpython3/.github/
DCODEOWNERS1 # See https://help.github.com/articles/about-codeowners/
5 # https://git-scm.com/docs/gitignore#_pattern_format
8 .github/** @ezio-melotti
23 Python/ceval.c @markshannon
24 Python/compile.c @markshannon
25 Python/ast_opt.c @isidentical
34 Python/traceback.c @iritkatriel
35 Python/pythonrun.c @iritkatriel
56 /Lib/html/ @ezio-melotti
57 /Lib/_markupbase.py @ezio-melotti
[all …]
/external/python/cpython3/Lib/
Dzipapp.py3 import pathlib
12 # The __main__.py used if the users specifies "-m module:fn".
13 # Note that this will always be written as UTF-8 (module and
14 # function names can be non-ASCII in Python 3).
15 # We add a coding cookie even though UTF-8 is the default in Python 3
16 # because the resulting archive may be intended to be run under Python 2.
18 # -*- coding: utf-8 -*-
24 # The Windows launcher defaults to UTF-8 when parsing shebang lines if the
25 # file has no BOM. So use UTF-8 on Windows.
28 shebang_encoding = 'utf-8'
[all …]
/external/tensorflow/tensorflow/lite/g3doc/tools/
Dbuild_py_api_docs.py7 # http://www.apache.org/licenses/LICENSE-2.0
15 r"""Generate python docs for tf.lite.
20 python build_docs.py --output_dir=/path/to/output
25 import pathlib
44 flags.DEFINE_string('site_path', 'lite/api_docs/python',
54 base_dir=str(pathlib.Path(tf.__file__).parent),
/external/tensorflow/tensorflow/lite/ios/
Dextract_object_files_test.py7 # http://www.apache.org/licenses/LICENSE-2.0
19 import pathlib
23 from tensorflow.python.platform import resource_loader
24 from tensorflow.python.platform import test
63 actual = pathlib.Path(os.path.join(dest_dir, file)).read_bytes()
64 expected = pathlib.Path(
/external/pigweed/pw_module/py/pw_module/
Dcheck.py7 # https://www.apache.org/licenses/LICENSE-2.0
18 import pathlib
28 def check_modules(modules: Sequence[str]) -> int:
47 def check_module(module) -> bool:
50 if not pathlib.Path(module).is_dir():
61 'Running checker: %s - %s',
92 # No per-file error to put in a "cerr" list, so just log.
142 @checker('PWCK001', 'If there is Python code, there is a setup.py')
147 yield Issue('Python code present but no setup.py.')
158 @checker('PWCK003', 'If there are Python files, there are Python tests')
[all …]

12345678910>>...15