Skip to content

Commit

Permalink
Merge pull request #224 from amcmahon-rh/RHELDST-17607
Browse files Browse the repository at this point in the history
Use pubtools namespace to resolve init file conflict [RHELDST-17607]
  • Loading branch information
amcmahon-rh authored Jun 10, 2024
2 parents 70a9b52 + bfaa3eb commit 0dc5ea1
Show file tree
Hide file tree
Showing 56 changed files with 25 additions and 10 deletions.
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.
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.
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.
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

0 comments on commit 0dc5ea1

Please sign in to comment.