Commit 0c164785 authored by tarek's avatar tarek

merge dance

--HG--
branch : distribute
extra : rebase_source : d4e84517f89066ef4ddd67d58f879bb97f7b7bb2
parents 7b7e4db5 6255f6b1
......@@ -6,6 +6,11 @@ CHANGES
0.6.5
-----
* When run from within buildout, no attempt is made to modify an existing
setuptools egg, whether in a shared egg directory or a system setuptools.
* Fixed a hole in sandboxing allowing builtin file to write outside of
the sandbox.
-----
0.6.4
......
recursive-include setuptools *.py *.txt *.exe
recursive-include tests *.py *.c *.pyx *.txt
recursive-include docs *.py *.txt Makefile
recursive-include docs *.py *.txt *.conf *.css *.css_t Makefile
include *.py
include *.txt
include MANIFEST.in
......
......@@ -22,7 +22,7 @@ The fork has two goals:
and make all distributions that depend on Setuptools work as
before, but with less bugs and behaviorial issues.
This work is done in the 0.6.x series
This work is done in the 0.6.x series.
Starting with version 0.6.2, Distribute supports Python 3.
Installing and using distribute for Python 3 code works exactly
......@@ -77,17 +77,19 @@ provided online.
distribute_setup.py
===================
Download ``distribute_setup.py`` and execute it, using the Python interpreter of
your choice.
Download
`distribute_setup.py <http://python-distribute.org/distribute_setup.py>`_
and execute it, using the Python interpreter of your choice.
If your shell has the ``curl`` program you can do::
$ curl -O http://nightly.ziade.org/distribute_setup.py
$ curl -O http://python-distribute.org/distribute_setup.py
$ python distribute_setup.py
If you are under Python 3, use ``distribute_setup_3k.py``::
If you are under Python 3, use
`distribute_setup_3k.py <http://python-distribute.org/distribute_setup_3k.py>`_::
$ curl -O http://nightly.ziade.org/distribute_setup_3k.py
$ curl -O http://python-distribute.org/distribute_setup_3k.py
$ python distribute_setup_3k.py
Notice that both files are provided in the source release.
......@@ -197,7 +199,7 @@ Install FAQ
You can use Distribute in your zc.buildout.
Although you have to run a specific `bootstrap.py` file that is available
at `http://nightly.ziade.org/bootstrap.py`. The code is located at
at `http://python-distribute.org/bootstrap.py`. The code is located at
`http://bitbucket.org/tarek/buildout-distribute`.
Beware that if you use a shared eggs folder with buildout, you need to
......
......@@ -39,6 +39,7 @@ SETUP_COMMANDS = d['__all__']
VERSION = "0.6.5"
from setuptools import setup, find_packages
import os
import sys
scripts = []
......@@ -48,7 +49,15 @@ def _easy_install_marker():
return (len(sys.argv) == 5 and sys.argv[2] == 'bdist_egg' and
sys.argv[3] == '--dist-dir' and 'egg-dist-tmp-' in sys.argv[-1])
def _buildout_marker():
command = os.environ.get('_')
if command:
return 'buildout' in os.path.basename(command)
def _being_installed():
if _buildout_marker():
# Installed by buildout, don't mess with a global setuptools.
return False
# easy_install marker
return 'install' in sys.argv[1:] or _easy_install_marker()
......
......@@ -168,6 +168,12 @@ class DirectorySandbox(AbstractSandbox):
def _violation(self, operation, *args, **kw):
raise SandboxViolation(operation, args, kw)
if _file:
def _file(self, path, mode='r', *args, **kw):
if mode not in ('r', 'rt', 'rb', 'rU', 'U') and not self._ok(path):
self._violation("file", path, mode, *args, **kw)
return _file(path,mode,*args,**kw)
def _open(self, path, mode='r', *args, **kw):
if mode not in ('r', 'rt', 'rb', 'rU', 'U') and not self._ok(path):
self._violation("open", path, mode, *args, **kw)
......
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