VSPacker


NameVSPacker JSON
Version 0.0.7 PyPI version JSON
download
home_pagehttps://github.com/sean1832/vspacker.git
SummaryA simple library for automating ziping binary files for distribution in Visual Studio
upload_time2024-08-26 10:28:41
maintainerNone
docs_urlNone
authorZeke Zhang
requires_python>=3.7
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # VSPacker

Packer is a utility library for packaging c# projects into a distributable zip file. It is designed to be used in a Post Build event in Visual Studio.

![](https://img.shields.io/pypi/v/vspacker)
![](https://img.shields.io/pypi/pyversions/vspacker
)


## Installation
```bash
pip install vspacker
```

## Usage

See the example below for a simple implementation. For more detail see [examples](./example/).

### Python Implementation

```python
import os
import vspacker.package_builder as builder


def main():
    args = parse_args()
    project_file = args.project_file
    solution_root = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
    example_file = os.path.join(solution_root, "Example/grasshopper", "portal-example.gh")

    proj = builder.AssemblyBuilder(project_file)
    proj.build_zip(
        input_dir=os.path.join(proj.project_dir, "bin", "release", "net48"),
        zip_filename=f"{proj.project_name}-{proj.version}.zip",
        exclude_patterns=["*.xml", "*.pdb"],
        include_files=[
            (os.path.join(solution_root, "LICENSE"), "resources/LICENSE.txt"),
            os.path.join(solution_root, "README.md"),
        ],
        internal_folder=proj.project_name,
    )
    proj.copy_file(
        example_file,
        proj.output_folder,
        rename=f"{proj.project_name}-example-{proj.version}.gh",
    )


if __name__ == "__main__":
    main()
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/sean1832/vspacker.git",
    "name": "VSPacker",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": null,
    "author": "Zeke Zhang",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/e1/ce/3aa654cd3ff39ee7323cb55ca2dec0b1b1c15b53fddc74af785966f86a73/VSPacker-0.0.7.tar.gz",
    "platform": null,
    "description": "# VSPacker\r\n\r\nPacker is a utility library for packaging c# projects into a distributable zip file. It is designed to be used in a Post Build event in Visual Studio.\r\n\r\n![](https://img.shields.io/pypi/v/vspacker)\r\n![](https://img.shields.io/pypi/pyversions/vspacker\r\n)\r\n\r\n\r\n## Installation\r\n```bash\r\npip install vspacker\r\n```\r\n\r\n## Usage\r\n\r\nSee the example below for a simple implementation. For more detail see [examples](./example/).\r\n\r\n### Python Implementation\r\n\r\n```python\r\nimport os\r\nimport vspacker.package_builder as builder\r\n\r\n\r\ndef main():\r\n    args = parse_args()\r\n    project_file = args.project_file\r\n    solution_root = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))\r\n    example_file = os.path.join(solution_root, \"Example/grasshopper\", \"portal-example.gh\")\r\n\r\n    proj = builder.AssemblyBuilder(project_file)\r\n    proj.build_zip(\r\n        input_dir=os.path.join(proj.project_dir, \"bin\", \"release\", \"net48\"),\r\n        zip_filename=f\"{proj.project_name}-{proj.version}.zip\",\r\n        exclude_patterns=[\"*.xml\", \"*.pdb\"],\r\n        include_files=[\r\n            (os.path.join(solution_root, \"LICENSE\"), \"resources/LICENSE.txt\"),\r\n            os.path.join(solution_root, \"README.md\"),\r\n        ],\r\n        internal_folder=proj.project_name,\r\n    )\r\n    proj.copy_file(\r\n        example_file,\r\n        proj.output_folder,\r\n        rename=f\"{proj.project_name}-example-{proj.version}.gh\",\r\n    )\r\n\r\n\r\nif __name__ == \"__main__\":\r\n    main()\r\n```\r\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A simple library for automating ziping binary files for distribution in Visual Studio",
    "version": "0.0.7",
    "project_urls": {
        "Homepage": "https://github.com/sean1832/vspacker.git"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d36e7e310b83f9b0b9b94dc3f13ae320440ca00fc3b7be895a17f91baea0c855",
                "md5": "d570d8b008a617eefaa9c62ba420ef2c",
                "sha256": "6be67fa32394d795b27687c4e71758534efac17c99e01fb4c25cdbf31f8667a3"
            },
            "downloads": -1,
            "filename": "VSPacker-0.0.7-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d570d8b008a617eefaa9c62ba420ef2c",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 9427,
            "upload_time": "2024-08-26T10:28:39",
            "upload_time_iso_8601": "2024-08-26T10:28:39.803341Z",
            "url": "https://files.pythonhosted.org/packages/d3/6e/7e310b83f9b0b9b94dc3f13ae320440ca00fc3b7be895a17f91baea0c855/VSPacker-0.0.7-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e1ce3aa654cd3ff39ee7323cb55ca2dec0b1b1c15b53fddc74af785966f86a73",
                "md5": "5ab1c00f4b661e66f93b641592f9d1d6",
                "sha256": "2a131bf381af8d5c9971329fe5d6fa5e7f7bacf0d3fd4ebcac9ce9c1fab8c43d"
            },
            "downloads": -1,
            "filename": "VSPacker-0.0.7.tar.gz",
            "has_sig": false,
            "md5_digest": "5ab1c00f4b661e66f93b641592f9d1d6",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 8100,
            "upload_time": "2024-08-26T10:28:41",
            "upload_time_iso_8601": "2024-08-26T10:28:41.439748Z",
            "url": "https://files.pythonhosted.org/packages/e1/ce/3aa654cd3ff39ee7323cb55ca2dec0b1b1c15b53fddc74af785966f86a73/VSPacker-0.0.7.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-26 10:28:41",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "sean1832",
    "github_project": "vspacker",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "vspacker"
}
        
Elapsed time: 0.66248s