{ "info": { "author": "Davide Mancusi", "author_email": "davide.mancusi@cea.fr", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Console", "License :: OSI Approved :: MIT License", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3", "Topic :: Scientific/Engineering :: Physics" ], "description": "g42so\n=====\n\n[![PyPI version](https://badge.fury.io/py/g42so.svg)](https://badge.fury.io/py/g42so)\n\nThis is `g42so`, a simple Python script that compiles\n[Geant4](https://geant4.web.cern.ch/) detector-construction and\nprimary-generator-action classes, wraps them in C-style (unmangled) adapter\nfunctions and produces a shared library. The library can then be loaded via\n`dlopen` by third-party code, allowing instantiation of a Geant4 detector\nconstruction or primary generator action even if the name of the specific class\nis not known in advance.\n\n\nInstalling `g42so`\n------------------\n\nThe recommended installation procedure for `g42so` is to use `pip`:\n\n $ pip install g42so\n\n\nQuick tutorial\n--------------\n\nCompilation is delegated to [`g++`](https://gcc.gnu.org/) by default (no, I did\nnot reimplement `gcc` from scratch), but this can be configured using the `-c`\noption. Note however that `g42so` must know what compilation flags to use for\nyour compiler; at the moment, it only recognizes `g++` and `clang++`.\n\nRunning `g42so -h` gives a list of available options. You will typically want\nto run something along the lines of the following:\n\n $ g42so -I /path/to/include/ \\\n /path/to/src/MyDetectorConstruction.cc /path/to/src/MyPrimaryGeneratorAction.cc\n\n\n### Notes\n\n* Geant4 must be installed and the `geant4-config` script must be in the\n `$PATH`, or its location can be specified with the `--geant4-config` option.\n\n* `g42so` tries to automatically detect the names of the classes you want to\n wrap. If it fails or is unsure, it will ask you to explicitly specify your\n class names.\n\n* If your class constructors require arguments, you will need to customise the\n C wrappers generated by the code. First run\n\n $ g42so --dump-detector-wrapper >detectorWrapper.cc\n\n to dump the relevant wrapper. Modify it to your needs and pass it to `g42so`\n along with the `--custom-detector-wrapper` option, which tells `g42so` not to\n include its default wrapper. For instance:\n\n $ g42so --custom-detector-wrapper -I /path/to/include/ \\\n /path/to/src/MyDetectorConstruction.cc detectorWrapper.cc\n\n The `--dump-pga-wrapper` and `--custom-pga-wrapper` do the same job for\n primary-generator-action classes.\n\n* Note that `dlopen`ing shared libraries that link to Geant4 is likely to fail\n if Geant4 was compiled is multi-threaded mode (the\n `GEANT4_BUILD_MULTITHREADED` CMake flag is set to `ON`) with the default\n value for the `GEANT4_BUILD_TLS_MODEL` (the default is `initial-exec`). If\n you want to `dlopen` the libraries created by `g42so` (which is the whole\n point of this tool, really!), then you should make sure that either Geant4\n was compiled in single-threaded mode, or `GEANT4_BUILD_TLS_MODEL` was set to\n `global-dynamic`.\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/arekfu/g42so", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "g42so", "package_url": "https://pypi.org/project/g42so/", "platform": "", "project_url": "https://pypi.org/project/g42so/", "project_urls": { "Homepage": "https://github.com/arekfu/g42so" }, "release_url": "https://pypi.org/project/g42so/0.3.0/", "requires_dist": null, "requires_python": ">=2.6, <4", "summary": "A tool to convert Geant4 geometries into shared libraries", "version": "0.3.0" }, "last_serial": 5457957, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "cc54f4c6593aab612d28ddb922f98f90", "sha256": "812f8b5e1c8b3b88c07bd1af2fa839cb612a5e7e57b6145de5d1d6c39ffa6e6f" }, "downloads": -1, "filename": "g42so-0.1.0-py2-none-any.whl", "has_sig": false, "md5_digest": "cc54f4c6593aab612d28ddb922f98f90", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": ">=2.6, <3", "size": 9869, "upload_time": "2018-10-24T13:50:40", "url": "https://files.pythonhosted.org/packages/40/91/e8236d88e34bd288cab33a7989fee6cbfff6cfd8cced6dca32f280f72dee/g42so-0.1.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a87bb347a50d6897afa1e065867e5d58", "sha256": "2e4a533d38b7082160bc80ee11e820605b6b9d6cfa140be29817258c68dc9ec3" }, "downloads": -1, "filename": "g42so-0.1.0.tar.gz", "has_sig": false, "md5_digest": "a87bb347a50d6897afa1e065867e5d58", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.6, <3", "size": 7736, "upload_time": "2018-10-24T13:50:41", "url": "https://files.pythonhosted.org/packages/af/b1/4607097c8deefc6d097cac312adb37c6c759fef5b2a0b7c207c716975f53/g42so-0.1.0.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "db78bf1ac5579bca1efafd43234ce5f2", "sha256": "f8da6bd9bf9c7f87e5fb7a159fc2fdc6e06cceaadc7d81fa45080aa0eb298439" }, "downloads": -1, "filename": "g42so-0.2.0-py2-none-any.whl", "has_sig": false, "md5_digest": "db78bf1ac5579bca1efafd43234ce5f2", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": ">=2.6, <3", "size": 10330, "upload_time": "2018-10-24T13:46:45", "url": "https://files.pythonhosted.org/packages/51/07/200bfd98c494d59dd06165d011a9464934a99b5ed62d2e6ea7a993e42867/g42so-0.2.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "fead1be162fd29e2700c40b4ab543a4e", "sha256": "1efe01b0a2b3280563fb8af530cf3a36e169f1e6cabe97d087a84ef565a2b7b9" }, "downloads": -1, "filename": "g42so-0.2.0.tar.gz", "has_sig": false, "md5_digest": "fead1be162fd29e2700c40b4ab543a4e", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.6, <3", "size": 8113, "upload_time": "2018-10-24T13:46:47", "url": "https://files.pythonhosted.org/packages/e2/e9/69fe4d30e0ac6800c6c5ac4f7a3ed0493dc7287c8a39c1e469b515003e74/g42so-0.2.0.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "e505f4f89091c89ec773914271db5f91", "sha256": "4ca7bed57dc160d31db30f787a5bed8cc15e06ebc9e9bad5332ec8837a13515f" }, "downloads": -1, "filename": "g42so-0.3.0-py2-none-any.whl", "has_sig": false, "md5_digest": "e505f4f89091c89ec773914271db5f91", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": ">=2.6, <4", "size": 10618, "upload_time": "2019-06-27T17:10:13", "url": "https://files.pythonhosted.org/packages/38/eb/09bf9d0924481ed4744f28f724a9cb2be40a7313bde47f61eb98a6113db7/g42so-0.3.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5bd4bf218dec516115f042bcb69dde66", "sha256": "c51663fb3ceda9226f8dca23d1dab442f585035f6cc37fd8db7bca328fa10b6c" }, "downloads": -1, "filename": "g42so-0.3.0-py3-none-any.whl", "has_sig": false, "md5_digest": "5bd4bf218dec516115f042bcb69dde66", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=2.6, <4", "size": 10617, "upload_time": "2019-06-27T17:10:15", "url": "https://files.pythonhosted.org/packages/c7/f8/fce4fe8ab9fb196b644d3f0c963599e32ff1304bb54d66e0ffc11e47a84a/g42so-0.3.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d8ddf242308beaf842d4fea0f4dcbf2f", "sha256": "bd056527030d303c94c380c617e5b62289efa3ed8b3e762dcb38ec74cc5e364e" }, "downloads": -1, "filename": "g42so-0.3.0.tar.gz", "has_sig": false, "md5_digest": "d8ddf242308beaf842d4fea0f4dcbf2f", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.6, <4", "size": 8304, "upload_time": "2019-06-27T17:10:16", "url": "https://files.pythonhosted.org/packages/61/92/cfe0cc13ad4ffe1ad39d7cd87639079974d02d89ded3c1ff35489d25a0bf/g42so-0.3.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e505f4f89091c89ec773914271db5f91", "sha256": "4ca7bed57dc160d31db30f787a5bed8cc15e06ebc9e9bad5332ec8837a13515f" }, "downloads": -1, "filename": "g42so-0.3.0-py2-none-any.whl", "has_sig": false, "md5_digest": "e505f4f89091c89ec773914271db5f91", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": ">=2.6, <4", "size": 10618, "upload_time": "2019-06-27T17:10:13", "url": "https://files.pythonhosted.org/packages/38/eb/09bf9d0924481ed4744f28f724a9cb2be40a7313bde47f61eb98a6113db7/g42so-0.3.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5bd4bf218dec516115f042bcb69dde66", "sha256": "c51663fb3ceda9226f8dca23d1dab442f585035f6cc37fd8db7bca328fa10b6c" }, "downloads": -1, "filename": "g42so-0.3.0-py3-none-any.whl", "has_sig": false, "md5_digest": "5bd4bf218dec516115f042bcb69dde66", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=2.6, <4", "size": 10617, "upload_time": "2019-06-27T17:10:15", "url": "https://files.pythonhosted.org/packages/c7/f8/fce4fe8ab9fb196b644d3f0c963599e32ff1304bb54d66e0ffc11e47a84a/g42so-0.3.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d8ddf242308beaf842d4fea0f4dcbf2f", "sha256": "bd056527030d303c94c380c617e5b62289efa3ed8b3e762dcb38ec74cc5e364e" }, "downloads": -1, "filename": "g42so-0.3.0.tar.gz", "has_sig": false, "md5_digest": "d8ddf242308beaf842d4fea0f4dcbf2f", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.6, <4", "size": 8304, "upload_time": "2019-06-27T17:10:16", "url": "https://files.pythonhosted.org/packages/61/92/cfe0cc13ad4ffe1ad39d7cd87639079974d02d89ded3c1ff35489d25a0bf/g42so-0.3.0.tar.gz" } ] }