mirror of https://github.com/mtshiba/pylyzer
Update setup.py
This commit is contained in:
parent
e64baf4107
commit
974269a2ba
8
setup.py
8
setup.py
|
|
@ -16,12 +16,6 @@ def removeprefix(string, prefix):
|
||||||
else:
|
else:
|
||||||
return string
|
return string
|
||||||
|
|
||||||
def removesuffix(string, suffix):
|
|
||||||
if string.endswith(suffix):
|
|
||||||
return string[:-len(suffix)]
|
|
||||||
else:
|
|
||||||
return string
|
|
||||||
|
|
||||||
class Clean(Command):
|
class Clean(Command):
|
||||||
user_options = []
|
user_options = []
|
||||||
def initialize_options(self):
|
def initialize_options(self):
|
||||||
|
|
@ -49,7 +43,7 @@ cargo_args = ["--no-default-features"]
|
||||||
home = os.path.expanduser("~")
|
home = os.path.expanduser("~")
|
||||||
file_and_dirs = glob(home + "/" + ".erg/lib/**", recursive=True)
|
file_and_dirs = glob(home + "/" + ".erg/lib/**", recursive=True)
|
||||||
paths = [Path(path) for path in file_and_dirs if os.path.isfile(path)]
|
paths = [Path(path) for path in file_and_dirs if os.path.isfile(path)]
|
||||||
files = [(removeprefix(removesuffix(str(path), "/" + path.name), home), str(path)) for path in paths]
|
files = [(removeprefix(str(path.parent), home), str(path)) for path in paths]
|
||||||
data_files = {}
|
data_files = {}
|
||||||
for key, value in files:
|
for key, value in files:
|
||||||
if key in data_files:
|
if key in data_files:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue