Continue working on packaging and make glance client not use venv/tox since we are in a environment that doesn't need that
This commit is contained in:
parent
72d807e06d
commit
1b9dd4fe7f
@ -29,7 +29,7 @@ class PackageAction(action.Action):
|
||||
return 'package'
|
||||
|
||||
def _finish_package(self, component, where):
|
||||
if where:
|
||||
if not where:
|
||||
LOG.info("Unable to create a package template!")
|
||||
else:
|
||||
LOG.info("Package template created at %s", colorizer.quote(where))
|
||||
|
@ -15,7 +15,7 @@
|
||||
# under the License.
|
||||
|
||||
from anvil import components as comp
|
||||
|
||||
from anvil import shell as sh
|
||||
|
||||
class GlanceClientUninstaller(comp.PythonUninstallComponent):
|
||||
pass
|
||||
@ -30,3 +30,11 @@ class GlanceClientInstaller(comp.PythonInstallComponent):
|
||||
|
||||
class GlanceClientRuntime(comp.EmptyRuntime):
|
||||
pass
|
||||
|
||||
|
||||
class GlanceClientTester(comp.PythonTestingComponent):
|
||||
def run_tests(self):
|
||||
# Tox tries to setup a venv, we don't need that...
|
||||
app_dir = self.get_option('app_dir')
|
||||
cmd = ['nosetests']
|
||||
sh.execute(*cmd, stdout_fh=None, stderr_fh=None, cwd=app_dir)
|
||||
|
@ -122,6 +122,10 @@ class Packager(object):
|
||||
LOG.info("Running post-install commands for package %s.", colorizer.quote(pkg['name']))
|
||||
utils.execute_template(*cmds, params=params)
|
||||
|
||||
@abc.abstractmethod
|
||||
def create_package_template(self, component):
|
||||
raise NotImplementedError()
|
||||
|
||||
@abc.abstractmethod
|
||||
def _remove(self, pkg):
|
||||
raise NotImplementedError()
|
||||
|
@ -250,7 +250,7 @@ components:
|
||||
install: anvil.components.glance_client:GlanceClientInstaller
|
||||
running: anvil.components.glance_client:GlanceClientRuntime
|
||||
uninstall: anvil.components.glance_client:GlanceClientUninstaller
|
||||
test: anvil.components:PythonTestingComponent
|
||||
test: anvil.components.glance_client:GlanceClientTester
|
||||
pips:
|
||||
- name: nosexcover
|
||||
- name: setuptools-git
|
||||
|
Loading…
x
Reference in New Issue
Block a user