File: install_lib.py

package info (click to toggle)
scikit-build 0.18.1-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,792 kB
  • sloc: python: 5,258; cpp: 284; makefile: 171; f90: 12; sh: 7
file content (21 lines) | stat: -rw-r--r-- 786 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
"""This module defines custom implementation of ``install_lib`` setuptools
command."""

from __future__ import annotations

from setuptools.command.install_lib import install_lib as _install_lib

from ..utils import distribution_hide_listing, logger
from . import CommandMixinProtocol, set_build_base_mixin


class install_lib(set_build_base_mixin, _install_lib):
    """Custom implementation of ``install_lib`` setuptools command."""

    def install(self: CommandMixinProtocol) -> list[str]:
        """Handle --hide-listing option."""
        with distribution_hide_listing(self.distribution):
            outfiles: list[str] = super().install()  # type: ignore[misc]
        if outfiles is not None:
            logger.info("copied %d files", len(outfiles))
        return outfiles