3333# A few handy globals
3434repo_root = Path (__file__ ).resolve ().parent
3535
36- def execfile (fname , globs , locs = None ):
36+ def execfile (path , globs , locs = None ):
3737 locs = locs or globs
38- with open (fname , encoding = "utf-8" ) as f :
39- exec (compile (f .read (), fname , "exec" ), globs , locs )
38+ with path . open (encoding = "utf-8" ) as f :
39+ exec (compile (f .read (), str ( path ) , "exec" ), globs , locs )
4040
4141#---------------------------------------------------------------------------
4242# Basic project information
4343#---------------------------------------------------------------------------
4444
4545# release.py contains version, authors, license, url, keywords, etc.
46- with open (repo_root / "IPython" / "core" / "release.py" , encoding = "utf-8" ) as f :
47- exec (f .read (), globals ())
46+ execfile (Path (repo_root , "IPython" , "core" , "release.py" ), globals ())
4847
4948# Create a dict with the basic information
5049# This dict is eventually passed to setup after additional keys are added.
@@ -65,7 +64,7 @@ def check_package_data(package_data):
6564 pkg_root = Path (* pkg .split ("." ))
6665 for d in data :
6766 path = pkg_root / d
68- if '*' in path :
67+ if "*" in str ( path ) :
6968 assert len (glob (path )) > 0 , "No files match pattern %s" % path
7069 else :
7170 assert path .exists (), f"Missing package data: { path } "
0 commit comments