Re: [Distutils] pip install from source dir??

2015-10-02 Thread Chris Barker
On Fri, Oct 2, 2015 at 3:37 PM, Erik Bray  wrote:

> On Fri, Oct 2, 2015 at 5:39 PM, Donald Stufft  wrote:
> > ``pip install path/to/directory/with/setup.py/in/it/``
>
> In particular I install most of my packages from source these days by
> cd'ing into the source and
>
> $ pip install .
>
> That's all it takes.  Works with -e too.
>

yup -- plugged this into a conda recipe and it works fine.

in fact, I'm going to try to do all of my python recipes that way.

Actually:

$PYTHON -m pip install ./

$PYTHON is the python in conda's current build environment -- this will
assure it used the right pip.

Thanks all, this is working great.

-CHB








> Erik
>
> > On October 2, 2015 at 5:38:29 PM, Chris Barker (chris.bar...@noaa.gov)
> wrote:
> >> I can't seem to find a way to pip install from a source dir -- not a
> >> tarball.
> >>
> >> Why would I want to do that?
> >>
> >> In this case, it's because I'm trying to build conda packages for python
> >> packages that have compiled C code, and are not using setuptools.
> >>
> >> On Windows, you need to use setuptools in order to use the "MS compiler
> for
> >> Python 2.7". So a straight "setup.py build" fails.
> >>
> >> But pip injects setuptools, so that "pip install" does work. But conda
> has
> >> already unpacked the source distribution, so I'd like to point pip at
> that,
> >> and can't find a way to do that (I could have sworn it was possible...)
> >>
> >> Do I have to build an sdist, and then point pip at that??
> >>
> >> -CHB
> >>
> >>
> >>
>



-- 

Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R(206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115   (206) 526-6317   main reception

chris.bar...@noaa.gov
___
Distutils-SIG maillist  -  Distutils-SIG@python.org
https://mail.python.org/mailman/listinfo/distutils-sig


Re: [Distutils] pip install from source dir??

2015-10-02 Thread Erik Bray
On Fri, Oct 2, 2015 at 5:39 PM, Donald Stufft  wrote:
> ``pip install path/to/directory/with/setup.py/in/it/``

In particular I install most of my packages from source these days by
cd'ing into the source and

$ pip install .

That's all it takes.  Works with -e too.

Erik

> On October 2, 2015 at 5:38:29 PM, Chris Barker (chris.bar...@noaa.gov) wrote:
>> I can't seem to find a way to pip install from a source dir -- not a
>> tarball.
>>
>> Why would I want to do that?
>>
>> In this case, it's because I'm trying to build conda packages for python
>> packages that have compiled C code, and are not using setuptools.
>>
>> On Windows, you need to use setuptools in order to use the "MS compiler for
>> Python 2.7". So a straight "setup.py build" fails.
>>
>> But pip injects setuptools, so that "pip install" does work. But conda has
>> already unpacked the source distribution, so I'd like to point pip at that,
>> and can't find a way to do that (I could have sworn it was possible...)
>>
>> Do I have to build an sdist, and then point pip at that??
>>
>> -CHB
>>
>>
>>
___
Distutils-SIG maillist  -  Distutils-SIG@python.org
https://mail.python.org/mailman/listinfo/distutils-sig


Re: [Distutils] pip install from source dir??

2015-10-02 Thread Chris Barker
On Fri, Oct 2, 2015 at 2:39 PM, Donald Stufft  wrote:

> ``pip install path/to/directory/with/setup.py/in/it/``


WOW!! Sorry for being such an idiot -- I tried that, I really did -- a
couple times, and it failed.

but now it works fine, just like you'd expect. I have no idea what was
doing before.

a small doc patch might be in order -- I actually couldn't find that
anywhere. Though looking now, I see:

pip install [options] [-e]  ...

I must have gotten that tied to the -e option in my head, and didn't notice
that the -e is optional...

Sorry for the noise:

Thanks,

-CHB




> On October 2, 2015 at 5:38:29 PM, Chris Barker (chris.bar...@noaa.gov)
> wrote:
> > I can't seem to find a way to pip install from a source dir -- not a
> > tarball.
> >
> > Why would I want to do that?
> >
> > In this case, it's because I'm trying to build conda packages for python
> > packages that have compiled C code, and are not using setuptools.
> >
> > On Windows, you need to use setuptools in order to use the "MS compiler
> for
> > Python 2.7". So a straight "setup.py build" fails.
> >
> > But pip injects setuptools, so that "pip install" does work. But conda
> has
> > already unpacked the source distribution, so I'd like to point pip at
> that,
> > and can't find a way to do that (I could have sworn it was possible...)
> >
> > Do I have to build an sdist, and then point pip at that??
> >
> > -CHB
> >
> >
> >
> > --
> >
> > Christopher Barker, Ph.D.
> > Oceanographer
> >
> > Emergency Response Division
> > NOAA/NOS/OR&R (206) 526-6959 voice
> > 7600 Sand Point Way NE (206) 526-6329 fax
> > Seattle, WA 98115 (206) 526-6317 main reception
> >
> > chris.bar...@noaa.gov
> > ___
> > Distutils-SIG maillist - Distutils-SIG@python.org
> > https://mail.python.org/mailman/listinfo/distutils-sig
> >
>
> -
> Donald Stufft
> PGP: 0x6E3CBCE93372DCFA // 7C6B 7C5D 5E2B 6356 A926 F04F 6E3C BCE9 3372
> DCFA
>
>
>


-- 

Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R(206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115   (206) 526-6317   main reception

chris.bar...@noaa.gov
___
Distutils-SIG maillist  -  Distutils-SIG@python.org
https://mail.python.org/mailman/listinfo/distutils-sig


Re: [Distutils] pip install from source dir??

2015-10-02 Thread Donald Stufft
``pip install path/to/directory/with/setup.py/in/it/``

On October 2, 2015 at 5:38:29 PM, Chris Barker (chris.bar...@noaa.gov) wrote:
> I can't seem to find a way to pip install from a source dir -- not a
> tarball.
> 
> Why would I want to do that?
> 
> In this case, it's because I'm trying to build conda packages for python
> packages that have compiled C code, and are not using setuptools.
> 
> On Windows, you need to use setuptools in order to use the "MS compiler for
> Python 2.7". So a straight "setup.py build" fails.
> 
> But pip injects setuptools, so that "pip install" does work. But conda has
> already unpacked the source distribution, so I'd like to point pip at that,
> and can't find a way to do that (I could have sworn it was possible...)
> 
> Do I have to build an sdist, and then point pip at that??
> 
> -CHB
> 
> 
> 
> --
> 
> Christopher Barker, Ph.D.
> Oceanographer
> 
> Emergency Response Division
> NOAA/NOS/OR&R (206) 526-6959 voice
> 7600 Sand Point Way NE (206) 526-6329 fax
> Seattle, WA 98115 (206) 526-6317 main reception
> 
> chris.bar...@noaa.gov
> ___
> Distutils-SIG maillist - Distutils-SIG@python.org
> https://mail.python.org/mailman/listinfo/distutils-sig
> 

-
Donald Stufft
PGP: 0x6E3CBCE93372DCFA // 7C6B 7C5D 5E2B 6356 A926 F04F 6E3C BCE9 3372 DCFA


___
Distutils-SIG maillist  -  Distutils-SIG@python.org
https://mail.python.org/mailman/listinfo/distutils-sig


[Distutils] pip install from source dir??

2015-10-02 Thread Chris Barker
I can't seem to find a way to pip install from a source dir -- not a
tarball.

Why would I want to do that?

In this case, it's because I'm trying to build conda packages for python
packages that have compiled C code, and are not using setuptools.

On Windows, you need to use setuptools in order to use the "MS compiler for
Python 2.7". So a straight "setup.py build" fails.

But pip injects setuptools, so that "pip install" does work. But conda has
already unpacked the source distribution, so I'd like to point pip at that,
and can't find a way to do that (I could have sworn it was possible...)

Do I have to build an sdist, and then point pip at that??

-CHB



-- 

Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R(206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115   (206) 526-6317   main reception

chris.bar...@noaa.gov
___
Distutils-SIG maillist  -  Distutils-SIG@python.org
https://mail.python.org/mailman/listinfo/distutils-sig