From 481ee5fecbba8fddf1837ecfde643087b94a6743 Mon Sep 17 00:00:00 2001 From: Aidan McMahon-Smith Date: Tue, 21 May 2024 13:37:14 +0200 Subject: [PATCH] Use src structure to enable pubtools namespace [RHELDST-17607] --- pubtools/__init__.py | 1 - setup.py | 6 ++++-- {pubtools => src/pubtools}/_ami/__init__.py | 0 {pubtools => src/pubtools}/_ami/arguments.py | 0 {pubtools => src/pubtools}/_ami/rhsm.py | 0 {pubtools => src/pubtools}/_ami/services/__init__.py | 0 {pubtools => src/pubtools}/_ami/services/aws.py | 0 {pubtools => src/pubtools}/_ami/services/base.py | 0 {pubtools => src/pubtools}/_ami/services/collector.py | 0 {pubtools => src/pubtools}/_ami/services/rhsm_.py | 0 {pubtools => src/pubtools}/_ami/step.py | 0 {pubtools => src/pubtools}/_ami/task.py | 0 {pubtools => src/pubtools}/_ami/tasks/__init__.py | 0 {pubtools => src/pubtools}/_ami/tasks/base.py | 0 {pubtools => src/pubtools}/_ami/tasks/delete.py | 0 {pubtools => src/pubtools}/_ami/tasks/exceptions.py | 0 {pubtools => src/pubtools}/_ami/tasks/push.py | 0 17 files changed, 4 insertions(+), 3 deletions(-) delete mode 100644 pubtools/__init__.py rename {pubtools => src/pubtools}/_ami/__init__.py (100%) rename {pubtools => src/pubtools}/_ami/arguments.py (100%) rename {pubtools => src/pubtools}/_ami/rhsm.py (100%) rename {pubtools => src/pubtools}/_ami/services/__init__.py (100%) rename {pubtools => src/pubtools}/_ami/services/aws.py (100%) rename {pubtools => src/pubtools}/_ami/services/base.py (100%) rename {pubtools => src/pubtools}/_ami/services/collector.py (100%) rename {pubtools => src/pubtools}/_ami/services/rhsm_.py (100%) rename {pubtools => src/pubtools}/_ami/step.py (100%) rename {pubtools => src/pubtools}/_ami/task.py (100%) rename {pubtools => src/pubtools}/_ami/tasks/__init__.py (100%) rename {pubtools => src/pubtools}/_ami/tasks/base.py (100%) rename {pubtools => src/pubtools}/_ami/tasks/delete.py (100%) rename {pubtools => src/pubtools}/_ami/tasks/exceptions.py (100%) rename {pubtools => src/pubtools}/_ami/tasks/push.py (100%) 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