{ "info": { "author": "Adam Karpierz", "author_email": "adam@karpierz.net", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Natural Language :: Polish", "Operating System :: OS Independent", "Programming Language :: Java", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: IronPython", "Programming Language :: Python :: Implementation :: PyPy", "Programming Language :: Python :: Implementation :: Stackless", "Topic :: Software Development :: Libraries :: Java Libraries", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "**Currently only as placeholder (because a base package jtypes.jvm is still in development)**\n\njtypes.rubicon\n==============\n\nA bridge between the Java Runtime Environment and Python.\n\nOverview\n========\n\n | **jtypes.rubicon** is a bridge between Python and Java, allowing these to intercommunicate.\n | It is an effort to allow Python programs full access to Java class libraries.\n\n `PyPI record`_.\n\n | **jtypes.rubicon** is a lightweight Python package, based on the *ctypes* or *cffi* library.\n | It is an almost fully compliant implementation of Steve Menard's **JPype** package\n by reimplementing whole its functionality in a clean Python instead of C/C++.\n\nAbout Rubicon-Java:\n-------------------\n\nBorrowed from the `original website`_:\n\n Rubicon-Java\n ============\n\n **Rubicon-Java** is a bridge between the Java Runtime Environment and Python.\n It enables you to:\n\n * Instantiate objects defined in Java,\n * Invoke static and instance methods on objects defined in Java,\n * Access and modify static and instance fields on objects defined in Java, and\n * Write and use Python implementations of interfaces defined in Java.\n\nQuickstart\n----------\n\nRubicon-Java consists of three components:\n\n1. A Python library,\n2. A JNI library, and\n3. A Java JAR file.\n\nA ``Makefile`` has been provided to compile the JNI and JAR components. Type::\n\n $ make\n\nto compile them. The compiled output will be placed in the ``dist`` directory.\n\n.. admonition:: Cross platform support\n\n This Makefile currently only works under OS/X; however, the build commands\n aren't complicated; it should be fairly easy to reproduce the build on other\n platforms. Pull requests to make the ``Makefile`` cross-platform are welcome.\n\nTo use Rubicon-Java, you'll need to ensure:\n\n1. ``rubicon.jar`` is in the classpath when you start your Java VM.\n\n2. The Rubicon library file is somewhere that it will be found by dynamic\n library discovery. This means:\n\n a. Under OS X, put the directory containing ``librubicon.dylib`` is in your ``DYLD_LIBRARY_PATH``\n\n b. Under Linux, put the directory containing ``librubicon.so`` is in your ``LD_LIBRARY_PATH``\n\n c. Under Windows.... something :-)\n\n3. The ``rubicon`` Python module is somewhere that can be added to a\n ``PYTHONPATH``. You can install rubicon using::\n\n $ pip install rubicon-java\n\n If you do this, you'll need to reference your system Python install when\n setting your ``PYTHONPATH``.\n\nThe Rubicon bridge starts on the Java side. Import the Python object::\n\n import org.pybee.rubicon.Python;\n\nThen start the Python interpreter, and run a Python file::\n\n # Initialize the Python VM\n String pythonHome = \"/path/to/python\";\n String pythonPath = \"/path/to/dir1:/path/to/dir2\";\n if (Python.start(pythonHome, pythonPath, null) != 0) {\n System.out.println(\"Error initializing Python VM.\");\n }\n\n # Start a Python script\n if (Python.run(\"/path/to/script.py\") != 0) {\n System.out.println(\"Error running Python script.\");\n }\n\n # Shut down the Python VM.\n Python.stop();\n\nThe ``PYTHONPATH`` you specify must enable access to the ``rubicon`` Python\nmodule.\n\nIn your Python script, you can then reference Java objects::\n\n >>> from rubicon.java import JavaClass\n\n # Wrap a Java class\n >>> URL = JavaClass(\"java/net/URL\")\n\n # Then instantiate the Java class, using the API\n # that is exposed in Java.\n >>> url = URL(\"http://pybee.org\")\n\n # You can then call methods on the Java object as if it\n # were a Python object.\n >>> print url.getHost()\n pybee.org\n\nIt's also possible to provide implementations of Java Interfaces in Python.\nFor example, lets say you want to create a Swing Button, and you want to\nrespond to button clicks::\n\n >>> from rubicon.java import JavaClass, JavaInterface\n\n # Wrap the Java interface\n >>> ActionListener = JavaInterface('java/awt/event/ActionListener')\n\n # Define your own implementation\n >>> class MyActionListener(ActionListener):\n ... def actionPerformed(self, event):\n ... print \"Button Pressed\"\n\n # Instantiate an instance of the listener\n >>> listener = MyActionListener()\n\n # Create a button, and set the listener\n >>> Button = JavaClass('javax/swing/JButton')\n >>> button = Button('Push it')\n >>> button.setActionListener(listener)\n\nOf course, this sample code won't work unless it's in the context of a larger\napplication starting a Swing GUI and so on.\n\nTesting\n-------\n\nTo run the Rubicon test suite:\n\n1. Configure your shell environment so that the Python, Java, and Rubicon\n dynamic libraries can be discovered by the dynamic linker.\n\n * On OSX, using Python 2.7.7 built under Homebrew::\n\n export DYLD_LIBRARY_PATH=/usr/local/Cellar/python/2.7.7_2/Frameworks/Python.framework/Versions/2.7/lib/:`/usr/libexec/java_home`/jre/lib/server:./dist\n\n2. Build the libraries::\n\n $ make clean\n $ make all\n\n3. Run the test suite::\n\n $ java org.pybee.rubicon.test.Test\n\nThis is a Python test suite, invoked via Java.\n\n.. Documentation\n.. -------------\n\n.. Full documentation for Rubicon can be found on `Read The Docs`_.\n\nCommunity\n---------\n\nRubicon is part of the `BeeWare suite`_. You can talk to the community through:\n\n* `@pybeeware on Twitter`_\n\n* The `pybee/general`_ channel on Gitter.\n\nWe foster a welcoming and respectful community as described in our\n`BeeWare Community Code of Conduct`_.\n\nContributing\n------------\n\nIf you experience problems with this backend, `log them on GitHub`_. If you\nwant to contribute code, please `fork the code`_ and `submit a pull request`_.\n\nInstallation\n============\n\nPrerequisites:\n\n+ Python 2.7 or higher or 3.4 or higher\n\n * http://www.python.org/\n * 2.7 and 3.6 are primary test environments.\n\n+ pip and setuptools\n\n * http://pypi.python.org/pypi/pip\n * http://pypi.python.org/pypi/setuptools\n\nTo install run::\n\n python -m pip install --upgrade jtypes.rubicon\n\nTo ensure everything is running correctly you can run the tests using::\n\n python -m jt.rubicon.tests\n\nDevelopment\n===========\n\nVisit `development page`_\n\nInstallation from sources:\n\nClone the `sources`_ and run::\n\n python -m pip install ./jtypes.rubicon\n\nor on development mode::\n\n python -m pip install --editable ./jtypes.rubicon\n\nPrerequisites:\n\n+ Development is strictly based on *tox*. To install it run::\n\n python -m pip install tox\n\nLicense\n=======\n\n | Copyright (c) 2016-2018, Adam Karpierz\n |\n | Licensed under the BSD license\n | http://opensource.org/licenses/BSD-3-Clause\n | Please refer to the accompanying LICENSE file.\n\nAuthors\n=======\n\n* Adam Karpierz \n\n.. _PyPI record: https://pypi.python.org/pypi/jtypes.rubicon\n.. _original website: https://github.com/pybee/rubicon-java\n.. _development page: https://github.com/karpierz/jtypes.rubicon\n.. _sources: https://github.com/karpierz/jtypes.rubicon\n\n.. _BeeWare suite: http://pybee.org\n.. _Rubicon suite: http://pybee.org/rubicon\n.. _Read The Docs: http://rubicon-java.readthedocs.org\n.. _@pybeeware on Twitter: https://twitter.com/pybeeware\n.. _pybee/general: https://gitter.im/pybee/general\n.. _BeeWare Community Code of Conduct: http://pybee.org/community/behavior/\n.. _log them on Github: https://github.com/pybee/rubicon-java/issues\n.. _fork the code: https://github.com/pybee/rubicon-java\n.. _submit a pull request: https://github.com/pybee/rubicon-java/pulls\n\nChangelog\n=========\n\n0.1.0a2 (2018-11-08)\n--------------------\n- Update of the required setuptools version.\n- Minor setup and tests improvements.\n\n0.1.0a0 (2016-11-30)\n--------------------\n- Initial version.\n", "description_content_type": "", "docs_url": null, "download_url": "http://pypi.python.org/pypi/jtypes.rubicon/", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://pypi.python.org/pypi/jtypes.rubicon/", "keywords": "jtypes, jt, jpype, jep, pyjnius, jpy, javabridge, pyjava, jcc,", "license": "BSD license", "maintainer": "", "maintainer_email": "", "name": "jtypes.rubicon", "package_url": "https://pypi.org/project/jtypes.rubicon/", "platform": "any", "project_url": "https://pypi.org/project/jtypes.rubicon/", "project_urls": { "Download": "http://pypi.python.org/pypi/jtypes.rubicon/", "Homepage": "http://pypi.python.org/pypi/jtypes.rubicon/" }, "release_url": "https://pypi.org/project/jtypes.rubicon/0.1.0a2/", "requires_dist": null, "requires_python": "", "summary": "A bridge interface between Python and Java (ctypes/cffi-based rubicon-java)", "version": "0.1.0a2" }, "last_serial": 5853285, "releases": { "0.1.0a2": [ { "comment_text": "", "digests": { "md5": "675e3e284fcea055536cb373bb3502f4", "sha256": "64ca404ebc117ddc176ace7abf699f82a52fa816f4bbf2b73af1edb2dcc93d5c" }, "downloads": -1, "filename": "jtypes.rubicon-0.1.0a2.zip", "has_sig": false, "md5_digest": "675e3e284fcea055536cb373bb3502f4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 64202, "upload_time": "2018-11-12T15:01:09", "url": "https://files.pythonhosted.org/packages/96/e7/57cd0649d63f2d19494e4bc35d9976798e202090b67ef266487d53d5cb20/jtypes.rubicon-0.1.0a2.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "675e3e284fcea055536cb373bb3502f4", "sha256": "64ca404ebc117ddc176ace7abf699f82a52fa816f4bbf2b73af1edb2dcc93d5c" }, "downloads": -1, "filename": "jtypes.rubicon-0.1.0a2.zip", "has_sig": false, "md5_digest": "675e3e284fcea055536cb373bb3502f4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 64202, "upload_time": "2018-11-12T15:01:09", "url": "https://files.pythonhosted.org/packages/96/e7/57cd0649d63f2d19494e4bc35d9976798e202090b67ef266487d53d5cb20/jtypes.rubicon-0.1.0a2.zip" } ] }