Discussion:
[conda] unhelpful error from conda build
Chris Withers
2018-04-18 23:50:24 UTC
Permalink
Hi All,

Is anyone able to tell me what I'm doing wrong such that I get:

$ conda build -q conda.recipe
Undefined Jinja2 variables remain (['version', 'entry_points',
'description', 'description', 'url', 'license', 'author',
'author_email']).  Please enable source downloading and try again.

(from https://travis-ci.org/Simplistix/picky-conda/jobs/368401471#L655)

I'm sure this was working until I moved meta.yaml into the conda.recipe
folder, but I've been changing a lot trying to get the packaging right.
I feel like I'm doing something silly...

The repo is here: https://github.com/Simplistix/picky-conda

cheers,

Chris
--
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+***@continuum.io.
To post to this group, send email to ***@continuum.io.
Visit this group at https://groups.google.com/a/continuum.io/group/conda/.
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/conda/ac41d898-147c-1979-5bf9-928724dce890%40withers.org.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.
Chris Withers
2018-04-19 07:28:49 UTC
Permalink
You're missing an install-time dependency.
Actually, that wasn't it. I moved meta.yaml to a conda.recipe folder
(why does that pattern exist, btw?) and forgot to update the source
location, this was the fix:

https://github.com/Simplistix/picky-conda/commit/82f46398f53044b279c9f3f37a91baaac0d6f16b#diff-bd134fa847b11c75aba174f834eb80dfL8
Yes, this error could be much better. Fundamentally, the error is
saying "I failed to load info from setup.py."
It is then up to you to figure out why. PRs welcome. Feel free to
file an issue anyway.
Indeed, but it feels like the permit_undefined_jinja=True option should
really just be raise_on_problems and blow up explicitly if no setup.py
can be found. So yes, it was
https://github.com/Simplistix/picky-conda/blob/master/setup.py#L21
You need pyyaml in
https://github.com/Simplistix/picky-conda/blob/master/conda.recipe/meta.yaml#L20
And yes, this was the second problem ;-)
Note that this is a great example of a use case where looping over the
contents of setup.cfg/setup.py values won't work.  yaml is the python
library import, but the conda package is named pyyaml.
I think you may be confused here, it's distribution names all the way
down here, the package name is yaml but I don't think that's used?

The difference is that conda packages are all lowercase whereas pypi
packages are... a mess ;-) Here's the fix:

https://github.com/Simplistix/picky-conda/commit/d07cefeaf1b064da728c4f11948f60a98f91a2f2

cheers,

Chris
--
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+***@continuum.io.
To post to this group, send email to ***@continuum.io.
Visit this group at https://groups.google.com/a/continuum.io/group/conda/.
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/conda/97a2da19-0ca7-ad6d-89dc-000df1d70f0a%40withers.org.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.
Loading...