Skip to content

Commit

Permalink
fix #22
Browse files Browse the repository at this point in the history
  • Loading branch information
Pebaz committed May 26, 2020
1 parent f512abe commit 64eccc7
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions nimporter_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,15 @@ def clean(dir=pathlib.Path()):
# .exp and .lib are generated on Windows
remove_these = NimCompiler.EXT, '.hash', '.exp', '.lib'

# Check for MANIFEST.in in CWD
if list(dir.glob('MANIFEST.in')):
item = dir / 'MANIFEST.in'
header = 'NIMPORTER BUNDLE'
for line in item.read_text().splitlines():
if header in line:
os.remove(str(item.resolve()))
print('Deleted:'.ljust(19), item.resolve())

for folder in filter(lambda p: p.is_dir(), dir.iterdir()):
if folder.name == '__pycache__':
for item in folder.iterdir():
Expand Down

0 comments on commit 64eccc7

Please sign in to comment.