forked from Azure/azure-iot-sdk-python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild_packages.py
20 lines (18 loc) · 907 Bytes
/
build_packages.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------
"""Build all packages for distribution"""
import glob
import os
import sys
from subprocess import check_call
if __name__ == "__main__":
target_dir = "../dist"
packages = [os.path.dirname(p) for p in glob.glob("azure*/setup.py")]
for package_name in packages:
command_sdist = "setup.py sdist --dist-dir={}".format(target_dir)
command_bdist_wheel = "setup.py bdist_wheel --dist-dir={}".format(target_dir)
check_call([sys.executable] + command_sdist.split(), cwd=package_name)
check_call([sys.executable] + command_bdist_wheel.split(), cwd=package_name)