Skip to content

Commit

Permalink
Merge pull request #82 from vkottler/dev/2.8.1
Browse files Browse the repository at this point in the history
2.8.1 - Don't recurse extra directories
  • Loading branch information
vkottler authored Oct 29, 2023
2 parents d4cfd5e + c94769a commit 6611c46
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion local/variables/package.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
major: 2
minor: 8
patch: 0
patch: 1
entry: mbs
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions yambs/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# =====================================
# generator=datazen
# version=3.1.4
# hash=cb069480d4a43d400275c8e17aa46c39
# hash=62d7b56325a95261f3a945bf98673529
# =====================================

"""
Expand All @@ -10,4 +10,4 @@

DESCRIPTION = "Yet another meta build-system."
PKG_NAME = "yambs"
VERSION = "2.8.0"
VERSION = "2.8.1"
26 changes: 20 additions & 6 deletions yambs/environment/native.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""

Expand All @@ -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,
Expand Down

0 comments on commit 6611c46

Please sign in to comment.