-
-
Notifications
You must be signed in to change notification settings - Fork 1k
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Advice for seeder plugin #1980
Comments
Bump 🙂 Does anyone have an example of this? |
Ah forgot about this, can you ping me again on Monday? 😁And I'll have a look and path forward. |
Ping! |
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 here
|
Thanks! If I ship the wheel, is there a way to add it to the list of embedded wheels so it automatically gets installed? I tried |
You can extend the list of packages to install under https://github.com/pypa/virtualenv/blob/main/src/virtualenv/seed/embed/base_embed.py#L38. You might need to patch the embed file list under https://github.com/pypa/virtualenv/blob/main/src/virtualenv/seed/wheels/embed/__init__.py#L7 to get picked up. Tag me as a reviewer if you can, so can double-check how you do it looks good. |
Hey guys! I also need this, I need a certain package ( It seems that you guys are talking exactly about this, aren't you? Do you know how to configure virtualenv, so that it does what I need? Thank you! |
I don't think that plugin has been created, so you'd likely need to do so 👍 |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
I've read the docs & source code of the built-in seeders but I can't quite figure out what to do.
Essentially, all I need is to install a certain package/wheel when each virtual environment is created.
cc @gaborbernat do you have any recommendations?
The text was updated successfully, but these errors were encountered: