Skip to content

Commit

Permalink
allow preservation of top-level dependencies for #12
Browse files Browse the repository at this point in the history
  • Loading branch information
darvid committed Feb 28, 2017
1 parent c5b00f3 commit 0b86ba7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/reqwire/config.py
Expand Up @@ -9,7 +9,9 @@
__all__ = (
'env',
'lockfile',
'preserve_toplevel',
)

env = biome.reqwire
lockfile = env.get_path('lockfile', pathlib.Path('.reqwire.lock'))
preserve_toplevel = env.get_bool('preserve_toplevel', default=False)
3 changes: 3 additions & 0 deletions src/reqwire/scaffold.py
Expand Up @@ -221,6 +221,9 @@ def extend_source_file(working_directory, # type: str
prereleases=prereleases,
intersect=True)

if reqwire.config.preserve_toplevel:
resolved_requirements |= req_file.requirements

nested_cfiles = ordered_set.OrderedSet(
str(cf.filename.relative_to(filename.parent))
for cf in req_file.nested_cfiles)
Expand Down

0 comments on commit 0b86ba7

Please sign in to comment.