Commit 80d39938 by Sébastien Eustace

Fix skipped packages appearing as being installed

parent 7ae7e2b7
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
- Fixed handling of post releases. - Fixed handling of post releases.
- Fixed python restricted dependencies not being checked agaisnt virtualenv version. - Fixed python restricted dependencies not being checked agaisnt virtualenv version.
- Fixed python/platform constraint not being picked up for subdependencies. - Fixed python/platform constraint not being picked up for subdependencies.
- Fixed skipped packages appearing as installing.
## [0.4.2] - 2018-03-10 ## [0.4.2] - 2018-03-10
......
...@@ -35,5 +35,6 @@ exist it will look for <comment>poetry.toml</> and do the same. ...@@ -35,5 +35,6 @@ exist it will look for <comment>poetry.toml</> and do the same.
installer.extras(self.option('extras')) installer.extras(self.option('extras'))
installer.dev_mode(not self.option('no-dev')) installer.dev_mode(not self.option('no-dev'))
installer.dry_run(self.option('dry-run')) installer.dry_run(self.option('dry-run'))
installer.verbose(self.option('verbose'))
return installer.run() return installer.run()
...@@ -201,7 +201,12 @@ class Installer: ...@@ -201,7 +201,12 @@ class Installer:
installs = [] installs = []
updates = [] updates = []
uninstalls = [] uninstalls = []
skipped = []
for op in ops: for op in ops:
if op.skipped:
skipped.append(op)
continue
if op.job_type == 'install': if op.job_type == 'install':
installs.append( installs.append(
f'{op.package.pretty_name}' f'{op.package.pretty_name}'
...@@ -223,7 +228,7 @@ class Installer: ...@@ -223,7 +228,7 @@ class Installer:
f'<info>{len(installs)}</> install{"" if len(installs) == 1 else "s"}, ' f'<info>{len(installs)}</> install{"" if len(installs) == 1 else "s"}, '
f'<info>{len(updates)}</> update{"" if len(updates) == 1 else "s"}, ' f'<info>{len(updates)}</> update{"" if len(updates) == 1 else "s"}, '
f'<info>{len(uninstalls)}</> removal{"" if len(uninstalls) == 1 else "s"}' f'<info>{len(uninstalls)}</> removal{"" if len(uninstalls) == 1 else "s"}'
f'' f'{", <info>{}</> skipped".format(len(skipped)) if skipped and self.is_verbose() else ""}'
) )
self._io.new_line() self._io.new_line()
...@@ -251,7 +256,7 @@ class Installer: ...@@ -251,7 +256,7 @@ class Installer:
def _execute_install(self, operation: Install) -> None: def _execute_install(self, operation: Install) -> None:
if operation.skipped: if operation.skipped:
if self._io.is_verbose() and (self._execute_operations or self.is_dry_run()): if self.is_verbose() and (self._execute_operations or self.is_dry_run()):
self._io.writeln( self._io.writeln(
f' - Skipping <info>{operation.package.pretty_name}</> ' f' - Skipping <info>{operation.package.pretty_name}</> '
f'(<comment>{operation.package.full_pretty_version}</>) ' f'(<comment>{operation.package.full_pretty_version}</>) '
...@@ -275,7 +280,7 @@ class Installer: ...@@ -275,7 +280,7 @@ class Installer:
target = operation.target_package target = operation.target_package
if operation.skipped: if operation.skipped:
if self._io.is_verbose() and (self._execute_operations or self.is_dry_run()): if self.is_verbose() and (self._execute_operations or self.is_dry_run()):
self._io.writeln( self._io.writeln(
f' - Skipping <info>{target.pretty_name}</> ' f' - Skipping <info>{target.pretty_name}</> '
f'(<comment>{target.full_pretty_version}</>) ' f'(<comment>{target.full_pretty_version}</>) '
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment