-
Notifications
You must be signed in to change notification settings - Fork 249
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from Microsoft/users/tedchamb/initial
add sdist
- Loading branch information
Showing
6 changed files
with
52 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# -------------------------------------------------------------------------------------------- | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. See License.txt in the project root for license information. | ||
# -------------------------------------------------------------------------------------------- | ||
|
||
from __future__ import print_function | ||
|
||
import sys | ||
import glob | ||
import os | ||
from subprocess import check_call, CalledProcessError | ||
|
||
root_dir = os.path.abspath(os.path.join(os.path.abspath(__file__), '..', '..')) | ||
os.chdir(root_dir) | ||
|
||
def exec_command(command, cwd): | ||
try: | ||
print('CWD: ' + cwd) | ||
print('Executing: ' + command) | ||
check_call(command.split(), cwd=cwd) | ||
print() | ||
except CalledProcessError as err: | ||
print(err, file=sys.stderr) | ||
sys.exit(1) | ||
|
||
setup_files = glob.glob('src/*/setup.py') | ||
setup_files.extend(glob.glob('src/*/*/setup.py')) | ||
|
||
# sdist packages | ||
for file in setup_files: | ||
exec_command('python setup.py sdist', os.path.dirname(file)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
@REM init section. Set _echo=1 to echo everything | ||
@IF NOT DEFINED _echo ECHO OFF | ||
|
||
IF EXIST "%BUILD_BINARIESDIRECTORY%\python.3.6.2\tools\python.exe" ( | ||
REM Build step installs Python here. | ||
SET PYTHONEXE=%BUILD_BINARIESDIRECTORY%\python.3.6.2\tools\python.exe | ||
) ELSE ( | ||
SET PYTHONEXE=python.exe | ||
) | ||
|
||
"%PYTHONEXE%" %~dp0\..\sdist.py | ||
IF ERRORLEVEL 1 GOTO FAIL | ||
|
||
SET PYTHONEXE= | ||
|
||
GOTO :EOF | ||
|
||
:FAIL | ||
ECHO sdist failed. | ||
EXIT /B 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
[bdist_wheel] | ||
universal=1 | ||
|