b/c...py: use os.getcwd()
instead of .
This commit is contained in:
parent
be2bad3a5d
commit
e6afd3574b
@ -4,7 +4,7 @@ if __name__ == "__main__":
|
||||
print(":: C bytebeat generator: compiler unit")
|
||||
|
||||
from argparse import ArgumentParser
|
||||
from os import environ, makedirs, name as os_name
|
||||
from os import getcwd, environ, makedirs, name as os_name, rename
|
||||
from os.path import exists, join as path_join
|
||||
from shlex import join as command_line_join, split as command_line_split
|
||||
from shutil import which
|
||||
@ -31,9 +31,10 @@ PATHS = {
|
||||
"include_directory": "include"
|
||||
}
|
||||
|
||||
# Add `.` directory before all paths for compilation
|
||||
# Add current directory before all paths for compilation
|
||||
CURRENT_DIRECTORY = getcwd()
|
||||
for key in ["src_dir", "bin_dir", "include_directory"]:
|
||||
PATHS[key] = path_join(".", PATHS[key])
|
||||
PATHS[key] = path_join(CURRENT_DIRECTORY, PATHS[key])
|
||||
|
||||
# Resolve paths
|
||||
PATHS["template"] = path_join(PATHS["src_dir"], PATHS["template"])
|
||||
|
Loading…
Reference in New Issue
Block a user