Skip to content

Advice for seeder plugin #2245

Answered by gaborbernat
ofek asked this question in Q&A
Oct 13, 2020 · 8 comments · 1 reply
Discussion options

You must be logged in to vote

cc @gaborbernat do you have any recommendations?

So my original idea was that in this case, you could extend your code from an existing seeder, and then you can do it at the end of the run method:

from virtualenv.seed.embed.via_app_data.via_app_data import FromAppData

class CustomSeeder(FromAppData):
    def run(self, creator):
        super().run()
        subprocess.run([self.exe, '-m', 'pip', 'install', 'magic'])
# setup.cfg

virtualenv.seed =
  custom = virtualenv_plugin.CustomSeeder

One thing that's not really solved, though, is how you enable this seeder. The user would have to opt-in to use it explicitly via config/CLI args. Of course, you can always use monkey patch the default…

Replies: 8 comments 1 reply

Comment options

ofek
Nov 7, 2020
Author Sponsor

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

ofek
Nov 10, 2020
Author Sponsor

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@studioj
Comment options

Answer selected by gaborbernat
Comment options

ofek
Nov 10, 2020
Author Sponsor

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
4 participants
Converted from issue

This discussion was converted from issue #1980 on December 09, 2021 16:21.