Commit 77cd8b16 authored by Reinout van Rees's avatar Reinout van Rees

Added test demonstrating issue #64

A directory hacked inside the distutils `EGG-INFO/scripts` metadata directory
(which can apparently happen in python 3.3 with a `__pycache__` directory)
breaks the current distutils script detection code.

Refs #64
parent 9e36ccbe
...@@ -955,6 +955,19 @@ like for the console_scripts: ...@@ -955,6 +955,19 @@ like for the console_scripts:
Due to the nature of distutils scripts, buildout cannot pass arguments as Due to the nature of distutils scripts, buildout cannot pass arguments as
there's no specific method to pass them to. there's no specific method to pass them to.
In some cases, a python 3 ``__pycache__`` directory can end up in a
distutils-internal directory. Buildout doesn't crash on that:
>>> eggname = [name for name in os.listdir(distdir2)
... if name.endswith('egg')][0]
>>> scripts_metadata_dir = os.path.join(
... distdir2, eggname, 'EGG-INFO', 'scripts')
>>> os.mkdir(os.path.join(scripts_metadata_dir, '__dummy__'))
>>> scripts = zc.buildout.easy_install.scripts(
... ['du_zipped'], ws, sys.executable, distbin2)
>>> ls(distbin2)
- distutilsscript
Handling custom build options for extensions provided in source distributions Handling custom build options for extensions provided in source distributions
----------------------------------------------------------------------------- -----------------------------------------------------------------------------
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment