Create a wheel that, when installed, will make the source package 'editable' (add it to the interpreter's path, including metadata) per PEP 660. Replaces 'setup.py develop'. .. note:: One of the mechanisms briefly mentioned in PEP 660 to implement editable installs is to create a separated directory inside ``build`` and use a .pth file to point to that directory. In the context of this file such directory is referred as *auxiliary build directory* or ``auxiliary_dir``.
Class | editable |
Build 'editable' wheel for development. This command is private and reserved for internal use of setuptools, users should rely on ``setuptools.build_meta`` APIs. |
Class |
|
Undocumented |
Class |
|
File system does not seem to support either symlinks or hard links. |
Exception |
|
Currently there is no clear way of displaying messages to the users that use the setuptools backend directly via ``pip``. The only thing that might work is a warning, although it is not the most appropriate tool for the job... |
Class | _ |
Possible editable installation modes: `lenient` (new files automatically added to the package - DEFAULT); `strict` (requires a new installation when files are added/removed); or `compat` (attempts to emulate `python setup... |
Class | _ |
Creates a ``.pth`` file that points to a link tree in the ``auxiliary_dir``. |
Class | _ |
No class docstring; 0/6 instance variable, 2/3 methods documented |
Class | _ |
Undocumented |
Class | _ |
Undocumented |
Exception | _ |
Undocumented |
Function | _absolute |
Works for packages and top-level modules |
Function | _can |
Undocumented |
Function | _empty |
Create a directory ensured to be empty. Existing files may be removed. |
Function | _find |
Undocumented |
Function | _find |
Undocumented |
Function | _find |
Undocumented |
Function | _find |
Undocumented |
Function | _find |
By carefully designing ``package_dir``, it is possible to implement the logical structure of PEP 420 in a package without the corresponding directories. |
Function | _finder |
Create a string containing the code for the``MetaPathFinder`` and ``PathEntryFinder``. |
Function | _is |
Return ``True`` if ``pkg`` is nested inside ``parent`` both logically and in the file system. >>> _is_nested("a.b", "path/a/b", "a", "path/a") True >>> _is_nested("a.b", "path/a/b", "a", "otherpath/a") False >>> _is_nested("a... |
Function | _parent |
Infer the parent path containing a package, that if added to ``sys.path`` would allow importing that package. When ``pkg`` is directly mapped into a directory with a different name, return its own path... |
Function | _remove |
Undocumented |
Function | _simple |
Return ``True`` if: - all packages are contained by the same parent directory, **and** - all packages become importable if the parent directory is added to ``sys.path``. |
Constant | _FINDER |
Undocumented |
Constant | _LENIENT |
Undocumented |
Constant | _STRICT |
Undocumented |
Type Variable | _P |
Undocumented |
Type Alias | _ |
Undocumented |
Variable | _logger |
Undocumented |
List[ str]
, pkg_roots: Dict[ str, str]
) -> Iterator[ Tuple[ str, List[ str]]]
:
(source)
¶
Undocumented
Iterable[ str]
, package_dir: Mapping[ str, str]
, src_root: _Path
) -> Dict[ str, str]
:
(source)
¶
Undocumented
By carefully designing ``package_dir``, it is possible to implement the logical structure of PEP 420 in a package without the corresponding directories. Moreover a parent package can be purposefully/accidentally skipped in the discovery phase (e.g. ``find_packages(include=["mypkg.*"])``, when ``mypkg.foo`` is included by ``mypkg`` itself is not). We consider this case to also be a virtual namespace (ignoring the original directory) to emulate a non-editable installation. This function will try to find these kinds of namespaces.
str
, mapping: Mapping[ str, str]
, namespaces: Dict[ str, List[ str]]
) -> str
:
(source)
¶
Create a string containing the code for the``MetaPathFinder`` and ``PathEntryFinder``.
Return ``True`` if ``pkg`` is nested inside ``parent`` both logically and in the file system. >>> _is_nested("a.b", "path/a/b", "a", "path/a") True >>> _is_nested("a.b", "path/a/b", "a", "otherpath/a") False >>> _is_nested("a.b", "path/a/b", "c", "path/c") False >>> _is_nested("a.a", "path/a/a", "a", "path/a") True >>> _is_nested("b.a", "path/b/a", "a", "path/a") False
Infer the parent path containing a package, that if added to ``sys.path`` would allow importing that package. When ``pkg`` is directly mapped into a directory with a different name, return its own path. >>> _parent_path("a", "src/a") 'src' >>> _parent_path("b", "src/c") 'src/c'
Iterable[ str]
, package_dir: Dict[ str, str]
, project_dir: Path
) -> bool
:
(source)
¶
Return ``True`` if: - all packages are contained by the same parent directory, **and** - all packages become importable if the parent directory is added to ``sys.path``. >>> _simple_layout(['a'], {"": "src"}, "/tmp/myproj") True >>> _simple_layout(['a', 'a.b'], {"": "src"}, "/tmp/myproj") True >>> _simple_layout(['a', 'a.b'], {}, "/tmp/myproj") True >>> _simple_layout(['a', 'a.a1', 'a.a1.a2', 'b'], {"": "src"}, "/tmp/myproj") True >>> _simple_layout(['a', 'a.a1', 'a.a1.a2', 'b'], {"a": "a", "b": "b"}, ".") True >>> _simple_layout(['a', 'a.a1', 'a.a1.a2', 'b'], {"a": "_a", "b": "_b"}, ".") False >>> _simple_layout(['a', 'a.a1', 'a.a1.a2', 'b'], {"a": "_a"}, "/tmp/myproj") False >>> _simple_layout(['a', 'a.a1', 'a.a1.a2', 'b'], {"a.a1.a2": "_a2"}, ".") False >>> _simple_layout(['a', 'a.b'], {"": "src", "a.b": "_ab"}, "/tmp/myproj") False >>> # Special cases, no packages yet: >>> _simple_layout([], {"": "src"}, "/tmp/myproj") True >>> _simple_layout([], {"a": "_a", "": "src"}, "/tmp/myproj") False
Undocumented
Value |
|
Undocumented
Value |
|