Skip to content

Commit

Permalink
Update setup.py
Browse files Browse the repository at this point in the history
  • Loading branch information
mtshiba committed Jul 5, 2024
1 parent e64baf4 commit 974269a
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,6 @@ def removeprefix(string, prefix):
else:
return string

def removesuffix(string, suffix):
if string.endswith(suffix):
return string[:-len(suffix)]
else:
return string

class Clean(Command):
user_options = []
def initialize_options(self):
Expand Down Expand Up @@ -49,7 +43,7 @@ def run(self):
home = os.path.expanduser("~")
file_and_dirs = glob(home + "/" + ".erg/lib/**", recursive=True)
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 = {}
for key, value in files:
if key in data_files:
Expand Down

0 comments on commit 974269a

Please sign in to comment.