Skip to content

Use pubtools namespace to resolve init file conflict [RHELDST-17607] #224

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
SOURCEDIR = .
SOURCEDIR =
BUILDDIR = _build

# Put it first so that "make" without argument is like "make help".
Expand Down
8 changes: 4 additions & 4 deletions docs/schema.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,28 +17,28 @@ reference.
Repository
----------

.. include:: ../pubtools/pulplib/_impl/schema/repository.yaml
.. include:: ../src/pubtools/pulplib/_impl/schema/repository.yaml
:code: yaml


Task
----

.. include:: ../pubtools/pulplib/_impl/schema/task.yaml
.. include:: ../src/pubtools/pulplib/_impl/schema/task.yaml
:code: yaml


Unit
----

.. include:: ../pubtools/pulplib/_impl/schema/unit.yaml
.. include:: ../src/pubtools/pulplib/_impl/schema/unit.yaml
:code: yaml


Maintenance
-----------

.. include:: ../pubtools/pulplib/_impl/schema/maintenance.yaml
.. include:: ../src/pubtools/pulplib/_impl/schema/maintenance.yaml
:code: yaml

.. _JSON schema: https://json-schema.org/
1 change: 0 additions & 1 deletion pubtools/__init__.py

This file was deleted.

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

try:
from setuptools import find_namespace_packages
except ImportError:
# Workaround for RHEL-8 RPM packaging that uses setuptools 39.2
# find_namespace_packages is supported since setuptools 40.1
# Loosely backported from https://github.com/pypa/setuptools/blob/main/setuptools/discovery.py
from setuptools import PackageFinder

class PEP420PackageFinder(PackageFinder):
@staticmethod
def _looks_like_package(_path):
return True

find_namespace_packages = PEP420PackageFinder.find


def get_description():
Expand All @@ -22,7 +37,8 @@ def get_requirements():
setup(
name="pubtools-pulplib",
version="2.39.1",
packages=find_packages(exclude=["tests"]),
packages=find_namespace_packages(where="src"),
package_dir={"": "src"},
package_data={"pubtools.pulplib._impl.schema": ["*.yaml"]},
url="https://github.com/release-engineering/pubtools-pulplib",
license="GNU General Public License",
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.
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ deps=
pylint==2.7.2
commands=
black --check .
sh -c 'pylint pubtools; test $(( $? & (1|2|4|32) )) = 0'
sh -c 'pylint src/pubtools/pulplib; test $(( $? & (1|2|4|32) )) = 0'

[testenv:pidiff]
deps=pidiff
Expand All @@ -27,7 +27,7 @@ deps=
pytest-timeout
usedevelop=true
commands=
pytest -svv --timeout 60 --cov-report=html --cov-report=xml --cov=pubtools --cov-fail-under=100 {posargs}
pytest -svv --timeout 60 --cov-report=html --cov-report=xml --cov=pubtools.pulplib --cov-fail-under=100 {posargs}

[testenv:lock]
deps=
Expand Down
Loading