Skip to content

Commit

Permalink
Merge pull request #55 from JensTimmerman/master
Browse files Browse the repository at this point in the history
fix for TypeError: dist must be a Distribution instance
  • Loading branch information
stdweird authored Sep 12, 2016
2 parents b6155a7 + fc08ccd commit a9fd7a2
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
8 changes: 8 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
node {
stage 'checkout git'
checkout scm
stage 'test'
sh "python setup.py test || true"
stage 'mailing results'
emailext attachLog: true, body: 'See ${env.BUILD_URL}', recipientProviders: [[$class: 'CulpritsRecipientProvider']], subject: '"Jenkins Test has finished with ${currentBuild.result}"'
}
14 changes: 9 additions & 5 deletions lib/vsc/install/shared_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
from setuptools import Command
from setuptools.command.test import test as TestCommand
from setuptools.command.test import ScanningLoader
from setuptools import setup
from setuptools.command.bdist_rpm import bdist_rpm as orig_bdist_rpm
from setuptools.command.build_py import build_py
from setuptools.command.egg_info import egg_info
Expand Down Expand Up @@ -147,7 +146,7 @@ def _log(self, level, msg, args):

RELOAD_VSC_MODS = False

VERSION = '0.10.14'
VERSION = '0.10.15'

log.info('This is (based on) vsc.install.shared_setup %s' % VERSION)

Expand Down Expand Up @@ -712,7 +711,7 @@ class VscScanningLoader(ScanningLoader):

TEST_LOADER_MODULE = __name__

def loadTestsFromModule(self, module, pattern=None):
def loadTestsFromModule(self, module, pattern=None): # pylint: disable=arguments-differ
"""
Support test module and function name based filtering
"""
Expand Down Expand Up @@ -1122,7 +1121,7 @@ def run(self):
'url': '',
'dependency_links': [],
'install_requires': [],
'tests_require': ['nose', 'mock'],
'tests_require': [],
'setup_requires': [],
}

Expand Down Expand Up @@ -1395,12 +1394,17 @@ def prepare_rpm(self, target):
_fvs('prepare_rpm').SHARED_TARGET['packages'] = self.generate_packages()
self.build_setup_cfg_for_bdist_rpm(target)

def action_target(self, target, setupfn=setup, extra_sdist=None, urltemplate=None):
def action_target(self, target, setupfn=None, extra_sdist=None, urltemplate=None):
"""
Additional target attributes
makesetupcfg: boolean, default True, to generate the setup.cfg (set to False if a manual setup.cfg is provided)
provides: list of rpm provides for setup.cfg
"""
if setupfn is None:
# late import, so were don't accidentally use the distutils setup
# see https://github.com/pypa/setuptools/issues/73
from setuptools import setup # pylint: disable=wrong-import-possition
setupfn = setup
if not extra_sdist:
extra_sdist = []
do_cleanup = True
Expand Down

0 comments on commit a9fd7a2

Please sign in to comment.