Mercurial > repos > shellac > sam_consensus_v3
comparison env/lib/python3.9/site-packages/virtualenv/seed/seeder.py @ 0:4f3585e2f14b draft default tip
"planemo upload commit 60cee0fc7c0cda8592644e1aad72851dec82c959"
| author | shellac |
|---|---|
| date | Mon, 22 Mar 2021 18:12:50 +0000 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:4f3585e2f14b |
|---|---|
| 1 from __future__ import absolute_import, unicode_literals | |
| 2 | |
| 3 from abc import ABCMeta, abstractmethod | |
| 4 | |
| 5 from six import add_metaclass | |
| 6 | |
| 7 | |
| 8 @add_metaclass(ABCMeta) | |
| 9 class Seeder(object): | |
| 10 """A seeder will install some seed packages into a virtual environment.""" | |
| 11 | |
| 12 # noinspection PyUnusedLocal | |
| 13 def __init__(self, options, enabled): | |
| 14 """ | |
| 15 | |
| 16 :param options: the parsed options as defined within :meth:`add_parser_arguments` | |
| 17 :param enabled: a flag weather the seeder is enabled or not | |
| 18 """ | |
| 19 self.enabled = enabled | |
| 20 self.env = options.env | |
| 21 | |
| 22 @classmethod | |
| 23 def add_parser_arguments(cls, parser, interpreter, app_data): | |
| 24 """ | |
| 25 Add CLI arguments for this seed mechanisms. | |
| 26 | |
| 27 :param parser: the CLI parser | |
| 28 :param app_data: the CLI parser | |
| 29 :param interpreter: the interpreter this virtual environment is based of | |
| 30 """ | |
| 31 raise NotImplementedError | |
| 32 | |
| 33 @abstractmethod | |
| 34 def run(self, creator): | |
| 35 """Perform the seed operation. | |
| 36 | |
| 37 :param creator: the creator (based of :class:`virtualenv.create.creator.Creator`) we used to create this \ | |
| 38 virtual environment | |
| 39 """ | |
| 40 raise NotImplementedError |
