Skip to content

Commit 1d64e3e

Browse files
authored
refactor!: Move to src/ layout (#414)
2 parents 5cd0bfc + 778ceeb commit 1d64e3e

18 files changed

+7
-5
lines changed

CHANGES

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ $ pip install --user --upgrade --pre libtmux
2323
- Fixes #402: {func}`common.tmux_cmd` will only strip _trailing_ empty lines. Before this change,
2424
all empty lines were filtered out. This will lead to a more accurate behavior when using
2525
{meth}`Pane.capture_pane`. Credit: @rockandska, via #405.
26+
- Source files for `libtmux` modules moved to `src/`, via #414.
2627

2728
### Development
2829

docs/conf.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,14 @@
1111
# Get the project root dir, which is the parent dir of this
1212
cwd = Path(__file__).parent
1313
project_root = cwd.parent
14+
project_src = project_root / "src"
1415

15-
sys.path.insert(0, str(project_root))
16+
sys.path.insert(0, str(project_src))
1617
sys.path.insert(0, str(cwd / "_ext"))
1718

1819
# package data
1920
about: Dict[str, str] = {}
20-
with open(project_root / "libtmux" / "__about__.py") as fp:
21+
with open(project_src / "libtmux" / "__about__.py") as fp:
2122
exec(fp.read(), about)
2223

2324
extensions = [

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ keywords = ["tmux", "session manager", "terminal", "ncurses"]
2727
homepage = "http://github.com/tmux-python/libtmux/"
2828
readme = "README.md"
2929
packages = [
30-
{ include = "libtmux" },
30+
{ include = "*", from = "src" },
3131
]
3232
include = [
3333
{ path = "CHANGES", format = "sdist" },

setup.cfg

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[flake8]
2-
exclude = .*/,*.egg,libtmux/_compat.py,libtmux/__*__.py
2+
exclude = .*/,*.egg,src/libtmux/_compat.py,src/libtmux/__*__.py
33
select = E,W,F,N
44
max-line-length = 88
55
# Stuff we ignore thanks to black: https://github.com/ambv/black/issues/429
@@ -22,6 +22,6 @@ filterwarnings =
2222
addopts = --tb=short --no-header --showlocals --doctest-docutils-modules --reruns 2 -p no:doctest
2323
doctest_optionflags = ELLIPSIS NORMALIZE_WHITESPACE
2424
testpaths =
25-
libtmux
25+
src/libtmux
2626
tests
2727
docs
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)