Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #78893 > unrolled thread

Re: virtualenv question: include just a few site packages

Started byJean-Michel Pichavant <jeanmichel@sequans.com>
First post2014-10-09 15:19 +0200
Last post2014-10-09 15:19 +0200
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python


Contents

  Re: virtualenv question: include just a few site packages Jean-Michel Pichavant <jeanmichel@sequans.com> - 2014-10-09 15:19 +0200

#78893 — Re: virtualenv question: include just a few site packages

FromJean-Michel Pichavant <jeanmichel@sequans.com>
Date2014-10-09 15:19 +0200
SubjectRe: virtualenv question: include just a few site packages
Message-ID<mailman.14715.1412860771.18130.python-list@python.org>
----- Original Message -----
> From: "Gelonida N" <gelonida@gmail.com>
> To: python-list@python.org
> Sent: Thursday, 9 October, 2014 12:09:50 AM
> Subject: virtualenv question: include just a few site packages
> 
> virtualenv has the switch
> --system-site-packages (including all system site pacgaes)
> and the switch
> --no-site-packages (to expclude all site packages)
> 
> 
> Does anyone know an easy way to include just a few site-packages?
> for example (PySide, but not PyQt)
> 
> The reason I'm asking is following.
> Some site packages  are sometimes raher huge or sometimes refuse to
> compile on certain hosts.
> 
> as these packages are already part of the site packages I'd like to
> include them.
> 
> You might wonder why I care whether I have more site packages than I
> need. As long as I don't import them,  I shouldn't care about it.
> If I really wanted to replace a version I could use pip install -U.
> 
> However sometimes I'd like to have a test environment where want to
> be
> sure, that no module can find certain other modules. so they should
> not
> be visible.
> 
> at the moment I make some experiments with pyinstaller and the module
> pythonqtbindings. and there I'd like to be sure that no PuQt files
> end
> up in the generated code.
> 
> 
> The only idea, that I have so far is to
> run virutalanv with --system-side-packages and to manually remove
> modules I don't want or to
> run virtualenv without this switch and to manually add links for site
> packages, taht I want. both options don't really feel right for me.
> 
> 
> Is there any other way?

You could build a virtual machine, installing only your VIP modules, and create virtual environment on this virtual machine, using the system site packages.

JM


-- IMPORTANT NOTICE: 

The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web