Commit fa23049e authored by Michael Droettboom's avatar Michael Droettboom

Minor fixups from pull request

parent 9f72505e
......@@ -5,9 +5,7 @@ import subprocess
import sys
sys.path.insert(
0, str((Path(__file__).resolve().parent.parent / 'test')))
print(sys.path)
0, str((Path(__file__).resolve().parents[1] / 'test')))
import conftest
......@@ -21,7 +19,7 @@ def run_native(hostpython, code):
cwd=Path(__file__).resolve().parent,
env={
'PYTHONPATH':
str(Path(__file__).resolve().parent.parent / 'src')
str(Path(__file__).resolve().parents[1] / 'src')
}
)
return float(output.strip().split()[-1])
......
......@@ -20,7 +20,7 @@ for root, dirs, files in os.walk(
for filename in files:
filename = Path(filename)
if str(filename).startswith("test_") and filename.suffix == ".py":
tests.append(root / filename.stem)
tests.append(str(root / filename.stem))
tests.sort()
with open("python_tests.txt", "w") as fp:
......
......@@ -295,7 +295,7 @@ def pytest_generate_tests(metafunc):
test_modules = []
if 'CIRCLECI' not in os.environ or True:
with open(
Path(__file__).parents[0] / "python_tests.txt") as fp:
Path(__file__).parent / "python_tests.txt") as fp:
for line in fp:
line = line.strip()
if line.startswith('#'):
......
......@@ -14,11 +14,11 @@ import common
import buildpkg
def build_package(pkgname, dependencies, packagesdir, outputdir):
def build_package(pkgname, dependencies, packagesdir, outputdir, args):
reqs = dependencies[pkgname]
# Make sure all of the package's requirements are built first
for req in reqs:
build_package(req, dependencies, packagesdir, outputdir)
build_package(req, dependencies, packagesdir, outputdir, args)
if not (packagesdir / pkgname / 'build' / '.packaged').is_file():
print("BUILDING PACKAGE: " + pkgname)
buildpkg.build_package(packagesdir / pkgname / 'meta.yaml', args)
......@@ -30,7 +30,7 @@ def build_package(pkgname, dependencies, packagesdir, outputdir):
outputdir / (pkgname + '.js'))
def build_packages(packagesdir, outputdir):
def build_packages(packagesdir, outputdir, args):
# We have to build the packages in the correct order (dependencies first),
# so first load in all of the package metadata and build a dependency map.
dependencies = {}
......@@ -43,7 +43,7 @@ def build_packages(packagesdir, outputdir):
dependencies[name] = reqs
for pkgname in dependencies.keys():
build_package(pkgname, dependencies, packagesdir, outputdir)
build_package(pkgname, dependencies, packagesdir, outputdir, args)
# This is done last so the main Makefile can use it as a completion token
with open(outputdir / 'packages.json', 'w') as fd:
......@@ -77,7 +77,7 @@ def parse_args():
def main(args):
packagesdir = Path(args.dir[0]).resolve()
outputdir = Path(args.output[0]).resolve()
build_packages(packagesdir, outputdir)
build_packages(packagesdir, outputdir, args)
if __name__ == '__main__':
......
......@@ -3,7 +3,7 @@ from pathlib import Path
ROOTDIR = Path(__file__).parent.resolve()
HOSTPYTHON = ROOTDIR / '..' / 'cpython' / 'build' / '3.6.4' / 'host'
TARGETPYTHON = ROOTDIR / '..' / 'cpython' / 'installs', 'python-3.6.4'
TARGETPYTHON = ROOTDIR / '..' / 'cpython' / 'installs' / 'python-3.6.4'
DEFAULTCFLAGS = ''
DEFAULTLDFLAGS = ' '.join([
'-O3',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment