[Distutils] Installing a file into sitepackages
Erik Bray
erik.m.bray at gmail.com
Fri Mar 6 19:51:31 CET 2015
On Fri, Feb 20, 2015 at 1:49 PM, Stuart Axon
<stuaxo2 at yahoo.com.dmarc.invalid> wrote:
> Hi,
> In my project, I install a .pth file into site-packages, I use the data_files... in Ubuntu this seems to work OK, but in a Windows VM the file doesn't seem to be being installed:
>
> setup(
> ....
> # Install the import hook
> data_files=[
> (site_packages_path, ["vext_importer.pth"] if environ.get('VIRTUAL_ENV') else []),
> ],
> )
>
>
> - Is there a better way to do this ?
>
>
>
> I realise it's a bit odd installing a .pth - my project is to allow certain packages to use the system site packages from a virtualenv -
> https://github.com/stuaxo/vext
Hi Stuart,
I know this is old so sorry to anyone else. But since no one
replied--I haven't looked too closely at what it is you're trying to
accomplish. But whatever the reason, that seems like a
reasonable-enough way to me if you need to get a .pth file installed
into site-packages. I'm not sure why it isn't working for you in
WIndows but it wasn't clear what the problem was. I just tried this
in a Windows VM and it worked fine?
Best,
Erik
More information about the Distutils-SIG
mailing list