pycompall


Namepycompall JSON
Version 0.2.0 PyPI version JSON
download
home_page
SummaryPycompall is a wrapper around the default `compileall` Python utility to compile `.py` to `.pyc` files to provide a more configurable interface and as a build tool when configuring python files.
upload_time2023-07-20 08:11:23
maintainer
docs_urlNone
author
requires_python>=3.7
license
keywords obfuscation python-obfuscation python-compiler
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Pycompall Package
Pycompall is a wrapper around the default `compileall` Python utility to compile `.py` to `.pyc` files to provide a more configurable interface and as a build tool when configuring python files.

This package is also useful for code obfuscation, especially since most `.py` files can be substituted for their compiled bytecode equivalents most of the time.


## Installation
```sh
pip install pycompall
```

## Usage
`pycompall compile [OPTIONS] [PATH]`. 

Without any options, this will compile all `.py` files in the current directory (or file) into the default `__pycache__` directory.

### Options
#### `-r`, `--recursive`

Recurse through subdirectories.

#### `--in-place`

Remove original `.py` files and replace them with compiled `.pyc` files.

#### `--create-empty-init`

Create an empty `__init__.py` file in the base directory path specified after compilation. Useful for interacting with other build tools such as colcon that require a package to have an `__init__.py` file.

- Note: this only adds the file in the **base directory** specified, regardless of whether the `--recursive` flag is specified.

#### `--exclude-files TEXT`  

Exclude pattern(s) for files to be excluded during                    compilation and replacement.

- Note: this option supports globbing patterns with python's `Path.match` method, but this requires globs to be passed as strings to the tool, so you must wrap the glob in quotes (e.g. `pycompall compile --exclude-files '*.py'`).
- To specify multiple files to exclude, write the flag again (e.g. `pycompall compile --exclude-files '*test.py' --exclude-files 'test/*.py'`)

#### `--exclude-dirs TEXT` 

Exclude pattern(s) for directories to be excluded during compilation and replacement. Note that if the directory is skipped and --create-empty-init is True, the `__init__.py` file will not be created.

- Note: this option supports globbing patterns with python's `Path.match` method, but this requires globs to be passed as strings to the tool, so you must wrap the glob in quotes (e.g. `pycompall compile --exclude-dirs 'test*'`).
- To specify multiple directories to exclude, write the flag again (e.g. `pycompall compile --exclude-dirs 'test' --exclude-dirs 'utils'`)

#### `--ignore-symlinks`

Sometimes symlinks causes problems. Enable this flag to ignore symlinks.

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "pycompall",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "obfuscation,python-obfuscation,python-compiler",
    "author": "",
    "author_email": "Kim Yongbeom <yongbeom.kim@u.nus.edu>",
    "download_url": "https://files.pythonhosted.org/packages/a1/17/8c512e752573d5131911b69e48528501b1ff05df89eb870960d142b716ac/pycompall-0.2.0.tar.gz",
    "platform": null,
    "description": "# Pycompall Package\nPycompall is a wrapper around the default `compileall` Python utility to compile `.py` to `.pyc` files to provide a more configurable interface and as a build tool when configuring python files.\n\nThis package is also useful for code obfuscation, especially since most `.py` files can be substituted for their compiled bytecode equivalents most of the time.\n\n\n## Installation\n```sh\npip install pycompall\n```\n\n## Usage\n`pycompall compile [OPTIONS] [PATH]`. \n\nWithout any options, this will compile all `.py` files in the current directory (or file) into the default `__pycache__` directory.\n\n### Options\n#### `-r`, `--recursive`\n\nRecurse through subdirectories.\n\n#### `--in-place`\n\nRemove original `.py` files and replace them with compiled `.pyc` files.\n\n#### `--create-empty-init`\n\nCreate an empty `__init__.py` file in the base directory path specified after compilation. Useful for interacting with other build tools such as colcon that require a package to have an `__init__.py` file.\n\n- Note: this only adds the file in the **base directory** specified, regardless of whether the `--recursive` flag is specified.\n\n#### `--exclude-files TEXT`  \n\nExclude pattern(s) for files to be excluded during                    compilation and replacement.\n\n- Note: this option supports globbing patterns with python's `Path.match` method, but this requires globs to be passed as strings to the tool, so you must wrap the glob in quotes (e.g. `pycompall compile --exclude-files '*.py'`).\n- To specify multiple files to exclude, write the flag again (e.g. `pycompall compile --exclude-files '*test.py' --exclude-files 'test/*.py'`)\n\n#### `--exclude-dirs TEXT` \n\nExclude pattern(s) for directories to be excluded during compilation and replacement. Note that if the directory is skipped and --create-empty-init is True, the `__init__.py` file will not be created.\n\n- Note: this option supports globbing patterns with python's `Path.match` method, but this requires globs to be passed as strings to the tool, so you must wrap the glob in quotes (e.g. `pycompall compile --exclude-dirs 'test*'`).\n- To specify multiple directories to exclude, write the flag again (e.g. `pycompall compile --exclude-dirs 'test' --exclude-dirs 'utils'`)\n\n#### `--ignore-symlinks`\n\nSometimes symlinks causes problems. Enable this flag to ignore symlinks.\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Pycompall is a wrapper around the default `compileall` Python utility to compile `.py` to `.pyc` files to provide a more configurable interface and as a build tool when configuring python files.",
    "version": "0.2.0",
    "project_urls": {
        "Homepage": "https://github.com/Yongbeom-Kim/py-compiler",
        "Repository": "https://github.com/Yongbeom-Kim/py-compiler"
    },
    "split_keywords": [
        "obfuscation",
        "python-obfuscation",
        "python-compiler"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "90d5cd1da3da362e41425e88aa0505dbc94f69163a9d65d7e6e0d3fb95b9973c",
                "md5": "4fe4eb0e8d529c40f9941d3aa1d59653",
                "sha256": "3cde1fe86e8028ff592a87b7c5bc55f807e7a6d20222d78938cd2964b9ff799a"
            },
            "downloads": -1,
            "filename": "pycompall-0.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "4fe4eb0e8d529c40f9941d3aa1d59653",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 8567,
            "upload_time": "2023-07-20T08:11:21",
            "upload_time_iso_8601": "2023-07-20T08:11:21.618004Z",
            "url": "https://files.pythonhosted.org/packages/90/d5/cd1da3da362e41425e88aa0505dbc94f69163a9d65d7e6e0d3fb95b9973c/pycompall-0.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a1178c512e752573d5131911b69e48528501b1ff05df89eb870960d142b716ac",
                "md5": "859d85421516f7613fcd320fc9637cd7",
                "sha256": "1a5083e53f852efe7ce72b06723a83f54e563300a5e35b97c1bd35905e30f742"
            },
            "downloads": -1,
            "filename": "pycompall-0.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "859d85421516f7613fcd320fc9637cd7",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 9779,
            "upload_time": "2023-07-20T08:11:23",
            "upload_time_iso_8601": "2023-07-20T08:11:23.682006Z",
            "url": "https://files.pythonhosted.org/packages/a1/17/8c512e752573d5131911b69e48528501b1ff05df89eb870960d142b716ac/pycompall-0.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-07-20 08:11:23",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Yongbeom-Kim",
    "github_project": "py-compiler",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "pycompall"
}
        
Elapsed time: 0.09807s