Skip to content

Commit 5773285

Browse files
committed
Added batch script to build and upload package
1 parent 0930f6a commit 5773285

File tree

3 files changed

+44
-2
lines changed

3 files changed

+44
-2
lines changed

build_and_upload.bat

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
@echo off
2+
set UNATTENDED=1
3+
call build_doc.bat
4+
call build_dist.bat
5+
@echo:
6+
@echo ==============================================================================
7+
choice /t 5 /c yn /cs /d n /m "Do you want to upload packages to PyPI (y/n)?"
8+
if errorlevel 2 goto :no
9+
if errorlevel 1 goto :yes
10+
:yes
11+
@echo ==============================================================================
12+
@echo:
13+
@echo twine upload dist/*
14+
GOTO :continue
15+
:no
16+
@echo:
17+
@echo Warning: Packages were not uploaded to PyPI
18+
:continue
19+
@echo:
20+
@echo ==============================================================================
21+
@echo:
22+
@echo End of script
23+
pause

build_dist.bat

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,23 @@
1+
@echo off
2+
if defined WINPYDIRBASE (
3+
call %WINPYDIRBASE%\scripts\env.bat
4+
@echo ==============================================================================
5+
@echo:
6+
@echo Using WinPython from %WINPYDIRBASE%
7+
@echo:
8+
@echo ==============================================================================
9+
@echo:
10+
)
111
del MANIFEST
212
rmdir /S /Q build
313
rmdir /S /Q dist
414
set PYTHONPATH=%cd%
515
python setup.py sdist bdist_wheel --universal
6-
python setup.py build sdist
16+
python setup.py build sdist
17+
@echo:
18+
@echo ==============================================================================
19+
@echo:
20+
if not defined UNATTENDED (
21+
@echo End of script
22+
pause
23+
)

run_unattended_tests.bat

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ exit /B %ERRORLEVEL%
1212
:test
1313
set ENV=C:\%~1\scripts\env.bat
1414
if exist %ENV% (
15-
echo ************************** Testing with %~1 **************************
15+
@echo:
16+
@echo ************************** Testing with %~1 **************************
17+
@echo:
1618
call %ENV%
1719
python -m qwt.tests.__init__
1820
)

0 commit comments

Comments
 (0)