Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
pypy.org
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
PyPy
pypy.org
Commits
3098db22
Commit
3098db22
authored
5 years ago
by
Mark Doerr
Browse files
Options
Downloads
Patches
Plain Diff
updated documentation for sandbox-2; README renamed to README.rst for better display in gitLab
parent
340d8d63
Branches
topic/logo/bitbucket-pr-14
No related tags found
1 merge request
!16
updated documentation for sandbox-2; README renamed to README.rst for better display in gitLab
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
README.rst
+0
-0
0 additions, 0 deletions
README.rst
pages/download.rst
+14
-2
14 additions, 2 deletions
pages/download.rst
pages/features.rst
+14
-6
14 additions, 6 deletions
pages/features.rst
with
28 additions
and
8 deletions
README
→
README
.rst
+
0
−
0
View file @
3098db22
This diff is collapsed.
Click to expand it.
pages/download.rst
+
14
−
2
View file @
3098db22
...
...
@@ -300,8 +300,15 @@
pypy ../../rpython/bin/rpython -Ojit targetpypystandalone
# get the no-jit version
pypy ../../rpython/bin/rpython -O2 targetpypystandalone
# get the sandbox version
pypy ../../rpython/bin/rpython -O2 --sandbox targetpypystandalone
# to build the pypy-sandbox, please compile the pypy JIT version first (s. first step)
# rename the now built pypy-c (and corrosponing libray libpypy-c.so) to pypy-c-jit and
# libpypy-c.so-jit respectively (it is needed later for packaging) and then call
pypy ../../rpython/bin/rpython -O2 --sandbox targetpypystandalone # to get the sandbox version
# rename the resulting, new pypy-c to pypy-c-sandbox (and corresponding library libpypy-c.so-sandbox)
# and reverse pypy-c-jit to pypy-c (do not forget corresponding library libpypy-c.so-jit -> libpypy-c.so)
5. Enjoy Mandelbrot ``:-)`` It takes on the order of half an hour to
finish the translation, and about 3GB of RAM on a 32-bit system
...
...
@@ -381,6 +388,11 @@
python package.py --help #for information
python package.py --archive-name pypy-my-own-package-name
# to pack the pypy-c-sandbox, a full JIT-version of pypy-c (including the corresponding library) needs to be in the goal directory
python package.py --archive-name pypy_my-sandbox-os --builddir ../../goal --targetdir my/package/targetdir
# to use the sandbox, please rename the library back to libpypy-c.so-jit and
# libpypy-c.so-sandbox to libpypy-c.so
It is recommended to use package.py because custom scripts will
invariably become out-of-date. If you want to write custom scripts
anyway, note an easy-to-miss point: some modules are written with CFFI,
...
...
This diff is collapsed.
Click to expand it.
pages/features.rst
+
14
−
6
View file @
3098db22
...
...
@@ -126,5 +126,5 @@
languages.
To run the sandboxed process, you need to get the full sources and
build ``pypy-sandbox`` from it (see `Building from source`_). These
build ``pypy-
c-
sandbox`` from it (see `Building from source`_). These
instructions give you a ``pypy-c`` that you should rename to
...
...
@@ -130,6 +130,14 @@
instructions give you a ``pypy-c`` that you should rename to
``pypy-sandbox`` to avoid future confusion. Then run:
``pypy-c-sandbox`` to avoid future confusion.
The next step ist to pack everything using the package tool like:
.. code-block:: bash
cd tool/release/
python package.py --archive-name my_pypy_sandbox_package --builddir ../../goal --targetdir my/package/target/dir
And finally start, e.g., an interactive (-i option ) pypy-sandox interpreter shell:
.. code-block:: bash
cd pypy/sandbox
...
...
@@ -132,8 +140,8 @@
.. code-block:: bash
cd pypy/sandbox
pypy_interact.py path/to/pypy-sandbox
pypy_interact.py
--lib-path=
path/to/
my_
pypy
_sandbox_package path/to/pypy-c
-sandbox
-i
# don't confuse it with pypy/goal/pyinteractive.py!
You get a fully sandboxed interpreter, in its own filesystem hierarchy
...
...
@@ -137,10 +145,10 @@
# don't confuse it with pypy/goal/pyinteractive.py!
You get a fully sandboxed interpreter, in its own filesystem hierarchy
(try ``os.listdir('/')``).
For example, you would run an untrusted
scrip
t as follows:
(try ``os.listdir('/')``).
To run, for example, an untrusted script, excecute i
t as follows:
.. code-block:: bash
mkdir virtualtmp
cp untrusted.py virtualtmp/
...
...
@@ -142,9 +150,9 @@
.. code-block:: bash
mkdir virtualtmp
cp untrusted.py virtualtmp/
pypy_interact.py --tmp=virtualtmp pypy-sandbox /tmp/untrusted.py
pypy_interact.py
--lib-path=path/to/my_pypy_sandbox_package
--tmp=virtualtmp pypy-
c-
sandbox /tmp/untrusted.py
Note that the path ``/tmp/untrusted.py`` is a path inside the sandboxed
filesystem. You don't have to put ``untrusted.py`` in the real ``/tmp``
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment