From 85cef723c3f9c9e8b85bef48aef1e5f17abea56b Mon Sep 17 00:00:00 2001 From: Andrew Resch Date: Wed, 10 Dec 2008 10:00:21 +0000 Subject: [PATCH] Fix file removal --- setup.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/setup.py b/setup.py index 9de9d2e25..52b8485e3 100644 --- a/setup.py +++ b/setup.py @@ -27,8 +27,6 @@ import glob from setuptools import setup, find_packages, Extension from distutils import cmd, sysconfig from distutils.command.build import build as _build -from distutils.command.install import install as _install -from distutils.command.install_data import install_data as _install_data from distutils.command.clean import clean as _clean import msgfmt @@ -168,11 +166,14 @@ _sources = glob.glob("./libtorrent/src/*.cpp") + \ # Remove some files from the source that aren't needed _source_removals = ["mapped_storage.cpp", "memdebug.cpp"] - +to_remove = [] for source in _sources: for rem in _source_removals: if rem in source: - _sources.remove(source) + to_remove.append(source) + +for rem in to_remove: + _sources.remove(rem) _ext_modules = []