File: build_dist.bat

package info (click to toggle)
datalab 1.1.0-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 36,508 kB
  • sloc: python: 32,066; makefile: 4
file content (40 lines) | stat: -rw-r--r-- 1,317 bytes parent folder | download | duplicates (2)
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
@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 DATALAB_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%
@REM Compile translations
%PYTHON% -m guidata.utils.translations compile --name datalab --directory .
@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\*.whl %REPODIR%\dist
copy %CLONEDIR%\dist\*.tar.gz %REPODIR%\dist

rmdir /s /q %CLONEDIR%
call %FUNC% EndOfScript