Skip to content

Commit

Permalink
Use pubtools namespace to resolve init file conflict [RHELDST-17607]
Browse files Browse the repository at this point in the history
Currently, there's an issue with packaging where most of the pubtool-<lib> projects
contains __init__.py and other stuff which is supposed to belong only to pubtools.
Python namespaces are a convenient way to work around this issue.
  • Loading branch information
amcmahon-rh committed May 30, 2024
1 parent 4e0e306 commit 3db5922
Show file tree
Hide file tree
Showing 18 changed files with 6 additions and 5 deletions.
1 change: 0 additions & 1 deletion pubtools/__init__.py

This file was deleted.

6 changes: 4 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from setuptools import setup, find_packages
from setuptools import setup, find_namespace_packages


def get_description():
Expand All @@ -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(),
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 3db5922

Please sign in to comment.