Mercurial > libervia-web
comparison setup.py @ 501:b483f1c88b7c
setup: cleaning also handles egg filenames not containing the python version
author | souliane <souliane@mailoo.org> |
---|---|
date | Wed, 13 Aug 2014 18:36:57 +0200 |
parents | 636b6c477a87 |
children | ecec2cc13b33 |
comparison
equal
deleted
inserted
replaced
500:67a4e8383b70 | 501:b483f1c88b7c |
---|---|
177 """ | 177 """ |
178 if message is None: | 178 if message is None: |
179 message = "Cleaning previous installation directories" | 179 message = "Cleaning previous installation directories" |
180 if to_remove is None: | 180 if to_remove is None: |
181 to_remove = [] | 181 to_remove = [] |
182 to_remove.extend([os.path.join(self.install_lib, NAME), | 182 for path in [os.path.join(self.install_lib, NAME), |
183 self.install_data_dir, | 183 self.install_data_dir, |
184 os.path.join(self.install_data, 'share', 'doc', NAME), | 184 os.path.join(self.install_data, 'share', 'doc', NAME), |
185 os.path.join(self.install_lib, "%s-py%s.egg-info" % (self.config_vars['dist_fullname'], self.config_vars['py_version_short'])), | 185 os.path.join(self.install_lib, "%s.egg-info" % self.config_vars['dist_fullname']), |
186 ]) | 186 os.path.join(self.install_lib, "%s-py%s.egg-info" % (self.config_vars['dist_fullname'], self.config_vars['py_version_short'])), |
187 ]: | |
188 if os.path.isdir(path): | |
189 to_remove.append(path) | |
187 for source, dest in self.sh_script_links: | 190 for source, dest in self.sh_script_links: |
188 if os.path.islink(dest): | 191 if os.path.islink(dest): |
189 to_remove.append(dest) | 192 to_remove.append(dest) |
190 plugin_file = os.path.join(self.install_lib, 'twisted', 'plugins', NAME) | 193 plugin_file = os.path.join(self.install_lib, 'twisted', 'plugins', NAME) |
191 if os.path.isfile(plugin_file): | 194 if os.path.isfile(plugin_file): |