Skip to content

Commit 899f5b2

Browse files
committed
Clean up .egg-info directories after completing setup.py
1 parent 812eda9 commit 899f5b2

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

repo_helper/templates/setup._py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
# stdlib
55
import sys
6+
import shutil
67

78
# 3rd party
89
from setuptools import setup
@@ -30,3 +31,5 @@ Comment={{ short_desc }}
3031
setup(
3132
{{ additional_setup_args }}
3233
)
34+
35+
shutil.rmtree("{{ pypi_name.replace('-', '_') }}.egg-info", ignore_errors=True)

tests/test_files/test_packaging_/test_make_setup_case_1._py_

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# This file is managed by 'repo_helper'. Don't edit it directly.
33

44
# stdlib
5+
import shutil
56
import sys
67

78
# 3rd party
@@ -19,3 +20,5 @@ setup(
1920
py_modules=[],
2021
version=__version__,
2122
)
23+
24+
shutil.rmtree("hello_world.egg-info", ignore_errors=True)

tests/test_files/test_packaging_/test_make_setup_case_2._py_

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# This file is managed by 'repo_helper'. Don't edit it directly.
33

44
# stdlib
5+
import shutil
56
import sys
67

78
# 3rd party
@@ -27,3 +28,5 @@ setup(
2728
py_modules=[],
2829
version=__version__,
2930
)
31+
32+
shutil.rmtree("hello_world.egg-info", ignore_errors=True)

0 commit comments

Comments
 (0)