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 be2c0be..67571c1 100644 --- a/setup.py +++ b/setup.py @@ -1,4 +1,4 @@ -from setuptools import setup, find_packages +from setuptools import setup, find_namespace_packages def get_description(): @@ -22,7 +22,9 @@ def get_requirements(): setup( name="pubtools-ami", version="2.3.1", - packages=find_packages(exclude=["tests"]), + + packages=find_namespace_packages(where="src"), + package_dir={"": "src"}, url="https://github.com/release-engineering/pubtools-ami", license="GNU General Public License", description=get_description(), diff --git a/pubtools/_ami/__init__.py b/src/pubtools/_ami/__init__.py similarity index 100% rename from pubtools/_ami/__init__.py rename to src/pubtools/_ami/__init__.py diff --git a/pubtools/_ami/arguments.py b/src/pubtools/_ami/arguments.py similarity index 100% rename from pubtools/_ami/arguments.py rename to src/pubtools/_ami/arguments.py diff --git a/pubtools/_ami/rhsm.py b/src/pubtools/_ami/rhsm.py similarity index 100% rename from pubtools/_ami/rhsm.py rename to src/pubtools/_ami/rhsm.py diff --git a/pubtools/_ami/services/__init__.py b/src/pubtools/_ami/services/__init__.py similarity index 100% rename from pubtools/_ami/services/__init__.py rename to src/pubtools/_ami/services/__init__.py diff --git a/pubtools/_ami/services/aws.py b/src/pubtools/_ami/services/aws.py similarity index 100% rename from pubtools/_ami/services/aws.py rename to src/pubtools/_ami/services/aws.py diff --git a/pubtools/_ami/services/base.py b/src/pubtools/_ami/services/base.py similarity index 100% rename from pubtools/_ami/services/base.py rename to src/pubtools/_ami/services/base.py diff --git a/pubtools/_ami/services/collector.py b/src/pubtools/_ami/services/collector.py similarity index 100% rename from pubtools/_ami/services/collector.py rename to src/pubtools/_ami/services/collector.py diff --git a/pubtools/_ami/services/rhsm_.py b/src/pubtools/_ami/services/rhsm_.py similarity index 100% rename from pubtools/_ami/services/rhsm_.py rename to src/pubtools/_ami/services/rhsm_.py diff --git a/pubtools/_ami/step.py b/src/pubtools/_ami/step.py similarity index 100% rename from pubtools/_ami/step.py rename to src/pubtools/_ami/step.py diff --git a/pubtools/_ami/task.py b/src/pubtools/_ami/task.py similarity index 100% rename from pubtools/_ami/task.py rename to src/pubtools/_ami/task.py diff --git a/pubtools/_ami/tasks/__init__.py b/src/pubtools/_ami/tasks/__init__.py similarity index 100% rename from pubtools/_ami/tasks/__init__.py rename to src/pubtools/_ami/tasks/__init__.py diff --git a/pubtools/_ami/tasks/base.py b/src/pubtools/_ami/tasks/base.py similarity index 100% rename from pubtools/_ami/tasks/base.py rename to src/pubtools/_ami/tasks/base.py diff --git a/pubtools/_ami/tasks/delete.py b/src/pubtools/_ami/tasks/delete.py similarity index 100% rename from pubtools/_ami/tasks/delete.py rename to src/pubtools/_ami/tasks/delete.py diff --git a/pubtools/_ami/tasks/exceptions.py b/src/pubtools/_ami/tasks/exceptions.py similarity index 100% rename from pubtools/_ami/tasks/exceptions.py rename to src/pubtools/_ami/tasks/exceptions.py diff --git a/pubtools/_ami/tasks/push.py b/src/pubtools/_ami/tasks/push.py similarity index 100% rename from pubtools/_ami/tasks/push.py rename to src/pubtools/_ami/tasks/push.py diff --git a/tox.ini b/tox.ini index 8eb1def..c69ea80 100644 --- a/tox.ini +++ b/tox.ini @@ -8,7 +8,7 @@ allowlist_externals=sh [testenv:static] commands= - sh -c 'pylint pubtools; test $(( $? & (1|2|4|32) )) = 0' + sh -c 'pylint src/pubtools; test $(( $? & (1|2|4|32) )) = 0' [testenv:pidiff] skip_install=true @@ -17,7 +17,7 @@ commands=pidiff pubtools-ami . [testenv:cov] usedevelop=true commands= - pytest --cov-report=html --cov-report=xml --cov=pubtools {posargs} + pytest --cov-report=html --cov-report=xml --cov=src/pubtools {posargs} [testenv:docs] use_develop=true