Skip to main content

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

Metadata

Release files for VSPacker 0.0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for VSPacker 0.0.7
File Size Uploaded
VSPacker-0.0.7.tar.gz 8.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for VSPacker 0.0.7
File Interpreter ABI Platform
VSPacker-0.0.7-py3-none-any.whl Python 3 none any Details

Total release size: 17.5 kB

Release files / VSPacker-0.0.7.tar.gz

Download URL VSPacker-0.0.7.tar.gz
Size 8.1 kB
Tags Source
SHA-256 checksum
How to use checksums
2a131bf381af8d5c9971329fe5d6fa5e7f7bacf0d3fd4ebcac9ce9c1fab8c43d
BLAKE2b-256 checksum
How to use checksums
e1ce3aa654cd3ff39ee7323cb55ca2dec0b1b1c15b53fddc74af785966f86a73
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.10.11

Release files / VSPacker-0.0.7-py3-none-any.whl

Download URL VSPacker-0.0.7-py3-none-any.whl
Size 9.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6be67fa32394d795b27687c4e71758534efac17c99e01fb4c25cdbf31f8667a3
BLAKE2b-256 checksum
How to use checksums
d36e7e310b83f9b0b9b94dc3f13ae320440ca00fc3b7be895a17f91baea0c855
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.10.11

Release history Release notifications | RSS feed

This release

0.0.7 This release

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page