numpy 1.22.4 Pypi GitHub Homepage
Other Docs
NotesParameters
add_data_dir(self, data_path)

Recursively add files under data_path to the list of data_files to be installed (and distributed). The data_path can be either a relative path-name, or an absolute path-name, or a 2-tuple where the first argument shows where in the install directory the data directory should be installed to.

Notes

Rules for installation paths:

foo/bar -> (foo/bar, foo/bar) -> parent/foo/bar
(gun, foo/bar) -> parent/gun
foo/* -> (foo/a, foo/a), (foo/b, foo/b) -> parent/foo/a, parent/foo/b
(gun, foo/*) -> (gun, foo/a), (gun, foo/b) -> gun
(gun/*, foo/*) -> parent/gun/a, parent/gun/b
/foo/bar -> (bar, /foo/bar) -> parent/bar
(gun, /foo/bar) -> parent/gun
(fun/*/gun/*, sun/foo/bar) -> parent/fun/foo/gun/bar

Parameters

data_path : seq or str

Argument can be either

  • 2-sequence (<datadir suffix>, <path to data directory>)

  • path to data directory where python datadir suffix defaults to package dir.

Recursively add files under data_path to data_files list.

Examples

For example suppose the source directory contains fun/foo.dat and fun/bar/car.dat:

This example is valid syntax, but we were not able to check execution
>>> self.add_data_dir('fun')                       #doctest: +SKIP
... self.add_data_dir(('sun', 'fun')) #doctest: +SKIP
... self.add_data_dir(('gun', '/full/path/to/fun'))#doctest: +SKIP

<package install directory>/

fun/

foo.dat bar/ car.dat

sun/

foo.dat bar/ car.dat

gun/

foo.dat car.dat

See :

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


GitHub : /numpy/distutils/misc_util.py#1074
type: <class 'function'>
Commit: