-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathbuild.sh
executable file
·47 lines (40 loc) · 995 Bytes
/
build.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
#!/bin/bash
# Script to build the self-bootstraping, indexable enstaller egg.
# The resulting egg is executable, but only on systems which have
# bash installed.
# Build notes:
# * setuptools needs to be installed to run this script
VER=4.5.1
SPEC=enstaller.egg-info/spec
mkdir -p $SPEC
sed -e "s/_VER_/$VER/" <<EOF >$SPEC/depend
metadata_version = '1.1'
name = 'enstaller'
version = '_VER_'
build = 1
arch = None
platform = None
osdist = None
python = None
packages = []
EOF
sed -e "s/_VER_/$VER/" <<EOF >enstaller.egg-info/info.json
{
"build": 1,
"name": "enstaller",
"version": "_VER_"
}
EOF
EGG=dist/enstaller-$VER-1.egg
rm -rf build dist
python setup.py bdist_egg
cat <<EOF >tmp.sh
#!/bin/bash
python -c "import sys, os; sys.path.insert(0, os.path.abspath('\$0')); from egginst.bootstrap import cli; cli()" "\$@"
exit 0
EOF
cat tmp.sh dist/enstaller-*-py*.egg >$EGG
rm -f tmp.sh dist/enstaller-*-py*.egg
chmod +x $EGG
egginfo --sd $EGG
#repo-upload --force --no-confirm $EGG