Skip to content

Commit 37ec2a8

Browse files
committed
completely ruined
1 parent 7e3709b commit 37ec2a8

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

src/build.py

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python2.7
22

3-
from os.path import basename, dirname, join, isfile, realpath, relpath, split
3+
from os.path import dirname, join, isfile, realpath, relpath, split
44
from zipfile import ZipFile
55
import sys
66
sys.path.insert(0, 'buildlib/jinja2.egg')
@@ -164,17 +164,7 @@ def select(fn):
164164
for sd in source_dirs:
165165
sd = realpath(sd)
166166
compile_dir(sd)
167-
for x in listdir(sd):
168-
if select(x):
169-
# symbolic links should go in the archive by the name of the link, not the name of what they point to
170-
try:
171-
realbase = os.readlink(x)
172-
linkbase = basename(x)
173-
realp = realpath(x).replace(realbase, linkbase)
174-
nufile = (x, relpath(realp, sd))
175-
except OSError:
176-
nufile = (x, relpath(realpath(x), sd))
177-
files.append(nufile)
167+
files += [(x, relpath(realpath(x), sd)) for x in listfiles(sd) if select(x)]
178168

179169
# create tar.gz of thoses files
180170
tf = tarfile.open(tfn, 'w:gz')

0 commit comments

Comments
 (0)