diff --git a/CHANGES b/CHANGES index e07a90c6c..892d74050 100644 --- a/CHANGES +++ b/CHANGES @@ -23,6 +23,7 @@ $ pip install --user --upgrade --pre libtmux - Fixes #402: {func}`common.tmux_cmd` will only strip _trailing_ empty lines. Before this change, all empty lines were filtered out. This will lead to a more accurate behavior when using {meth}`Pane.capture_pane`. Credit: @rockandska, via #405. +- Source files for `libtmux` modules moved to `src/`, via #414. ### Development diff --git a/docs/conf.py b/docs/conf.py index 3a8abd835..f5d81447b 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -11,13 +11,14 @@ # Get the project root dir, which is the parent dir of this cwd = Path(__file__).parent project_root = cwd.parent +project_src = project_root / "src" -sys.path.insert(0, str(project_root)) +sys.path.insert(0, str(project_src)) sys.path.insert(0, str(cwd / "_ext")) # package data about: Dict[str, str] = {} -with open(project_root / "libtmux" / "__about__.py") as fp: +with open(project_src / "libtmux" / "__about__.py") as fp: exec(fp.read(), about) extensions = [ diff --git a/pyproject.toml b/pyproject.toml index b3331f6bc..0952659c3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -27,7 +27,7 @@ keywords = ["tmux", "session manager", "terminal", "ncurses"] homepage = "http://github.com/tmux-python/libtmux/" readme = "README.md" packages = [ - { include = "libtmux" }, + { include = "*", from = "src" }, ] include = [ { path = "CHANGES", format = "sdist" }, diff --git a/setup.cfg b/setup.cfg index 7fd0a0140..2547e7343 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [flake8] -exclude = .*/,*.egg,libtmux/_compat.py,libtmux/__*__.py +exclude = .*/,*.egg,src/libtmux/_compat.py,src/libtmux/__*__.py select = E,W,F,N max-line-length = 88 # Stuff we ignore thanks to black: https://github.com/ambv/black/issues/429 @@ -22,6 +22,6 @@ filterwarnings = addopts = --tb=short --no-header --showlocals --doctest-docutils-modules --reruns 2 -p no:doctest doctest_optionflags = ELLIPSIS NORMALIZE_WHITESPACE testpaths = - libtmux + src/libtmux tests docs diff --git a/libtmux/__about__.py b/src/libtmux/__about__.py similarity index 100% rename from libtmux/__about__.py rename to src/libtmux/__about__.py diff --git a/libtmux/__init__.py b/src/libtmux/__init__.py similarity index 100% rename from libtmux/__init__.py rename to src/libtmux/__init__.py diff --git a/libtmux/_compat.py b/src/libtmux/_compat.py similarity index 100% rename from libtmux/_compat.py rename to src/libtmux/_compat.py diff --git a/libtmux/common.py b/src/libtmux/common.py similarity index 100% rename from libtmux/common.py rename to src/libtmux/common.py diff --git a/libtmux/conftest.py b/src/libtmux/conftest.py similarity index 100% rename from libtmux/conftest.py rename to src/libtmux/conftest.py diff --git a/libtmux/exc.py b/src/libtmux/exc.py similarity index 100% rename from libtmux/exc.py rename to src/libtmux/exc.py diff --git a/libtmux/formats.py b/src/libtmux/formats.py similarity index 100% rename from libtmux/formats.py rename to src/libtmux/formats.py diff --git a/libtmux/pane.py b/src/libtmux/pane.py similarity index 100% rename from libtmux/pane.py rename to src/libtmux/pane.py diff --git a/libtmux/py.typed b/src/libtmux/py.typed similarity index 100% rename from libtmux/py.typed rename to src/libtmux/py.typed diff --git a/libtmux/pytest_plugin.py b/src/libtmux/pytest_plugin.py similarity index 100% rename from libtmux/pytest_plugin.py rename to src/libtmux/pytest_plugin.py diff --git a/libtmux/server.py b/src/libtmux/server.py similarity index 100% rename from libtmux/server.py rename to src/libtmux/server.py diff --git a/libtmux/session.py b/src/libtmux/session.py similarity index 100% rename from libtmux/session.py rename to src/libtmux/session.py diff --git a/libtmux/test.py b/src/libtmux/test.py similarity index 100% rename from libtmux/test.py rename to src/libtmux/test.py diff --git a/libtmux/window.py b/src/libtmux/window.py similarity index 100% rename from libtmux/window.py rename to src/libtmux/window.py