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

Поиск
Список
Период
Сортировка
От Stephen Lacy
Тема Re: Installing via pip under Win7 + virtualenv + VC++2008
Дата
Msg-id BANLkTimybwmiqLOou824AVAv__PbTK5HHA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Installing via pip under Win7 + virtualenv + VC++2008  (Daniele Varrazzo <daniele.varrazzo@gmail.com>)
Ответы Re: Installing via pip under Win7 + virtualenv + VC++2008  (Daniele Varrazzo <daniele.varrazzo@gmail.com>)
Список 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.varrazzo@gmail.com> wrote:
On Fri, Jun 3, 2011 at 5:50 PM, Stephen Lacy <slacy@slacy.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

В списке psycopg по дате отправления:

Предыдущее
От: Daniele Varrazzo
Дата:
Сообщение: Re: Installing via pip under Win7 + virtualenv + VC++2008
Следующее
От: Daniele Varrazzo
Дата:
Сообщение: Re: Installing via pip under Win7 + virtualenv + VC++2008