{ "info": { "author": "Christian Zagrodnick", "author_email": "cz@gocept.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Console", "Environment :: Plugins", "Framework :: Buildout", "Intended Audience :: Developers", "License :: OSI Approved :: Zope Public License", "Operating System :: MacOS :: MacOS X", "Operating System :: POSIX :: Linux", "Programming Language :: C", "Programming Language :: Python", "Topic :: Software Development :: Build Tools", "Topic :: System :: Software Distribution" ], "description": "gocept.cxoracle - A zc.buildout recipe to easily get cx_Oracle running\n\nAn example buildout might look like this::\n\n [buildout]\n develop = .\n parts = python-oracle cx_Oracle test\n python = python-oracle\n\n [python-oracle]\n recipe = gocept.cxoracle\n instant-client = .../instantclient-basiclite-macosx-10.2.0.4.0.zip\n instant-sdk = .../instantclient-sdk-macosx-10.2.0.4.0.zip\n\n [cx_Oracle]\n recipe = zc.recipe.egg:custom\n egg = cx_Oracle\n\n [test]\n recipe = zc.recipe.testrunner\n eggs = test.some.egg\n\n\ngocept.cxoracle - A zc.buildout recipe to easily get cx_Oracle running\n======================================================================\n\nThe main purpose is to set up the environment required to build a cx_Oracle egg\nand then provide a loader which sets environment variables required to load the\nshared libraries.\n\nOracle doesn't allow the libraries required to be distributed freely. That\nmeans that they must be downloaded by the user or developer from\nhttp://www.oracle.com/technology/software/tech/oci/instantclient/index.html\n\nTwo archives are required per architecture / operating system:\n\n1. Instant client basic lite\n2. The SDK\n\n>>> import os.path\n>>> basiclite = os.path.join(\n... os.path.dirname(__file__), 'basiclite-linux.zip')\n>>> sdk = os.path.join(\n... os.path.dirname(__file__), 'sdk-linux.zip')\n\nBoth files have to be configured in the buildout:\n\n>>> write(\"buildout.cfg\", \"\"\"\n... [buildout]\n... parts = python-oracle\n... python = python-oracle\n...\n... [python-oracle]\n... recipe = gocept.cxoracle\n... instant-client = %(basiclite)s\n... instant-sdk = %(sdk)s\n...\n... \"\"\" % {'basiclite': basiclite,\n... 'sdk': sdk}\n... )\n\n>>> print system(buildout),\nInstalling python-oracle.\n\nWe have an oracle-home now in the parts. It contains the contents of both\narchives mixed together *plus* a symlink for ``libclntsh.so ->\nlibclntsh.so.10.1``:\n\n>>> ls('parts', 'python-oracle')\n- BASIC_LITE_README\n- classes12.jar\n- genezi\n- libclntsh.so\n- libclntsh.so.10.1\n- libnnz10.so\n- libocci.so.10.1\n- libociicus.so\n- libocijdbc10.so\n- ojdbc14.jar\nd sdk\n\n>>> import os\n>>> os.path.islink(os.path.join('parts', 'python-oracle', 'libclntsh.so'))\nTrue\n>>> os.readlink(os.path.join('parts', 'python-oracle', 'libclntsh.so'))\n'.../parts/python-oracle/libclntsh.so.10.1'\n\n\nIn the bin directory there is a wrapper which sets the ``LD_LIBRARY_PATH`` (or\n``DYLD_LIBRARY_PATH`` on darwin) and the ``ORACLE_HOME`` environment variables:\n\n>>> ls('bin')\n- buildout\n- python-oracle\n\nThe wrapper can be called like any python interpreter:\n\n>>> system(os.path.join('bin', 'python-oracle') +\n... \"\"\" -c \"import os; print os.environ['ORACLE_HOME']\" \"\"\")\n'.../parts/python-oracle\\n'\n\n>>> script = '''\\\n... import os\n... import sys\n... if sys.platform == 'darwin':\n... varname = 'DYLD_LIBRARY_PATH'\n... else:\n... varname = 'LD_LIBRARY_PATH'\n... print os.environ[varname]\n... '''\n\n>>> system(os.path.join('bin', 'python-oracle') +\n... \"\"\" -c \"%s\" \"\"\" % script)\n'.../parts/python-oracle\\n'\n\n\nOn Mac OS X / Darwin the libraries are not called .so but .dylib. The recipe\nhandles this correctly:\n\n\n>>> basiclite = os.path.join(\n... os.path.dirname(__file__), 'basiclite-darwin.zip')\n>>> sdk = os.path.join(\n... os.path.dirname(__file__), 'sdk-darwin.zip')\n\nBoth files have to be configured in the buildout:\n\n>>> write(\"buildout.cfg\", \"\"\"\n... [buildout]\n... parts = python-oracle\n... python = python-oracle\n...\n... [python-oracle]\n... recipe = gocept.cxoracle\n... instant-client = %(basiclite)s\n... instant-sdk = %(sdk)s\n...\n... \"\"\" % {'basiclite': basiclite,\n... 'sdk': sdk}\n... )\n\n>>> print system(buildout),\nUninstalling python-oracle.\nInstalling python-oracle.\n\nThe archives are merged as for linux, the a symlink is ``libclntsh.dylib ->\nlibclntsh.dylib.10.1`` this time:\n\n>>> ls('parts', 'python-oracle')\n - BASIC_LITE_README\n - classes12.jar\n - genezi\n - libclntsh.dylib\n - libclntsh.dylib.10.1\n - libnnz10.dylib\n - libocci.dylib.10.1\n - libociicus.dylib\n - libocijdbc10.dylib\n - libocijdbc10.jnilib\n - ojdbc14.jar\n d sdk\n\n\n>>> import os\n>>> os.path.islink(os.path.join('parts', 'python-oracle', 'libclntsh.dylib'))\nTrue\n>>> os.readlink(os.path.join('parts', 'python-oracle', 'libclntsh.dylib'))\n'.../parts/python-oracle/libclntsh.dylib.10.1'\n\nWhen an archive cannot be extracted we'll get an informative error:\n\n>>> write(\"buildout.cfg\", \"\"\"\n... [buildout]\n... parts = python-oracle\n... python = python-oracle\n...\n... [python-oracle]\n... recipe = gocept.cxoracle\n... instant-client = /does/not/exist\n... instant-sdk = %(sdk)s\n...\n... \"\"\" % {'sdk': sdk}\n... )\n\n>>> print system(buildout),\nUninstalling python-oracle.\nInstalling python-oracle.\nWhile:\n Installing python-oracle.\n\nAn internal error occured due to a bug in either zc.buildout or in a\nrecipe being used:\nTraceback (most recent call last):\n ...\nException: Extraction of file '/does/not/exist' failed.\n\n\nChanges\n=======\n\n0.1.1 (2008-08-29)\n------------------\n\n- Fixed brown bag release 0.1\n\n0.1 (2008-08-29)\n----------------\n\n- first release", "description_content_type": null, "docs_url": null, "download_url": "http://pypi.python.org/pypi/gocept.cxoracle", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://pypi.python.org/pypi/gocept.cxoracle", "keywords": null, "license": "ZPL 2.1", "maintainer": null, "maintainer_email": null, "name": "gocept.cxoracle", "package_url": "https://pypi.org/project/gocept.cxoracle/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/gocept.cxoracle/", "project_urls": { "Download": "http://pypi.python.org/pypi/gocept.cxoracle", "Homepage": "http://pypi.python.org/pypi/gocept.cxoracle" }, "release_url": "https://pypi.org/project/gocept.cxoracle/0.1.1/", "requires_dist": null, "requires_python": null, "summary": "zc.buildout recipe for installing cx_Oracle", "version": "0.1.1" }, "last_serial": 792550, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "26e0698608918a330255e913562dda98", "sha256": "06123a2d695a37845cf48d3119bf6860e093e1ecfd02fbed6c60e4385f3dda94" }, "downloads": -1, "filename": "gocept.cxoracle-0.1.tar.gz", "has_sig": false, "md5_digest": "26e0698608918a330255e913562dda98", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11094, "upload_time": "2008-08-29T12:12:29", "url": "https://files.pythonhosted.org/packages/96/f9/cd2c35eaccd6b4818153c786dda85465e03d68ecc6adc6d4e7661985de35/gocept.cxoracle-0.1.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "dbf8ddb5e4cf88d6cbd014e5f87c96d0", "sha256": "5880f9896e38c67b8847c16aba5bee2a2599119ce409e4291bfd8157e008dfb9" }, "downloads": -1, "filename": "gocept.cxoracle-0.1.1.tar.gz", "has_sig": false, "md5_digest": "dbf8ddb5e4cf88d6cbd014e5f87c96d0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11148, "upload_time": "2008-08-29T12:17:39", "url": "https://files.pythonhosted.org/packages/aa/fb/496a682212f64a08b1cbb5af9b1039c7d327fd4d1e2eeb6df07a1624d100/gocept.cxoracle-0.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "dbf8ddb5e4cf88d6cbd014e5f87c96d0", "sha256": "5880f9896e38c67b8847c16aba5bee2a2599119ce409e4291bfd8157e008dfb9" }, "downloads": -1, "filename": "gocept.cxoracle-0.1.1.tar.gz", "has_sig": false, "md5_digest": "dbf8ddb5e4cf88d6cbd014e5f87c96d0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11148, "upload_time": "2008-08-29T12:17:39", "url": "https://files.pythonhosted.org/packages/aa/fb/496a682212f64a08b1cbb5af9b1039c7d327fd4d1e2eeb6df07a1624d100/gocept.cxoracle-0.1.1.tar.gz" } ] }