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

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.7.tar.gz (8.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

VSPacker-0.0.7-py3-none-any.whl (9.4 kB view details)

Uploaded Python 3

File details

Details for the file VSPacker-0.0.7.tar.gz.

File metadata

  • Download URL: VSPacker-0.0.7.tar.gz
  • Upload date:
  • Size: 8.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.11

File hashes

Hashes for VSPacker-0.0.7.tar.gz
Algorithm Hash digest
SHA256 2a131bf381af8d5c9971329fe5d6fa5e7f7bacf0d3fd4ebcac9ce9c1fab8c43d
MD5 5ab1c00f4b661e66f93b641592f9d1d6
BLAKE2b-256 e1ce3aa654cd3ff39ee7323cb55ca2dec0b1b1c15b53fddc74af785966f86a73

See more details on using hashes here.

File details

Details for the file VSPacker-0.0.7-py3-none-any.whl.

File metadata

  • Download URL: VSPacker-0.0.7-py3-none-any.whl
  • Upload date:
  • Size: 9.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.11

File hashes

Hashes for VSPacker-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 6be67fa32394d795b27687c4e71758534efac17c99e01fb4c25cdbf31f8667a3
MD5 d570d8b008a617eefaa9c62ba420ef2c
BLAKE2b-256 d36e7e310b83f9b0b9b94dc3f13ae320440ca00fc3b7be895a17f91baea0c855

See more details on using hashes here.

Supported by

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