Skip to content
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
1 change: 0 additions & 1 deletion requirements/dev-requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,3 @@ pytest-env
pytest-xdist
pytest-timeout
pyftpdlib
setuptools
1 change: 0 additions & 1 deletion requirements/dev-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ pytest-env==1.1.5
pytest-xdist==3.6.1
pytest-timeout==2.3.1
pyftpdlib==2.0.1
setuptools==75.6.0
## The following requirements were added by pip freeze:
astroid==3.3.7
dill==0.3.9
Expand Down
9 changes: 7 additions & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
# Tristan Maat <tristan.maat@codethink.co.uk>
#
import os
import sys

import pkg_resources
import pytest

from buildstream._testing import register_repo_kind, sourcetests_collection_hook
Expand All @@ -29,6 +29,11 @@

from tests.testutils.repo.tar import Tar

if sys.version_info >= (3, 10):
from importlib.metadata import entry_points
else:
from importlib_metadata import entry_points


#
# This file is loaded by pytest, we use it to add a custom
Expand Down Expand Up @@ -132,7 +137,7 @@ def remote_services(request):
def pytest_sessionstart(session):
if session.config.getvalue("plugins"):
# Enable all plugins that implement the 'buildstream.tests.source_plugins' hook
for entrypoint in pkg_resources.iter_entry_points("buildstream.tests.source_plugins"):
for entrypoint in entry_points(group="buildstream.tests.source_plugins"):
module = entrypoint.load()
module.register_sources()

Expand Down
55 changes: 0 additions & 55 deletions tests/testutils/setuptools.py

This file was deleted.

4 changes: 2 additions & 2 deletions tests/testutils/site.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
# to test that BuildStream works when integrated in your system.
#
def pip_sample_packages():
import pkg_resources
import importlib.metadata

required = {"sample-plugins"}
installed = {pkg.key for pkg in pkg_resources.working_set} # pylint: disable=not-an-iterable
installed = {dist.name for dist in importlib.metadata.distributions()}
missing = required - installed

if missing:
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ commands =
deps =
-rrequirements/requirements.txt
-rrequirements/dev-requirements.txt
setuptools
Cython

#
Expand All @@ -179,7 +180,6 @@ commands =
deps =
mypy==1.13.0
types-protobuf==5.28.3.20241030
types-setuptools==75.6.0.20241126
types-ujson==5.10.0.20240515
-rrequirements/requirements.txt
-rrequirements/dev-requirements.txt
Expand Down
Loading