[meta-virtualization] Help (python-jsonschema do_compile Failed)

Mark Asselstine mark.asselstine at windriver.com
Mon Dec 14 12:47:00 PST 2015

On Sun, Dec 13, 2015 at 8:46 PM, Li, Xin <lixin.fnst at cn.fujitsu.com> wrote:
> Hi, Mark and all,
> Thanks a lot for your help.
>>> When I bitbake python-jsonschema,the error is occurred in the step of
>>> do_compile as following:
>>> ------------------------------
>>> DEBUG: Executing shell function do_compile
>>> Download error on https://pypi.python.org/simple/vcversioner/: [Errno
>>> -5] No address associated with hostname -- Some packages may not be found!
>>> Couldn't find index page for 'vcversioner' (maybe misspelled?)
>>> Download error on https://pypi.python.org/simple/: [Errno -5] No
>>> address associated with hostname -- Some packages may not be found!
>>> No local packages or download links found for vcversioner
>>> Traceback (most recent call last):
>>>   File "setup.py", line 44, in <module>
>>> vcversioner={"version_module_paths" : ["jsonschema/_version.py"]},
>>> -------------------------------
>>> If you know how to fix it, Please tell me.
>>A download error during do_compile(). My guess is that we have a missing
>>dependency. With python, Ruby and some other packages we have to be careful
>>as their builds will actually cause downloads to happen if a dependency is missing
>>(python will fetch eggs, ruby will fetch gems...). When I have time I usually do
>>builds with IP tables rules in place to force errors when these fetches happen so
>>that I can catch them and fix them. Downloads should only be done by the fetcher
>>and not bundler, pdb etc. If you see an error about downloading and you are not
>>in do_fetch() something is wrong.
>>Start by adding python-vcversioner as a DEPENDS in python-jsonschema and you
>>should be good to go.
> The python-vcversioner is already as a DEPENDS in python-jsonschema, and
> It is still failed.
> Perhaps it is the problem about proxy set.

No, again this would just be band-aid for a real problem. I did have
time to look at this today, but not enough to find a suitable

The issue is "setup_requires" in setup.py for python-jsonschema. This
is a rarely used directive that has some unexpected consequences. See:

(warning at bottom of section)

I can reproduce your issue by using iptables rules to DROP packets on
port 80 and 443.

The solution is one of 3.
1) We can cleanup the setup.py to not require vcversioner. This is
most likely the simplest but may have bad side effects.
2) We build vcversioner .egg file in an addition to do_compile() and
add it to the -dev pkg to ensure it is in the sysroot. We then copy
the egg from the sysroot to our build as a step before
python-jsonschema do_compile(). This is most likely the best fix.
3) We build the .egg as in (2) but build an index file in the sysroot,
allowing us to use find_links

I really believe (2) is the best approach. Building the egg and having
it in the sysroot is very straightforward, the copy shouldn't be that
difficult either. I can attempt this but most likely won't have a fix
until tomorrow. For now manually download the egg for vcversioner and
place it in tmp/work/core2-64-poky-linux/python-jsonschema/2.5.1-r0/jsonschema-2.5.1/.eggs/vcversioner-
and you should be able to at least continue to build.


> When I bitbake python-jsonschema, the error occurs in the step of do_compile,
> But when I into directory "python-jsonschema/2.5.1-r0/jsonschema-2.5.1/ ", and run.do_complie, no errors occur.
> -----------------------------
> $ cd build-x86_64/tmp/work/x86_64 -linux/python-jsonschema/2.5.1-r0/jsonschema-2.5.1/
> $ ../temp/run.do_compile
> zip_safe flag not set; analyzing archive contents...
> Installed ***/work/x86_64 -linux/python-jsonschema/2.5.1-r0/jsonschema-2.5.1/.eggs/vcversioner-
> running build
> running build_py
> creating build
> creating build/lib
> creating build/lib/jsonschema
> ......
> $ echo $?
> 0
> ---------------------------------
> And I have proxy set in ~/.wgetrc like this:
> http_proxy = http://rep.proxy.nic.fujitsu.com:8080/
> ftp_proxy = http://rep.proxy.nic.fujitsu.com:8080/
> https_proxy=https://rep.proxy.nic.fujitsu.com:8080/
> If you know how to fix it, please help me.
> Regards,
> Li
> --
> _______________________________________________
> meta-virtualization mailing list
> meta-virtualization at yoctoproject.org
> https://lists.yoctoproject.org/listinfo/meta-virtualization

More information about the meta-virtualization mailing list