do not assume that modules with setup.py are packaged with python jobs

Back in a5e6f88e1 we made the assumption that repos containing puppet
and node.js modules that also have a setup.py were packaged as python
projects. That is not a valid assumption, so remove it. Projects can now
explicitly select between the packaging type.

Change-Id: Ie98b7677d07acdfaebf3fa725a481491101922eb
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
Doug Hellmann 2017-10-24 10:14:33 -04:00
parent 4b66723dd5
commit dbb7a4bcc6
4 changed files with 0 additions and 33 deletions

View File

@ -18,8 +18,6 @@ import os.path
def looks_like_a_module(workdir, repo):
"Does the directory look like it contains an npm module?"
if os.path.exists(os.path.join(workdir, repo, 'setup.py')):
return False
return os.path.exists(os.path.join(workdir, repo, 'package.json'))

View File

@ -18,8 +18,6 @@ import os.path
def looks_like_a_module(workdir, repo):
"Does the directory look like it contains a puppet module?"
if os.path.exists(os.path.join(workdir, repo, 'setup.py')):
return False
if not os.path.exists(os.path.join(workdir, repo, 'metadata.json')):
return False
return any([

View File

@ -48,19 +48,6 @@ class TestModuleDetection(base.BaseTestCase):
'.', 'openstack/monasca-kibana-plugin')
self.assertTrue(is_mod)
def test_actually_python(self):
def exists(name):
if name.endswith('package.json'):
return True
if name.endswith('setup.py'):
return True
with mock.patch('os.path.exists', exists):
is_mod = npmutils.looks_like_a_module(
'.', 'openstack/monasca-kibana-plugin')
self.assertFalse(is_mod)
class TestGetMetadata(base.BaseTestCase):

View File

@ -77,22 +77,6 @@ class TestModuleDetection(base.BaseTestCase):
'.', 'openstack/puppet-watcher')
self.assertTrue(is_mod)
def test_actually_python(self):
def exists(name):
if name.endswith('setup.py'):
return True
if name.endswith('metadata.json'):
return True
if name.endswith('manifests'):
return True
return False
with mock.patch('os.path.exists', exists):
is_mod = puppetutils.looks_like_a_module(
'.', 'openstack/puppet-watcher')
self.assertFalse(is_mod)
class TestGetMetadata(base.BaseTestCase):