forked from cdfarrow/flextools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
make.bat
52 lines (40 loc) · 1.19 KB
/
make.bat
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
@ECHO OFF
REM Simple build commands for flextools
REM Build with the default Python version
set PYTHON=py
REM Check that the argument is a valid command, and do it. /I ignores case.
FOR %%C IN ("Init"
"Clean"
"Build"
"Publish") DO (
IF /I "%1"=="%%~C" GOTO :Do%1
)
:Usage
echo Usage:
echo make init - Install the libraries for building
echo make clean - Clean out build files
echo make build - Build the project
echo make publish - Publish the project to PyPI
goto :End
:DoInit
%PYTHON% -m pip install -r requirements-dev.txt
goto :End
:DoClean
rmdir /s /q ".\build"
rmdir /s /q ".\dist"
goto :End
:DoBuild
@REM Build the wheel for flextoolslib with setuptools
%PYTHON% -m build -w
@REM Build the main FlexTools zip file
%PYTHON% makezip.py
@REM Check for package errors
%PYTHON% -m twine check .\dist\flextoolslib*
echo The distribution files are in dist\:
dir dist /b
goto :End
:DoPublish
echo Publishing flextoolslib to PyPI
%PYTHON% -m twine upload .\dist\flextoolslib*
goto :End
:End