build recipe just for python2.7?

0 views
Skip to first unread message

Chris Barker

unread,
Sep 30, 2015, 4:55:14 PM9/30/15
to conda
I"m tryin gto specify that a recipe for aqpyton padakge only support py2 (or py2.7)

I find I can do:

requirements:
  build:
    - python ==2.7.10

but It doesn't seem to like:

 - python ==2.7

I dont want to do:

 - python >= 2.7

as that would imply py3 as well, which I really don't want.

Given that python2.7 is at the end of it's life, specifying 2.7.10 is probably fine, but how to do this in general? Like what about python3.4, but not 3.5??

can I do a >= and a < ???

Thanks,
  -Chris






--

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....@noaa.gov

Chris Barker

unread,
Sep 30, 2015, 5:05:27 PM9/30/15
to conda
On Wed, Sep 30, 2015 at 1:54 PM, Chris Barker <chris....@noaa.gov> wrote:
I'm trying to specify that a recipe for aqpyton padakge only support py2 (or py2.7)

I think I answered my own question:

requirements:
  build:
    - python >=2.7,<3 

seems to be working.

-Chris

Ilan Schnell

unread,
Sep 30, 2015, 5:06:13 PM9/30/15
to Chris Barker, conda
In your conda build recipe, you shouldn't specify any Python version.  Simply:
requirements:
  build:
    - python

By default conda-build will use Python version of the Python in the root environment, but this can also be changed by setting the CONDA_PY environment variable, or using the --python option.
This way the recipe is independent of the Python version, and can be used to build multiple packages against different versions of Python.


--
You received this message because you are subscribed to the Google Groups "conda - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to conda+un...@continuum.io.
To post to this group, send email to co...@continuum.io.
Visit this group at http://groups.google.com/a/continuum.io/group/conda/.

Chris Barker

unread,
Sep 30, 2015, 8:08:31 PM9/30/15
to Ilan Schnell, conda
On Wed, Sep 30, 2015 at 2:06 PM, Ilan Schnell <il...@continuum.io> wrote:
In your conda build recipe, you shouldn't specify any Python version.  Simply:
requirements:
  build:
    - python

By default conda-build will use Python version of the Python in the root environment, but this can also be changed by setting the CONDA_PY environment variable, or using the --python option.
This way the recipe is independent of the Python version, and can be used to build multiple packages against different versions of Python.

well, that's a nice theory ,but if if it can't be built / won't work with certain python versions, it's nice to be able to specify that in the yaml...

though I've found a work-around for the issue at hand.

-CHB

Ilan Schnell

unread,
Sep 30, 2015, 8:14:26 PM9/30/15
to Chris Barker, conda
You can specify this in the `meta.yaml`, if you really want.  By:
```
build:
  skip: True        [py == 27]
```

Chris Barker

unread,
Sep 30, 2015, 11:08:29 PM9/30/15
to Ilan Schnell, conda
On Wed, Sep 30, 2015 at 5:14 PM, Ilan Schnell <il...@continuum.io> wrote:
You can specify this in the `meta.yaml`, if you really want.  By:
```
build:
  skip: True        [py == 27]
```

cool -- though woulnd't that be:

  skip: True        [py != 27]

?

thanks,
 -Chris

Ilan Schnell

unread,
Sep 30, 2015, 11:09:27 PM9/30/15
to Chris Barker, conda
Yeah!  It would skip, unless the python version is 2.7.  Good catch.
Reply all
Reply to author
Forward
0 new messages