diff --git a/pubtools/__init__.py b/pubtools/__init__.py deleted file mode 100644 index 7097d96..0000000 --- a/pubtools/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__path__ = __import__("pkgutil").extend_path(__path__, __name__) # pragma: no cover diff --git a/setup.py b/setup.py index fdb7e26..a33b195 100644 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ # import pkg_resources import sys -from setuptools import setup, find_packages +from setuptools import setup, find_namespace_packages from setuptools.command.test import test as TestCommand @@ -72,7 +72,8 @@ def read_content(filepath): url="https://gitlab.cee.redhat.com/jluza/pubtools-iib", classifiers=classifiers, python_requires=">=3.6", - packages=find_packages(exclude=["tests"]), + packages=find_namespace_packages(where="src"), + package_dir={"": "src"}, data_files=[], install_requires=INSTALL_REQURIES, dependency_links=DEPENDENCY_LINKS, diff --git a/pubtools/iib/__init__.py b/src/pubtools/iib/__init__.py similarity index 100% rename from pubtools/iib/__init__.py rename to src/pubtools/iib/__init__.py diff --git a/pubtools/iib/iib_ops.py b/src/pubtools/iib/iib_ops.py similarity index 100% rename from pubtools/iib/iib_ops.py rename to src/pubtools/iib/iib_ops.py diff --git a/pubtools/iib/utils.py b/src/pubtools/iib/utils.py similarity index 100% rename from pubtools/iib/utils.py rename to src/pubtools/iib/utils.py diff --git a/tox.ini b/tox.ini index f1f98ec..f1ce914 100644 --- a/tox.ini +++ b/tox.ini @@ -29,7 +29,7 @@ exclude=.svn,CVS,.bzr,.hg,.git,__pycache__,.tox,setup.py,docs deps= {[py]deps} basepython = python3.10 -commands = python -m pytest -v --cov=pubtools --cov-report=html --cov-report=xml {posargs} +commands = python -m pytest -v --cov=pubtools.iib --cov-report=html --cov-report=xml {posargs} [testenv:pypy3] deps= @@ -43,14 +43,14 @@ deps= black basepython = python3.10 commands = - pycodestyle --config=.pycodestyle --first pubtools - black --check pubtools + pycodestyle --config=.pycodestyle --first src/pubtools + black --check src/pubtools exclude=.svn,cvs,.bzr,.hg,.git,__pycache__,.tox,setup.py,docs [testenv:pydocstyle] deps= pydocstyle -commands = pydocstyle pubtools +commands = pydocstyle src/pubtools basepython = python3.10 exclude=.svn,CVS,.bzr,.hg,.git,__pycache__,.tox,setup.py,docs @@ -75,7 +75,7 @@ deps = types-setuptools mypy commands = - mypy pubtools + mypy src/pubtools [testenv:cov-travis] passenv = @@ -86,7 +86,7 @@ deps= coveralls usedevelop=true commands= - pytest --cov=pubtools {posargs} + pytest --cov=pubtools.iib {posargs} coveralls [testenv:pidiff]