changeset 585:233bd8bbda28

Automatically remove ConfigMix.egg-info
author Franz Glasner <fzglas.hg@dom66.de>
date Sun, 09 Jan 2022 13:40:22 +0100
parents ed131d456319
children d68e8204f7c3
files setup.py
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/setup.py	Sun Jan 09 13:34:41 2022 +0100
+++ b/setup.py	Sun Jan 09 13:40:22 2022 +0100
@@ -1,9 +1,12 @@
 #!/usr/bin/env python
 # -*- coding: utf-8 -*-
 
+from __future__ import print_function, absolute_import
+
 import re
 import os
 import platform
+import shutil
 import sys
 try:
     from setuptools import setup
@@ -66,10 +69,9 @@
 # But our package data differs between "standard" builds and
 # builds with "--windows-cross-pack".
 #
-
 if os.path.isdir(PROJECT_NAME + ".egg-info"):
-    raise RuntimeError(
-        "please remove %s.egg-info before" % (PROJECT_NAME,))
+    print("removing `%s.egg-info'" % (PROJECT_NAME,))
+    shutil.rmtree(PROJECT_NAME + ".egg-info")
 
 if wcp_idx is None:
     #