{ "info": { "author": "Lum\u00edr Balhar", "author_email": "frenzy.madness@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: Python Software Foundation License", "Operating System :: POSIX :: Linux", "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 :: 3.8", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Software Development :: Compilers" ], "description": "# compileall2 Python module\n\nCopy of `compileall` module from CPython source code with some new features, namely:\n\n* compatibility with Python >= 3.4 & PyPy 3\n\n* default recursion limit is now \"unlimited\" (actually limited by `sys.getrecursionlimit()`)\n\n* `-s` and `-p` command line options for manipulation of the path baked into\n a compiled `*.pyc` file.\n\n* the `-o` command line option can be specified multiple times to compile for \n multiple optimization levels in one run\n\n## Installation\n\n* From [PyPI](https://pypi.org/project/compileall2/) via `pip install compileall2`\n\n* RPMs will be available in [Fedora COPR](https://copr.fedorainfracloud.org/coprs/lbalhar/compileall2/)\n\n## Usage\n\n`compileall2` can be executed as a Python module or directly.\n\nExample usage:\n\n```shell\n# Create some script (this one raises an exception to show tracebacks)\n$ echo \"1 / 0\" > test.py\n\n# Compile it\n$ compileall2 test.py\nCompiling 'test.py'...\n\n# Try to execute compiled version directly\n$ python __pycache__/test.cpython-37.pyc \nTraceback (most recent call last):\n File \"test.py\", line 1, in \n 1 / 0\nZeroDivisionError: division by zero\n\n# Recompile it with changes path which will be visible in error message\n$ compileall2 -f -p /foo/bar test.py\nCompiling 'test.py'...\n$ python __pycache__/test.cpython-37.pyc\nTraceback (most recent call last):\n File \"/foo/bar/test.py\", line 1, in \nZeroDivisionError: division by zero\n\n# Same thing as above but executed as a Python module\n$ python -m compileall2 -f -p /bar/baz test.py\nCompiling 'test.py'...\n$ python __pycache__/test.cpython-37.pyc\nTraceback (most recent call last):\n File \"/bar/baz/test.py\", line 1, in \nZeroDivisionError: division by zero\n```\n\n## Done\n\n* \u2713 Start project :)\n\n* \u2713 Make upstream tests running\n\n* Make `compileall2` compatible with CPythons:\n\n * 3.8 \u2713\n * 3.7 \u2713\n * 3.6 \u2713\n * 3.5 \u2713\n * 3.4 \u2713\n\n* \u2713 Make `compileall2` compatible with PyPy 3\n\n* \u2713 Remove maximum depth limit as described above\n\n* \u2713 Add possibility to strip some part of a path to an original file from compiled one\n\n* \u2713 Publish it to PyPI\n\n* \u2713 Make it available in Fedora COPR\n\n## ToDo\n\n* **[NEXT STEP]** Test it with Python packages in COPR\n\n* Push it to Fedora rawhide\n\n* Test it in Fedora infrastructure with all Python packages\n\n* ? Prepare patches for upstream CPython\n\n## Testing\n\nYou can test it locally with tox or unittest directly:\n\n```shell\n$ python3 -m unittest test_compileall_original.py\n............sss.......................sss.....................ss.................\n----------------------------------------------------------------------\nRan 81 tests in 2.137s\n\nOK (skipped=8)\n```\n\nbut running in a Docker container might be better because the superuser has privileges to write to `sys.path` which lowers the number of skipped tests.\n\nYou can just build the prepared one:\n\n```shell\n$ docker build -t compileall2 .\nSending build context to Docker daemon 177.2 kB\nStep 1/3 : FROM frenzymadness/fedora-python-tox:latest\n ---> 00f92ad0e1d3\n... etc ...\n```\n\nand run tests in it:\n\n```shell\n$ docker run --rm -it -e TOXENV=py37 -v $PWD:/src:Z -w /src compileall2\npy37 create: /src/.tox/py37\npy37 installdeps: pytest\npy37 installed: atomicwrites==1.3.0,attrs==19.1.0,more-itertools==6.0.0,pluggy==0.9.0,py==1.8.0,pytest==4.3.1,six==1.12.0\npy37 run-test-pre: PYTHONHASHSEED='519909491'\npy37 runtests: commands[0] | pytest -v -s\n========================================== test session starts ==========================================\nplatform linux -- Python 3.7.2, pytest-4.3.1, py-1.8.0, pluggy-0.9.0 -- /src/.tox/py37/bin/python\ncachedir: .tox/py37/.pytest_cache\nrootdir: /src, inifile:\ncollected 81 items\n\ntest_compileall_original.py::CompileallTestsWithSourceEpoch::test_compile_dir_pathlike PASSED\ntest_compileall_original.py::CompileallTestsWithSourceEpoch::test_compile_file_pathlike PASSED\ntest_compileall_original.py::CompileallTestsWithSourceEpoch::test_compile_file_pathlike_ddir PASSED\n... etc ...\n================================= 79 passed, 2 skipped in 5.15 seconds ==================================\n________________________________________________ summary ________________________________________________\n py37: commands succeeded\n congratulations :)\n```\n\n## License\n\n[PSF license v2](LICENSE)\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/frenzymadness/compileall2", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "compileall2", "package_url": "https://pypi.org/project/compileall2/", "platform": "", "project_url": "https://pypi.org/project/compileall2/", "project_urls": { "Homepage": "https://github.com/frenzymadness/compileall2" }, "release_url": "https://pypi.org/project/compileall2/0.5.0/", "requires_dist": null, "requires_python": "", "summary": "Enhanced Python `compileall` module", "version": "0.5.0" }, "last_serial": 5499464, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "7383f16a2706ace6a7aa176bf7c5fba2", "sha256": "f1860ec770050ce2b060da7aada06f08b1eda3d8b8a3bfec2de09f125524bdcc" }, "downloads": -1, "filename": "compileall2-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "7383f16a2706ace6a7aa176bf7c5fba2", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 9230, "upload_time": "2019-04-03T12:22:53", "url": "https://files.pythonhosted.org/packages/b8/d3/93644d233b18bf7049f6a79bf2f3e89d9e4dc253e96109e422fde0d0da9c/compileall2-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ee28a4203c82f6d21b76506057f361d6", "sha256": "711e38508af384851d1edeec4941009fbde4439b584d08ece35d7e24553672be" }, "downloads": -1, "filename": "compileall2-0.1.0.tar.gz", "has_sig": false, "md5_digest": "ee28a4203c82f6d21b76506057f361d6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7625, "upload_time": "2019-04-03T12:22:56", "url": "https://files.pythonhosted.org/packages/2c/59/8c8db8fa1c8a6536b04d2e25e39890b05555ead3220cb11d5ecf141b80a2/compileall2-0.1.0.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "4c15ff47d8a0568a7589c7c5f0c57927", "sha256": "7872f95f0ec2f94cbe2b68c7388d51ddb14466eabced1a5da6fa83fdedc77265" }, "downloads": -1, "filename": "compileall2-0.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "4c15ff47d8a0568a7589c7c5f0c57927", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 9525, "upload_time": "2019-04-04T11:44:28", "url": "https://files.pythonhosted.org/packages/c0/4e/452055e09255261df568cbcc4b02da8ba3083ac9f41f84d48d9a6360bc81/compileall2-0.2.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0729024816e9e7e237461bd43f9a438c", "sha256": "89be6321a2e87b0157c2ab4c0da1841a978c3ab79a518d38410369277e760b41" }, "downloads": -1, "filename": "compileall2-0.2.0.tar.gz", "has_sig": false, "md5_digest": "0729024816e9e7e237461bd43f9a438c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7895, "upload_time": "2019-04-04T11:44:30", "url": "https://files.pythonhosted.org/packages/af/46/3ec01a342b4d46472c929113587d7b1fdd23b787fa7135e5ead3d39de929/compileall2-0.2.0.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "6709193745e1f53d5543999e63f54ad4", "sha256": "0f91ab4fe15ea1c0aa8c96bc63b820dcedf3babff45c5af7c344ecbed1410efa" }, "downloads": -1, "filename": "compileall2-0.3.0-py3-none-any.whl", "has_sig": false, "md5_digest": "6709193745e1f53d5543999e63f54ad4", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 9530, "upload_time": "2019-04-15T08:52:55", "url": "https://files.pythonhosted.org/packages/a0/df/53d736db2124f1626560191d08bb06f769c6607b023facf8147613786a20/compileall2-0.3.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1b08f1c52ee0d8d6b32c4481b24eb4ac", "sha256": "f5f19b71016c82a1af502e0e58f1b3fb54216aac1373a64031c9ef6abd5d9106" }, "downloads": -1, "filename": "compileall2-0.3.0.tar.gz", "has_sig": false, "md5_digest": "1b08f1c52ee0d8d6b32c4481b24eb4ac", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7896, "upload_time": "2019-04-15T08:52:57", "url": "https://files.pythonhosted.org/packages/47/8c/3e8619f9642f42845f11b4fb5c2cbadd82e2bf162ff366cf13fcf081476e/compileall2-0.3.0.tar.gz" } ], "0.4.0": [ { "comment_text": "", "digests": { "md5": "1c49ac96948c92825d0716d65c53d093", "sha256": "eaa1bbfa13f6650dc0aee4e14c8783aa4a9deb500dbdc9764f589c41c0bf0958" }, "downloads": -1, "filename": "compileall2-0.4.0-py3-none-any.whl", "has_sig": false, "md5_digest": "1c49ac96948c92825d0716d65c53d093", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 9594, "upload_time": "2019-05-20T09:56:14", "url": "https://files.pythonhosted.org/packages/30/35/ddf699e855d69325ad8bc6c28d02ba2746556eaedba56b7e30766cd14324/compileall2-0.4.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "47dbc5543856caade9262c548094bfa4", "sha256": "17728f3393bac17e2ba8d573720de69daf83ffe5c2968a1759780c5594a75308" }, "downloads": -1, "filename": "compileall2-0.4.0.tar.gz", "has_sig": false, "md5_digest": "47dbc5543856caade9262c548094bfa4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7946, "upload_time": "2019-05-20T09:56:16", "url": "https://files.pythonhosted.org/packages/17/07/50e51bb7c5f2fae4ee48a32f55c31dfdff4fe4a0b54b7bb19ae62381a09d/compileall2-0.4.0.tar.gz" } ], "0.5.0": [ { "comment_text": "", "digests": { "md5": "1916c9e41e6128217d3d9dc1fc9a078c", "sha256": "fcc5ee382ba754320ba45dd6ac8047d940ffd7436fa10f72c3e7b3e71cddfecf" }, "downloads": -1, "filename": "compileall2-0.5.0-py3-none-any.whl", "has_sig": false, "md5_digest": "1916c9e41e6128217d3d9dc1fc9a078c", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 9780, "upload_time": "2019-07-08T08:06:20", "url": "https://files.pythonhosted.org/packages/71/ad/58fee1f1a04de59fe69db5f701c37f67c329e5e5b232e463dddda8780d44/compileall2-0.5.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5e3f5135b13272b35b877165d8890711", "sha256": "e1e6453f3c9fe330c7a184b60bcb00b5f7c31c186a4c99d024a09f13e9198ba4" }, "downloads": -1, "filename": "compileall2-0.5.0.tar.gz", "has_sig": false, "md5_digest": "5e3f5135b13272b35b877165d8890711", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8226, "upload_time": "2019-07-08T08:06:22", "url": "https://files.pythonhosted.org/packages/eb/23/4e9d7bf50b4408b2946200f2dd1e4b943f072197bc473bf013547aa74ad8/compileall2-0.5.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "1916c9e41e6128217d3d9dc1fc9a078c", "sha256": "fcc5ee382ba754320ba45dd6ac8047d940ffd7436fa10f72c3e7b3e71cddfecf" }, "downloads": -1, "filename": "compileall2-0.5.0-py3-none-any.whl", "has_sig": false, "md5_digest": "1916c9e41e6128217d3d9dc1fc9a078c", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 9780, "upload_time": "2019-07-08T08:06:20", "url": "https://files.pythonhosted.org/packages/71/ad/58fee1f1a04de59fe69db5f701c37f67c329e5e5b232e463dddda8780d44/compileall2-0.5.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5e3f5135b13272b35b877165d8890711", "sha256": "e1e6453f3c9fe330c7a184b60bcb00b5f7c31c186a4c99d024a09f13e9198ba4" }, "downloads": -1, "filename": "compileall2-0.5.0.tar.gz", "has_sig": false, "md5_digest": "5e3f5135b13272b35b877165d8890711", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8226, "upload_time": "2019-07-08T08:06:22", "url": "https://files.pythonhosted.org/packages/eb/23/4e9d7bf50b4408b2946200f2dd1e4b943f072197bc473bf013547aa74ad8/compileall2-0.5.0.tar.gz" } ] }