Skip to content

Commit

Permalink
py: sort entrypoints when computing PKG_CONFIG_PATH
Browse files Browse the repository at this point in the history
Signed-off-by: Filipe Laíns <[email protected]>
  • Loading branch information
FFY00 committed Jun 18, 2024
1 parent 11e95b5 commit e6c2301
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/pkgconf/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import importlib
import itertools
import logging
import operator
import os
import pathlib
import shutil
Expand Down Expand Up @@ -82,7 +83,8 @@ def get_pkg_config_path() -> Sequence[str]:
entrypoint-name = 'project.package'
"""
entrypoints = importlib_metadata.entry_points(group='pkg_config')
return itertools.chain.from_iterable([_get_module_paths(entry.value) for entry in entrypoints])
sorted_entrypoints = sorted(entrypoints, key=operator.attrgetter('name'))
return itertools.chain.from_iterable([_get_module_paths(entry.value) for entry in sorted_entrypoints])


def run_pkgconf(*args: str, **subprocess_kwargs: Any) -> subprocess.Popen:
Expand Down

0 comments on commit e6c2301

Please sign in to comment.