diff --git a/docs/conf.py b/docs/conf.py index c04a2c77..06df9cc4 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -6,13 +6,14 @@ # Get the project root dir, which is the parent dir of this cwd = Path.cwd() project_root = cwd.parent +src_root = project_root / "src" -sys.path.insert(0, str(project_root)) +sys.path.insert(0, str(src_root)) sys.path.insert(0, str(cwd / "_ext")) # package data about = {} -with open("../vcspull/__about__.py") as fp: +with open(src_root / "vcspull" / "__about__.py") as fp: exec(fp.read(), about) extensions = [ @@ -221,16 +222,18 @@ def linkcode_resolve(domain, info): # NOQA: C901 fn = relpath(fn, start=dirname(vcspull.__file__)) if "dev" in about["__version__"]: - return "{}/blob/master/{}/{}{}".format( + return "{}/blob/master/{}/{}/{}{}".format( about["__github__"], + "src", about["__package_name__"], fn, linespec, ) else: - return "{}/blob/v{}/{}/{}{}".format( + return "{}/blob/v{}/{}/{}/{}{}".format( about["__github__"], about["__version__"], + "src", about["__package_name__"], fn, linespec, diff --git a/pyproject.toml b/pyproject.toml index b8a9208b..963d9e53 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -19,7 +19,7 @@ classifiers = [ "Topic :: System :: Shells", ] packages = [ - { include = "vcspull" }, + { include = "*", from = "src" }, ] include = [ { path = "tests", format = "sdist" }, diff --git a/setup.cfg b/setup.cfg index d75bd85f..f2b0fa7f 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [flake8] -exclude = .*/,.tox,*.egg,vcspull/__*__.py, +exclude = .*/,.tox,*.egg,src/vcspull/__*__.py, select = E,W,F,N max-line-length = 88 # Stuff we ignore thanks to black: https://github.com/ambv/black/issues/429 @@ -19,6 +19,6 @@ line_length = 88 [tool:pytest] addopts = --tb=short --no-header --showlocals testpaths = - vcspull + src/vcspull tests docs diff --git a/vcspull/__about__.py b/src/vcspull/__about__.py similarity index 100% rename from vcspull/__about__.py rename to src/vcspull/__about__.py diff --git a/vcspull/__init__.py b/src/vcspull/__init__.py similarity index 100% rename from vcspull/__init__.py rename to src/vcspull/__init__.py diff --git a/vcspull/cli/__init__.py b/src/vcspull/cli/__init__.py similarity index 100% rename from vcspull/cli/__init__.py rename to src/vcspull/cli/__init__.py diff --git a/vcspull/cli/sync.py b/src/vcspull/cli/sync.py similarity index 100% rename from vcspull/cli/sync.py rename to src/vcspull/cli/sync.py diff --git a/vcspull/config.py b/src/vcspull/config.py similarity index 100% rename from vcspull/config.py rename to src/vcspull/config.py diff --git a/vcspull/exc.py b/src/vcspull/exc.py similarity index 100% rename from vcspull/exc.py rename to src/vcspull/exc.py diff --git a/vcspull/log.py b/src/vcspull/log.py similarity index 100% rename from vcspull/log.py rename to src/vcspull/log.py diff --git a/vcspull/util.py b/src/vcspull/util.py similarity index 100% rename from vcspull/util.py rename to src/vcspull/util.py