File: run_build.py

package info (click to toggle)
python-pysnmp4 7.1.21-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 3,564 kB
  • sloc: python: 33,654; makefile: 166; javascript: 4
file content (29 lines) | stat: -rwxr-xr-x 633 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/usr/bin/env python3
"""
Script to build Python packages for pysmi.
Equivalent to Build-Packages.ps1
"""

import os
import shutil
import subprocess


def main():
    """Main function to build packages."""
    # Check if the dist directory exists and remove it
    if os.path.isdir("dist"):
        print("Removing existing dist directory...")
        shutil.rmtree("dist")
    else:
        print("dist directory not found. Skipping removal.")

    # Build the packages
    print("Building packages...")
    subprocess.run(["uv", "build"], check=True)

    print("Build process completed.")


if __name__ == "__main__":
    main()