Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions bids/ext/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
"""
The PyBIDS extension namespace package

``bids.ext`` is reserved as a namespace for extensions to install into.
To write such an extension, the following things are needed:

1) Create a new package with the following structure (assuming setuptools)::

package/
bids/
ext/
__init__.py
EXTENSION/
__init__.py
...
setup.cfg
setup.py

The important things to note are that the ``bids/`` directory must be
empty apart from ``ext/`` and ``bids/ext/`` must be empty except for
your extension and an ``__init__.py``.

2) Place the following (and nothing else) in ``__init__.py``::

__path__ = __import__('pkgutil').extend_path(__path__, __name__)

3) Include the following lines in ``setup.cfg``::

[options]
install_requires =
pybids >= 0.15
packages = find_namespace:

[options.packages.find]
include =
bids.ext.EXTENSION
bids.ext.EXTENSION.*

"""

__path__ = __import__('pkgutil').extend_path(__path__, __name__)