-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpypi.bat
55 lines (43 loc) · 958 Bytes
/
pypi.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
53
54
@echo off
if defined HOME set temp_home=%HOME%
set HOME=%USERPROFILE%
if [%1]==[] goto nocommand
if %1==register goto get_target
if %1==upload goto get_target
goto nocommand
:end
if defined temp_home (set HOME=%temp_home%) else (set HOME=)
exit /b
:get_target
if [%2]==[] (goto notarget) else (goto %1)
:nocommand
echo .
echo Valid commands are
echo register
echo upload
echo .
echo Examples:
echo pypi.bat register test
echo pypi.bat register pypi
echo pypi.bat upload test
echo pypi.bat upload pypi
goto end
:notarget
echo You must specify a target (check .pypirc)
echo .
echo Examples:
echo pypi.bat register test
echo pypi.bat register pypi
echo pypi.bat upload test
echo pypi.bat upload pypi
goto end
:upload
rmdir /S /Q dist
rmdir /S /Q build
rmdir /S /Q friendlysam.egg-info
python setup.py sdist bdist_wheel bdist_wininst
twine upload --repository %2 dist/*
goto end
:register
python setup.py register -r %2
goto end