Commits

Maciej Fijalkowski committed d027f8d

missing files

  • Participants
  • Parent commits 7f37037

Comments (0)

Files changed (3)

pypyembed/AUTHORS

+
+fijal, with shame

pypyembed/LICENSE

+
+The MIT License
+
+Permission is hereby granted, free of charge, to any person 
+obtaining a copy of this software and associated documentation 
+files (the "Software"), to deal in the Software without 
+restriction, including without limitation the rights to use, 
+copy, modify, merge, publish, distribute, sublicense, and/or 
+sell copies of the Software, and to permit persons to whom the 
+Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included 
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 
+THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 
+DEALINGS IN THE SOFTWARE.
+
+This is an incredibly gross hack. It embeds pypy built with --shared with
+cpython for numpy computations. Right now it does leak refcounts (as it's really
+just a prove of concept), so don't use it.
+
+The main exported function is embed.export_function (demo can be seen in
+example.py). It exports the function (with it's source, but without links
+to globals, so you need to reimport everything) and runs it under pypy.
+
+Right now you can pass ints, floats and numpy arrays to the underlaying
+function. Only what is tested in test/test_example.py is known to be working.
+
+To reproduce either download pypy binary (64bit linux) from:
+
+xxx
+
+or just compile pypy (from branch pypy-in-a-box) with a command:
+
+cd <pypy-checkout>/pypy/translator/goal
+./translate.py -Ojit --gcrootfinder=shadowstack --shared targetpypystandalone.py --translationmodules --withmod-micronumpy --objspace-std-withembeddingapi
+
+All those options are needed, except --translationmodules which enables
+less modules and thus makes the translation faster.
+
+Run with
+
+python example.py <path-to-unpacked-or-built-libpypy-c.so>