mirror of
https://gitlab.com/ita1024/waf.git
synced 2024-11-24 18:59:39 +01:00
Add demo for nested/flat python file installation
This commit is contained in:
parent
e319a9c2c9
commit
8353c5ebfb
3
demos/python/nested_scripts/bar/nested_bar.py
Normal file
3
demos/python/nested_scripts/bar/nested_bar.py
Normal file
@ -0,0 +1,3 @@
|
||||
"""
|
||||
Nested file in bar/
|
||||
"""
|
3
demos/python/nested_scripts/foo/nested_foo.py
Normal file
3
demos/python/nested_scripts/foo/nested_foo.py
Normal file
@ -0,0 +1,3 @@
|
||||
"""
|
||||
Nested file in foo/
|
||||
"""
|
@ -50,3 +50,21 @@ def build(bld):
|
||||
source = 'test.c',
|
||||
target = 'test')
|
||||
|
||||
# Install files keeping their directory structure (default: relative_trick=True)
|
||||
#
|
||||
# This will create two files:
|
||||
# * lib/python2.7/site-packages/nested_scripts/bar/nested_bar.py
|
||||
# * lib/python2.7/site-packages/nested_scripts/foo/nested_foo.py
|
||||
bld(features='py',
|
||||
source=bld.path.ant_glob('nested_scripts/**/*.py'),
|
||||
install_from='.')
|
||||
|
||||
# Install files flatting the directory structure (relative_trick=False)
|
||||
#
|
||||
# This will create two files:
|
||||
# * lib/python2.7/site-packages/nested_bar.py
|
||||
# * lib/python2.7/site-packages/nested_foo.py
|
||||
bld(features='py',
|
||||
source=bld.path.ant_glob('nested_scripts/**/*.py'),
|
||||
relative_trick=False,
|
||||
install_from='.')
|
||||
|
Loading…
Reference in New Issue
Block a user