1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-11-04 14:30:11 +01:00

Merge branch 'master' into 'master'

build and test fixes

various fixes for the build process and tests
This commit is contained in:
Ciaran Gultnieks 2014-04-03 16:51:15 +00:00
commit 9ccdd209ac
3 changed files with 47 additions and 9 deletions

View File

@ -0,0 +1,39 @@
#
# started from http://www.logilab.org/blogentry/78354
#
from logilab.astng import MANAGER
from logilab.astng.builder import ASTNGBuilder
def hashlib_transform(module):
if module.name == 'hashlib':
fake = ASTNGBuilder(MANAGER).string_build('''
class fakehash(object):
digest_size = -1
def __init__(self, value): pass
def digest(self):
return u''
def hexdigest(self):
return u''
def update(self, value): pass
class md5(fakehash):
pass
class sha1(fakehash):
pass
class sha256(fakehash):
pass
''')
for hashfunc in ('sha256', 'sha1', 'md5'):
module.locals[hashfunc] = fake.locals[hashfunc]
def register(linter):
"""called when loaded by pylint --load-plugins, register our tranformation
function here
"""
MANAGER.register_transformer(hashlib_transform)

View File

@ -72,17 +72,17 @@ pyflakes fdroid makebuildserver fdroidserver/*.py setup.py
cd $WORKSPACE
set +e
# disable E1101 until there is a plugin to handle this properly:
# Module 'sys' has no '_MEIPASS' member
# disable F0401 until there is a plugin to handle this properly:
# keysync-gui:25: [F] Unable to import 'ordereddict'
# use the virtualenv python so pylint checks against its installed libs
python /usr/bin/pylint --output-format=parseable --reports=n \
fdroidserver/*.py fdroid makebuildserver setup.py > $WORKSPACE/pylint.parseable
PYTHONPATH=$WORKSPACE/.pylint-plugins python /usr/bin/pylint \
--output-format=parseable --reports=n \
--load-plugins astng_hashlib \
fdroidserver/*.py fdroid makebuildserver setup.py > $WORKSPACE/pylint.parseable
# to only tell jenkins there was an error if we got ERROR or FATAL, uncomment these:
# running pylint in the virtualenv is causing this FATAL error, which is a bug:
# https://bitbucket.org/logilab/pylint/issue/73/pylint-is-unable-to-import
[ $(($? & 1)) = "1" ] && echo "FATALs found"
[ $(($? & 2)) = "2" ] && echo "ERRORs found"
[ $(($? & 4)) = "4" ] && echo "WARNINGs found"
[ $(($? & 2)) = "2" ] && exit 2
[ $(($? & 4)) = "4" ] && exit 4
set -e

View File

@ -31,7 +31,6 @@ setup(name='fdroidserver',
'paramiko',
'PIL',
'python-magic',
'ssh',
],
classifiers=[
'Development Status :: 3 - Alpha',