##// END OF EJS Templates
Fix str error in path
kevin1kevin1k -
Show More
@@ -33,18 +33,17 from setuptools.command.install_scripts import install_scripts
33 # A few handy globals
33 # A few handy globals
34 repo_root = Path(__file__).resolve().parent
34 repo_root = Path(__file__).resolve().parent
35
35
36 def execfile(fname, globs, locs=None):
36 def execfile(path, globs, locs=None):
37 locs = locs or globs
37 locs = locs or globs
38 with open(fname, encoding="utf-8") as f:
38 with path.open(encoding="utf-8") as f:
39 exec(compile(f.read(), fname, "exec"), globs, locs)
39 exec(compile(f.read(), str(path), "exec"), globs, locs)
40
40
41 #---------------------------------------------------------------------------
41 #---------------------------------------------------------------------------
42 # Basic project information
42 # Basic project information
43 #---------------------------------------------------------------------------
43 #---------------------------------------------------------------------------
44
44
45 # release.py contains version, authors, license, url, keywords, etc.
45 # release.py contains version, authors, license, url, keywords, etc.
46 with open(repo_root / "IPython" / "core" / "release.py", encoding="utf-8") as f:
46 execfile(Path(repo_root, "IPython", "core", "release.py"), globals())
47 exec(f.read(), globals())
48
47
49 # Create a dict with the basic information
48 # Create a dict with the basic information
50 # This dict is eventually passed to setup after additional keys are added.
49 # This dict is eventually passed to setup after additional keys are added.
@@ -65,7 +64,7 def check_package_data(package_data):
65 pkg_root = Path(*pkg.split("."))
64 pkg_root = Path(*pkg.split("."))
66 for d in data:
65 for d in data:
67 path = pkg_root / d
66 path = pkg_root / d
68 if '*' in path:
67 if "*" in str(path):
69 assert len(glob(path)) > 0, "No files match pattern %s" % path
68 assert len(glob(path)) > 0, "No files match pattern %s" % path
70 else:
69 else:
71 assert path.exists(), f"Missing package data: {path}"
70 assert path.exists(), f"Missing package data: {path}"
General Comments 0
You need to be logged in to leave comments. Login now