Ejemplo n.º 1
0
import os, logging
from xpybuild.propertysupport import *
from xpybuild.buildcommon import *
from xpybuild.pathsets import *

defineOutputDirProperty('OUTPUT_DIR', None)

# these are not used explciitly here, but must be checked to ensure inputs aren't generatred by targets
defineOutputDirProperty('OUTPUT_DIR2', './OUTPUT_DIR2/')
defineOutputDirProperty('OUTPUT_DIR2_NESTED', './OUTPUT_DIR2/nested/')

from xpybuild.targets.copy import Copy

for i in range(0, 3500):
    Copy('${OUTPUT_DIR}/output%s/' % i, [
        '${OUTPUT_DIR}/../input-files/input-%d.txt' % x
        for x in range(0, 256 + 1)
    ])
Ejemplo n.º 2
0
import os, logging
from xpybuild.propertysupport import *
from xpybuild.buildcommon import *
from xpybuild.pathsets import *
from xpybuild.targets.copy import Copy
from xpybuild.targets.writefile import WriteFile

defineOutputDirProperty('OUTPUT_DIR', None)

WriteFile('${OUTPUT_DIR}/dir1/foo1.txt', 'Hello world 1')
WriteFile('${OUTPUT_DIR}/dir1/dirA/dirB/foo2.txt', 'Hello world 2')
WriteFile('${OUTPUT_DIR}/dir2/dirC/foo3.txt', 'Hello world 3')

Copy('${OUTPUT_DIR}/CopyFromTargetsWithinDir-FindPaths/',
     FindPaths(TargetsWithinDir('${OUTPUT_DIR}/dir1/')))
Copy('${OUTPUT_DIR}/CopyFromTargetsWithinDir/',
     (TargetsWithinDir('${OUTPUT_DIR}/dir1/')))
Ejemplo n.º 3
0
#
import os
from xpybuild.propertysupport import *
from xpybuild.buildcommon import *
from xpybuild.pathsets import *

from xpybuild.targets.native import *
from xpybuild.targets.copy import Copy
from xpybuild.utils.compilers import GCC, VisualStudio

include(os.environ['PYSYS_TEST_ROOT_DIR']+'/build_utilities/native_config.xpybuild.py')

setGlobalOption('native.include.upToDateCheckIgnoreRegex', '(c:/program files.*|.*/tESt4.h)' if IS_WINDOWS else '.*/test4.h')
setGlobalOption('native.include.upToDateCheckIgnoreSystemHeaders', True) # only works on linux/gcc currently

Copy('${OUTPUT_DIR}/my-generated-include-files/', FindPaths('./include-src/'))
Copy('${OUTPUT_DIR}/my-generated-include-files2/generatedpath/test3.h', FindPaths('./include-src/generatedpath/'))
Copy('${OUTPUT_DIR}/test-generated.cpp', './test.cpp')

Cpp(objectname('${OUTPUT_DIR}/no-target-deps'), './test.cpp',
		includes=[
			"./include/",
			'./include-src/',
		]
)

Cpp(objectname('${OUTPUT_DIR}/target-cpp-and-include-dir'), '${OUTPUT_DIR}/test-generated.cpp',
		includes=[
			"./include/",
			'${OUTPUT_DIR}/my-generated-include-files/', # a target
		]
Ejemplo n.º 4
0
    def run(self, context):
        # first do what Copy would have done
        Copy.run(self, context)

        # then custom command
        CustomCommand.run(self, context)
Ejemplo n.º 5
0
import os, logging
from xpybuild.propertysupport import *
from xpybuild.buildcommon import *
from xpybuild.pathsets import *
from xpybuild.targets.copy import Copy

defineOutputDirProperty('OUTPUT_DIR', None)

Copy('${OUTPUT_DIR}/findpaths-out/',
     FindPaths('${OUTPUT_DIR}/../findpaths/', includes=['**/', '**']))
Copy('${OUTPUT_DIR}/dirbased-out/',
     DirBasedPathSet('${OUTPUT_DIR}/../dirbased/', 'a', 'b'))
Ejemplo n.º 6
0
import os, logging
from xpybuild.propertysupport import *
from xpybuild.buildcommon import *
from xpybuild.pathsets import *

defineOutputDirProperty('OUTPUT_DIR', None)

from xpybuild.targets.copy import Copy

for i in range(0, 3500):
    Copy('${OUTPUT_DIR}/output%s/' % i,
         FindPaths('${OUTPUT_DIR}/../input-files/', includes='**/*.txt'))
Ejemplo n.º 7
0
import os, logging
from xpybuild.propertysupport import *
from xpybuild.buildcommon import *
from xpybuild.pathsets import *

defineOutputDirProperty('OUTPUT_DIR', None)

from xpybuild.targets.copy import Copy

for i in range(0, 256):
    Copy('${OUTPUT_DIR}/outputa-%s/' % i, [
        "${OUTPUT_DIR}/../input-files/input-%s.txt" % x for x in range(0, 256)
    ])
    Copy('${OUTPUT_DIR}/outputb-%s/' % i,
         FindPaths(DirGeneratedByTarget("${OUTPUT_DIR}/outputa-%s/" % i)))
    Copy('${OUTPUT_DIR}/outputc-%s/' % i,
         FindPaths(DirGeneratedByTarget("${OUTPUT_DIR}/outputb-%s/" % i)))
    Copy('${OUTPUT_DIR}/outputd-%s/' % i,
         FindPaths(DirGeneratedByTarget("${OUTPUT_DIR}/outputc-%s/" % i)))
    Copy('${OUTPUT_DIR}/outpute-%s/' % i,
         FindPaths(DirGeneratedByTarget("${OUTPUT_DIR}/outputd-%s/" % i)))
    Copy('${OUTPUT_DIR}/outputf-%s/' % i,
         FindPaths(DirGeneratedByTarget("${OUTPUT_DIR}/outpute-%s/" % i)))
    for j in range(1, 10):
        if i > j:
            Copy(
                '${OUTPUT_DIR}/outputa-%s-%s/' % (i, j),
                FindPaths(
                    DirGeneratedByTarget("${OUTPUT_DIR}/outputa-%s/" %
                                         (i - j))))
Ejemplo n.º 8
0
import os, logging
from xpybuild.propertysupport import *
from xpybuild.buildcommon import *
from xpybuild.pathsets import *


defineOutputDirProperty('OUTPUT_DIR', None)

defineStringProperty('NUMBER_TARGETS', '1')
defineStringProperty('NUMBER_PATTERNS', '50')
defineStringProperty('PATTERN', '')

includes = [getPropertyValue('PATTERN')]
if not includes[0]: includes = [("included/test%d.*"%i) for i in range(int(getPropertyValue('NUMBER_PATTERNS')))]

from xpybuild.targets.copy import Copy

for i in range(0, int(getPropertyValue('NUMBER_TARGETS'))):
	Copy('${OUTPUT_DIR}/copy%d/'%i, [FindPaths('${OUTPUT_DIR}/../findpathsroot/', 
		# match specific filenames from included directory, nothing from excluded
		includes=includes
		)])