Skip to content

Commit

Permalink
Drop exception support for packages triggering win32com cache generat…
Browse files Browse the repository at this point in the history
…ion during build/install. Fixes #841
  • Loading branch information
jaraco committed Nov 18, 2016
1 parent ed76532 commit 7daf18f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 24 deletions.
7 changes: 7 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
CHANGES
=======

v29.0.0
-------

* #841: Drop special exception for packages invoking
win32com during the build/install process. See
Distribute #118 for history.

v28.8.0
-------

Expand Down
8 changes: 0 additions & 8 deletions setuptools/sandbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,14 +373,6 @@ def _remap_pair(self, operation, src, dst, *args, **kw):
else:
_EXCEPTIONS = []

try:
from win32com.client.gencache import GetGeneratePath
_EXCEPTIONS.append(GetGeneratePath())
del GetGeneratePath
except ImportError:
# it appears pywin32 is not installed, so no need to exclude.
pass


class DirectorySandbox(AbstractSandbox):
"""Restrict operations to a single subdirectory - pseudo-chroot"""
Expand Down
16 changes: 0 additions & 16 deletions setuptools/tests/test_sandbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,6 @@ def do_write():

return do_write

def test_win32com(self, tmpdir):
"""
win32com should not be prevented from caching COM interfaces
in gen_py.
"""
win32com = pytest.importorskip('win32com')
gen_py = win32com.__gen_path__
target = os.path.join(gen_py, 'test_write')
sandbox = DirectorySandbox(str(tmpdir))
try:
# attempt to create gen_py file
sandbox.run(self._file_writer(target))
finally:
if os.path.exists(target):
os.remove(target)

def test_setup_py_with_BOM(self):
"""
It should be possible to execute a setup.py with a Byte Order Mark
Expand Down

0 comments on commit 7daf18f

Please sign in to comment.