comparison setup.py @ 585:233bd8bbda28

Automatically remove ConfigMix.egg-info
author Franz Glasner <fzglas.hg@dom66.de>
date Sun, 09 Jan 2022 13:40:22 +0100
parents 4e61df27b4e1
children d68e8204f7c3
comparison
equal deleted inserted replaced
584:ed131d456319 585:233bd8bbda28
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # -*- coding: utf-8 -*- 2 # -*- coding: utf-8 -*-
3
4 from __future__ import print_function, absolute_import
3 5
4 import re 6 import re
5 import os 7 import os
6 import platform 8 import platform
9 import shutil
7 import sys 10 import sys
8 try: 11 try:
9 from setuptools import setup 12 from setuptools import setup
10 except ImportError: 13 except ImportError:
11 from distutils.core import setup 14 from distutils.core import setup
64 # 67 #
65 # Otherwise some cached package_data would be used. 68 # Otherwise some cached package_data would be used.
66 # But our package data differs between "standard" builds and 69 # But our package data differs between "standard" builds and
67 # builds with "--windows-cross-pack". 70 # builds with "--windows-cross-pack".
68 # 71 #
69
70 if os.path.isdir(PROJECT_NAME + ".egg-info"): 72 if os.path.isdir(PROJECT_NAME + ".egg-info"):
71 raise RuntimeError( 73 print("removing `%s.egg-info'" % (PROJECT_NAME,))
72 "please remove %s.egg-info before" % (PROJECT_NAME,)) 74 shutil.rmtree(PROJECT_NAME + ".egg-info")
73 75
74 if wcp_idx is None: 76 if wcp_idx is None:
75 # 77 #
76 # Handle the optinal C-extension for Python3.7+ and CPython only. 78 # Handle the optinal C-extension for Python3.7+ and CPython only.
77 # PyPy does not need this. 79 # PyPy does not need this.