master
/ miniconda3 / lib / python3.11 / site-packages / conda_package_handling / interface.py

interface.py @74036c5 raw · history · blame

import abc
import os


class AbstractBaseFormat(metaclass=abc.ABCMeta):
    @staticmethod
    @abc.abstractmethod
    def supported(fn):  # pragma: no cover
        return False

    @staticmethod
    @abc.abstractmethod
    def extract(fn, dest_dir, **kw):  # pragma: no cover
        raise NotImplementedError

    @staticmethod
    @abc.abstractmethod
    def create(prefix, file_list, out_fn, out_folder=os.getcwd(), **kw):  # pragma: no cover
        raise NotImplementedError

    @staticmethod
    @abc.abstractmethod
    def get_pkg_details(in_file):  # pragma: no cover
        raise NotImplementedError