Skip to main content

A simple library for automating ziping binary files for distribution in Visual Studio

Project description

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.

Installation

pip install vspacker

Usage

See the example below for a simple implementation. For more detail see examples.

Python Implementation

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"),
            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()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

VSPacker-0.0.6.tar.gz (8.3 kB view hashes)

Uploaded Source

Built Distribution

VSPacker-0.0.6-py3-none-any.whl (9.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page