forked from dashingsoft/pyarmor
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build-package.sh
executable file
·59 lines (50 loc) · 1.41 KB
/
build-package.sh
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
55
56
57
58
59
#! /bin/sh
#
# Build source and wheel distribute
#
PLATFORMS="win32 win_amd64 manylinux1_x86_64 macosx_10_11_x86_64 macosx_10_11_intel"
PYTHON=C:/Python34/python
test -f $PYTHON || PYTHON=python
clear_build()
{
echo Remove build files: pyarmor.egg-info build src/__pycache__
rm -rf pyarmor.egg-info build src/__pycache__
}
clear_platform_files()
{
echo Remove platforms files
rm -rf src/platforms/windows32 src/platforms/windows64
rm -rf src/platforms/linux32 src/platforms/linux64
rm -rf src/platforms/darwin64
}
make_platform_files()
{
(cd src/platforms;
cp -a win32 windows32;
cp -a win_amd64 windows64;
cp -a linux_i386 linux32;
cp -a linux_x86_64 linux64;
cp -a macosx_x86_64 darwin64;
)
}
# Make platform files
make_platform_files
# Build source
$PYTHON setup.py sdist --formats=zip,bztar,gztar
clear_build
# Build universal wheel
$PYTHON setup.py bdist_wheel --universal
clear_build
clear_platform_files
# Build binary wheel
# for plat in $PLATFORMS ; do
# name=$plat
# [[ "$plat" == "manylinux1_x86_64" ]] && name="linux_x86_64"
# [[ "$plat" == "macosx_10_11_intel" ]] && name="macosx_x86_64"
# [[ "$plat" == "macosx_10_11_x86_64" ]] && name="macosx_x86_64"
# cp src/platforms/$name/_pytransform.* src/
#
# $PYTHON setup.py bdist_wheel --python-tag=py2.py3 --plat-name=$plat
# clear_build
# rm -rf src/_pytransform.*
# done