File tree Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Original file line number Diff line number Diff line change 1+ """
2+ The PyBIDS extension namespace package
3+
4+ ``bids.ext`` is reserved as a namespace for extensions to install into.
5+ To write such an extension, the following things are needed:
6+
7+ 1) Create a new package with the following structure (assuming setuptools)::
8+
9+ package/
10+ bids/
11+ ext/
12+ __init__.py
13+ EXTENSION/
14+ __init__.py
15+ ...
16+ setup.cfg
17+ setup.py
18+
19+ The important things to note are that the ``bids/`` directory must be
20+ empty apart from ``ext/`` and ``bids/ext/`` must be empty except for
21+ your extension and an ``__init__.py``.
22+
23+ 2) Place the following (and nothing else) in ``__init__.py``::
24+
25+ __path__ = __import__('pkgutil').extend_path(__path__, __name__)
26+
27+ 3) Include the following lines in ``setup.cfg``::
28+
29+ [options]
30+ install_requires =
31+ pybids >= 0.15
32+ packages = find_namespace:
33+
34+ [options.packages.find]
35+ include =
36+ bids.ext.EXTENSION
37+ bids.ext.EXTENSION.*
38+
39+ """
40+
41+ __path__ = __import__ ('pkgutil' ).extend_path (__path__ , __name__ )
You can’t perform that action at this time.
0 commit comments