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
|
@echo off
REM This script was copied from PythonQwt project
REM ======================================================
REM Package build script
REM ======================================================
REM Licensed under the terms of the MIT License
REM Copyright (c) 2020 Pierre Raybaut
REM (see PythonQwt LICENSE file for more details)
REM ======================================================
call %~dp0utils GetScriptPath SCRIPTPATH
call %FUNC% GetLibName LIBNAME
call %FUNC% GetModName MODNAME
call %FUNC% SetPythonPath
call %FUNC% UsePython
call %FUNC% GetVersion CDL_VERSION
set REPODIR=%SCRIPTPATH%\..
@REM Clone repository in a temporary directory
set CLONEDIR=%REPODIR%\..\%LIBNAME%-tempdir
if exist %CLONEDIR% ( rmdir /s /q %CLONEDIR% )
git clone -l -s . %CLONEDIR%
pushd %CLONEDIR%
%PYTHON% create_dephash.py
@REM Build source package
%PYTHON% -m build --sdist
@REM Build wheel package with PDF documentation embedded
mkdir %MODNAME%\data\doc
copy %REPODIR%\%MODNAME%\data\doc\*.pdf %MODNAME%\data\doc
%PYTHON% -m build --wheel
popd
if not exist %REPODIR%\dist ( mkdir %REPODIR%\dist )
copy %CLONEDIR%\dist\%MODNAME%-%CDL_VERSION%*.whl %REPODIR%\dist
copy %CLONEDIR%\dist\%MODNAME%-%CDL_VERSION%*.tar.gz %REPODIR%\dist
rmdir /s /q %CLONEDIR%
call %FUNC% EndOfScript
|