Commit 9ca39b0a by David Hotham Committed by GitHub

remove unused code (#5872)

parent 84b75710
...@@ -20,27 +20,11 @@ if TYPE_CHECKING: ...@@ -20,27 +20,11 @@ if TYPE_CHECKING:
class Chef: class Chef:
def __init__(self, config: Config, env: Env) -> None: def __init__(self, config: Config, env: Env) -> None:
self._config = config
self._env = env self._env = env
self._cache_dir = ( self._cache_dir = (
Path(config.get("cache-dir")).expanduser().joinpath("artifacts") Path(config.get("cache-dir")).expanduser().joinpath("artifacts")
) )
def prepare(self, archive: Path) -> Path:
return archive
def prepare_sdist(self, archive: Path) -> Path:
return archive
def prepare_wheel(self, archive: Path) -> Path:
return archive
def should_prepare(self, archive: Path) -> bool:
return not self.is_wheel(archive)
def is_wheel(self, archive: Path) -> bool:
return archive.suffix == ".whl"
def get_cached_archive_for_link(self, link: Link) -> Link: def get_cached_archive_for_link(self, link: Link) -> Link:
# If the archive is already a wheel, there is no need to cache it. # If the archive is already a wheel, there is no need to cache it.
if link.is_wheel: if link.is_wheel:
......
...@@ -515,8 +515,6 @@ class Executor: ...@@ -515,8 +515,6 @@ class Executor:
if not Path(package.source_url).is_absolute() and package.root_dir: if not Path(package.source_url).is_absolute() and package.root_dir:
archive = package.root_dir / archive archive = package.root_dir / archive
archive = self._chef.prepare(archive)
return archive return archive
def _install_directory(self, operation: Install | Update) -> int: def _install_directory(self, operation: Install | Update) -> int:
...@@ -632,11 +630,6 @@ class Executor: ...@@ -632,11 +630,6 @@ class Executor:
raise raise
# TODO: Check readability of the created archive
if not link.is_wheel:
archive = self._chef.prepare(archive)
if package.files: if package.files:
archive_hash = self._validate_archive_hash(archive, package) archive_hash = self._validate_archive_hash(archive, package)
......
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