diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 1ecc7f3..67500f0 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -85,7 +85,7 @@ jobs: - run: | mk python-release owner=vkottler \ - repo=yambs version=2.8.0 + repo=yambs version=2.8.1 if: | matrix.python-version == '3.11' && matrix.system == 'ubuntu-latest' diff --git a/README.md b/README.md index 5269085..1d3cd30 100644 --- a/README.md +++ b/README.md @@ -2,11 +2,11 @@ ===================================== generator=datazen version=3.1.4 - hash=95602563e86f0658fcab5efca45060d1 + hash=4976235943725fd73fdb02c40af8f1cb ===================================== --> -# yambs ([2.8.0](https://pypi.org/project/yambs/)) +# yambs ([2.8.1](https://pypi.org/project/yambs/)) [![python](https://img.shields.io/pypi/pyversions/yambs.svg)](https://pypi.org/project/yambs/) ![Build Status](https://github.com/vkottler/yambs/workflows/Python%20Package/badge.svg) diff --git a/local/variables/package.yaml b/local/variables/package.yaml index 873f2eb..9aa4eae 100644 --- a/local/variables/package.yaml +++ b/local/variables/package.yaml @@ -1,5 +1,5 @@ --- major: 2 minor: 8 -patch: 0 +patch: 1 entry: mbs diff --git a/pyproject.toml b/pyproject.toml index 0c90b8b..7f80b9d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta:__legacy__" [project] name = "yambs" -version = "2.8.0" +version = "2.8.1" description = "Yet another meta build-system." readme = "README.md" requires-python = ">=3.11" diff --git a/yambs/__init__.py b/yambs/__init__.py index 089dc1e..3decc5f 100644 --- a/yambs/__init__.py +++ b/yambs/__init__.py @@ -1,7 +1,7 @@ # ===================================== # generator=datazen # version=3.1.4 -# hash=cb069480d4a43d400275c8e17aa46c39 +# hash=62d7b56325a95261f3a945bf98673529 # ===================================== """ @@ -10,4 +10,4 @@ DESCRIPTION = "Yet another meta build-system." PKG_NAME = "yambs" -VERSION = "2.8.0" +VERSION = "2.8.1" diff --git a/yambs/environment/native.py b/yambs/environment/native.py index 7be4930..4e5e9d6 100644 --- a/yambs/environment/native.py +++ b/yambs/environment/native.py @@ -262,6 +262,25 @@ def _render_app_manifest(self, elfs: Dict[Path, Path]) -> None: }, ) + def _handle_extra_source_dirs(self) -> None: + """Handle additional source directories (belonging to dependencies).""" + + # Recurse directories from the dependency manager. + paths_recurse = [ + (path, True) for path in self.dependency_manager.source_dirs + ] + + # Don't recurse directories provided by the configuration. + paths_recurse.extend( + [ + (combine_if_not_absolute(self.config.root, path), False) + for path in self.config.data.get("extra_sources", []) + ] + ) + + for path, recurse in paths_recurse: + collect_files(path, files=self.sources, recurse=recurse) + def generate(self, sources_only: bool = False) -> None: """Generate ninja files.""" @@ -283,12 +302,7 @@ def generate(self, sources_only: bool = False) -> None: self.dependency_manager.link_flags ) - # Handle additional source directories (belonging to dependencies). - for path in self.dependency_manager.source_dirs | { - combine_if_not_absolute(self.config.root, x) - for x in self.config.data.get("extra_sources", []) - }: - collect_files(path, files=self.sources) + self._handle_extra_source_dirs() populate_sources( self.sources, self.config.src_root,