Re: Installing via pip under Win7 + virtualenv + VC++2008

From: Stephen Lacy <slacy(at)slacy(dot)com>
To: Daniele Varrazzo <daniele(dot)varrazzo(at)gmail(dot)com>
Cc: psycopg(at)postgresql(dot)org
Subject: Re: Installing via pip under Win7 + virtualenv + VC++2008
Date: 2011-06-03 17:57:10
Message-ID: BANLkTimybwmiqLOou824AVAv__PbTK5HHA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: psycopg

Great, thanks. I'm doing this now, and may just loop in jericso via github.
I suppose the recommended way of submitting a patch is to clone jericso's
psycopg2 repo on github and submit a pull request?

Steve

On Fri, Jun 3, 2011 at 10:54 AM, Daniele Varrazzo <
daniele(dot)varrazzo(at)gmail(dot)com> wrote:

> On Fri, Jun 3, 2011 at 5:50 PM, Stephen Lacy <slacy(at)slacy(dot)com> wrote:
> > Yeah, I went down this track as well. And in short, here's where I am:
> >
> > I didn't have C:\...\PostgreSQL\8.4\bin on my path.
> > So, after building my env and installing, I added it to my path. "import
> > psycopg2" worked, which was good.
> > But then, as a sanity check, I nuked the env and am now trying to rebuild
> > it. "pip install psycopg" is currently failing with "Error: pg_config
> > executable not found" even though I've got it on my path and can run it
> > directly from the commandline. Even more odd is how "pip install
> psycopg2"
> > works *without* PostgreSQL in my path, but *fails* if I have it in.
> Very,
> > very confusing. :)
> > Here's the output from "pip install psycopg2" when I have PostgreSQL in
> my
> > path.
> [...]
>
> I have the feeling (and not only from this post) that pip makes a bit
> of a mess with psycopg. It is another whole layer of magic that can
> fail: could you please test without it? "python setup.py build_ext"
> should be sufficient to reproduce all the problems.
>
> Apart from that, the function autodetect_pg_config_path_windows() in
> setup.py looks _really_ messy... After looking at that function, I
> don't have the heart to blame pip anymore!
>
> Unfortunately, while I can't believe it takes a whopping 76 lines of
> python to find where pg_config is, I don't have a windows installation
> to test with. I would just place a breakpoint and follow step by step
> what it does, and where it fails.
>
> It may be time of course to clean up some of the crusts setup.py has
> accumulated in 10-odds years: many "features" are there to deal with
> conditions we don't meet anymore (e.g. we now require pg_config and
> refuse guesswork, there are still checks for python < 2.4 etc).
>
> -- Daniele
>

In response to

Responses

Browse psycopg by date

  From Date Subject
Next Message Daniele Varrazzo 2011-06-03 18:18:49 Re: Installing via pip under Win7 + virtualenv + VC++2008
Previous Message Daniele Varrazzo 2011-06-03 17:54:27 Re: Installing via pip under Win7 + virtualenv + VC++2008