Commit c8c3071f authored by Kirill Smelkov's avatar Kirill Smelkov

wendelin.core: Fix test build

Wendelin.core2[test] depends on scipy[1]. Before slapos.buildout
2.7.1+slapos013 the build was succeeding because scipy was, likely, installed
via binary wheel. But after that buildout upgrade the build fails:

    WARNING: The easy_install command is deprecated and will be removed in a future version.
    /tmp/easy_install-vYdhd1/scipy-0.19.0/setup.py:323: UserWarning: Unrecognized setuptools command, proceeding with generating Cython sources and expanding templates
      warnings.warn("Unrecognized setuptools command, proceeding with "
    Traceback (most recent call last):
      File "<string>", line 10, in <module>
      File "/srv/slapgrid/slappart91/srv/runner/software/3335682bae677c2d474f9244e578f64b/eggs/setuptools-44.1.1-py2.7.egg/setuptools/command/easy_install.py", line 2321, in main
        **kw
      File "/srv/slapgrid/slappart91/srv/runner/software/3335682bae677c2d474f9244e578f64b/eggs/setuptools-44.1.1-py2.7.egg/setuptools/__init__.py", line 162, in setup
        return distutils.core.setup(**attrs)
      File "/srv/slapgrid/slappart91/srv/runner/shared/python2.7/93d57ff089fd75f374514794469a0538/lib/python2.7/distutils/core.py", line 151, in setup
        dist.run_commands()
      File "/srv/slapgrid/slappart91/srv/runner/shared/python2.7/93d57ff089fd75f374514794469a0538/lib/python2.7/distutils/dist.py", line 953, in run_commands
        self.run_command(cmd)
      File "/srv/slapgrid/slappart91/srv/runner/shared/python2.7/93d57ff089fd75f374514794469a0538/lib/python2.7/distutils/dist.py", line 972, in run_command
        cmd_obj.run()
      File "/srv/slapgrid/slappart91/srv/runner/software/3335682bae677c2d474f9244e578f64b/eggs/setuptools-44.1.1-py2.7.egg/setuptools/command/easy_install.py", line 424, in run
        self.easy_install(spec, not self.no_deps)
      File "/srv/slapgrid/slappart91/srv/runner/software/3335682bae677c2d474f9244e578f64b/eggs/setuptools-44.1.1-py2.7.egg/setuptools/command/easy_install.py", line 666, in easy_install
        return self.install_item(None, spec, tmpdir, deps, True)
      File "/srv/slapgrid/slappart91/srv/runner/software/3335682bae677c2d474f9244e578f64b/eggs/setuptools-44.1.1-py2.7.egg/setuptools/command/easy_install.py", line 711, in install_item
        dists = self.install_eggs(spec, download, tmpdir)
      File "/srv/slapgrid/slappart91/srv/runner/software/3335682bae677c2d474f9244e578f64b/eggs/setuptools-44.1.1-py2.7.egg/setuptools/command/easy_install.py", line 896, in install_eggs
        return self.build_and_install(setup_script, setup_base)
      File "/srv/slapgrid/slappart91/srv/runner/software/3335682bae677c2d474f9244e578f64b/eggs/setuptools-44.1.1-py2.7.egg/setuptools/command/easy_install.py", line 1164, in build_and_install
        self.run_setup(setup_script, setup_base, args)
      File "/srv/slapgrid/slappart91/srv/runner/software/3335682bae677c2d474f9244e578f64b/eggs/setuptools-44.1.1-py2.7.egg/setuptools/command/easy_install.py", line 1150, in run_setup
        run_setup(setup_script, args)
      File "/srv/slapgrid/slappart91/srv/runner/software/3335682bae677c2d474f9244e578f64b/eggs/setuptools-44.1.1-py2.7.egg/setuptools/sandbox.py", line 253, in run_setup
        raise
      File "/srv/slapgrid/slappart91/srv/runner/shared/python2.7/93d57ff089fd75f374514794469a0538/lib/python2.7/contextlib.py", line 35, in __exit__
        self.gen.throw(type, value, traceback)
      File "<string>", line 7, in setup_context
      File "/srv/slapgrid/slappart91/srv/runner/shared/python2.7/93d57ff089fd75f374514794469a0538/lib/python2.7/contextlib.py", line 35, in __exit__
        self.gen.throw(type, value, traceback)
      File "/srv/slapgrid/slappart91/srv/runner/software/3335682bae677c2d474f9244e578f64b/eggs/setuptools-44.1.1-py2.7.egg/setuptools/sandbox.py", line 195, in setup_context
        yield
      File "/srv/slapgrid/slappart91/srv/runner/shared/python2.7/93d57ff089fd75f374514794469a0538/lib/python2.7/contextlib.py", line 35, in __exit__
        self.gen.throw(type, value, traceback)
      File "/srv/slapgrid/slappart91/srv/runner/software/3335682bae677c2d474f9244e578f64b/eggs/setuptools-44.1.1-py2.7.egg/setuptools/sandbox.py", line 166, in save_modules
        saved_exc.resume()
      File "/srv/slapgrid/slappart91/srv/runner/software/3335682bae677c2d474f9244e578f64b/eggs/setuptools-44.1.1-py2.7.egg/setuptools/sandbox.py", line 141, in resume
        six.reraise(type, exc, self._tb)
      File "/srv/slapgrid/slappart91/srv/runner/software/3335682bae677c2d474f9244e578f64b/eggs/setuptools-44.1.1-py2.7.egg/setuptools/sandbox.py", line 154, in save_modules
        yield saved
      File "/srv/slapgrid/slappart91/srv/runner/software/3335682bae677c2d474f9244e578f64b/eggs/setuptools-44.1.1-py2.7.egg/setuptools/sandbox.py", line 195, in setup_context
        yield
      File "<string>", line 7, in setup_context
      File "/srv/slapgrid/slappart91/srv/runner/software/3335682bae677c2d474f9244e578f64b/eggs/setuptools-44.1.1-py2.7.egg/setuptools/sandbox.py", line 250, in run_setup
        _execfile(setup_script, ns)
      File "/srv/slapgrid/slappart91/srv/runner/software/3335682bae677c2d474f9244e578f64b/eggs/setuptools-44.1.1-py2.7.egg/setuptools/sandbox.py", line 45, in _execfile
        exec(code, globals, locals)
      File "/tmp/easy_install-vYdhd1/scipy-0.19.0/setup.py", line 416, in <module>
      File "/tmp/easy_install-vYdhd1/scipy-0.19.0/setup.py", line 396, in setup_package
    ImportError: No module named numpy.distutils.core
    An error occurred when trying to install scipy 0.19.0. Look above this message for any errors that were output by easy_install.
    While:
      Installing wendelin.core-python.
      Base installation request: 'wendelin.core[test]', 'pygolang[pyx.build]', 'neoppod[tests]', 'ZEO[test]'
        Requirement of ZEO[test]: random2
        Requirement of ZEO[test]: manuel
        Requirement of ZEO[test]: zope.testing
        Requirement of ZEO[test]: zope.interface
        Requirement of ZEO[test]: zdaemon
        Requirement of ZEO[test]: ZConfig
        Requirement of ZEO[test]: zc.lockfile
        Requirement of ZEO[test]: persistent>=4.1.0
        Requirement of ZEO[test]: transaction<2.0.0
        Requirement of ZEO[test]: six
        Requirement of ZEO[test]: ZODB<4.999,>=4.2.0b1
        Requirement of neoppod[tests]==1.12.0: neoppod[admin,client,ctl,master,storage-importer,storage-mysqldb,storage-sqlite]
        Requirement of neoppod[tests]==1.12.0: psutil>=2
        Requirement of neoppod[tests]==1.12.0: zope.testing
        Requirement of neoppod[tests]==1.12.0: coverage
        Requirement of neoppod[tests]==1.12.0: python-dateutil
        Requirement of pygolang[pyx.build]==0.0.8: wheel
        Requirement of pygolang[pyx.build]==0.0.8: setuptools_dso>=1.7
        Requirement of pygolang[pyx.build]==0.0.8: setuptools
        Requirement of pygolang[pyx.build]==0.0.8: cython
        Requirement of pygolang[pyx.build]==0.0.8: Importing
        Requirement of pygolang[pyx.build]==0.0.8: decorator
        Requirement of pygolang[pyx.build]==0.0.8: six
        Requirement of pygolang[pyx.build]==0.0.8: gevent
        Requirement of wendelin.core[test]: scipy
        Requirement of wendelin.core[test]: pytest
        Requirement of wendelin.core[test]: psutil
        Requirement of wendelin.core[test]: six
        Requirement of wendelin.core[test]: pygolang>=0.0.8
        Requirement of wendelin.core[test]: zodbtools>=0.0.0.dev8
        Requirement of wendelin.core[test]: ZODB>=4
        Requirement of wendelin.core[test]: numpy
        Requirement of manuel: six
        Requirement of manuel: setuptools
        Requirement of zope.testing: zope.interface
        Requirement of zope.testing: zope.exceptions
        Requirement of zope.testing: setuptools
        Requirement of zope.interface: setuptools
        Requirement of zdaemon: setuptools
        Requirement of zdaemon: ZConfig
        Requirement of zc.lockfile: setuptools
        Requirement of persistent>=4.1.0: cffi
        Requirement of persistent>=4.1.0: zope.interface
        Requirement of transaction<2.0.0: zope.interface
        Requirement of ZODB<4.999,>=4.2.0b1: zodbpickle>=0.6.0
        Requirement of ZODB<4.999,>=4.2.0b1: zope.interface
        Requirement of ZODB<4.999,>=4.2.0b1: zc.lockfile
        Requirement of ZODB<4.999,>=4.2.0b1: six
        Requirement of ZODB<4.999,>=4.2.0b1: transaction>=1.5.0
        Requirement of ZODB<4.999,>=4.2.0b1: ZConfig
        Requirement of ZODB<4.999,>=4.2.0b1: BTrees>=4.2.0
        Requirement of ZODB<4.999,>=4.2.0b1: persistent>=4.2.0
        Requirement of neoppod[admin,client,ctl,master,storage-importer,storage-mysqldb,storage-sqlite]: ZODB3>=3.10dev
        Requirement of neoppod[admin,client,ctl,master,storage-importer,storage-mysqldb,storage-sqlite]: mysqlclient
        Requirement of neoppod[admin,client,ctl,master,storage-importer,storage-mysqldb,storage-sqlite]: setproctitle
        Requirement of neoppod[admin,client,ctl,master,storage-importer,storage-mysqldb,storage-sqlite]: msgpack>=0.5.6
        Requirement of neoppod[admin,client,ctl,master,storage-importer,storage-mysqldb,storage-sqlite]: ZODB3>=3.10dev
        Requirement of neoppod[admin,client,ctl,master,storage-importer,storage-mysqldb,storage-sqlite]: python-dateutil
        Requirement of python-dateutil: six>=1.5
        Requirement of gevent: greenlet>=0.4.17
        Requirement of gevent: setuptools
        Requirement of gevent: zope.interface
        Requirement of gevent: zope.event
      Getting distribution for 'scipy==0.19.0'.
    Error: Couldn't install: scipy 0.19.0

-> Fix it by explicitly installing SciPy via our component/scipy/ which lists numpy in its setup_eggs.

[1] https://lab.nexedi.com/kirr/wendelin.core/blob/5e647b59/setup.py#L384-386
parent a4f7af38
...@@ -7,6 +7,7 @@ extends = ...@@ -7,6 +7,7 @@ extends =
# appropriate ZODB and versions of other components. # appropriate ZODB and versions of other components.
../pytest/buildout.cfg ../pytest/buildout.cfg
../scipy/buildout.cfg
../gdb/buildout.cfg ../gdb/buildout.cfg
../../stack/nxdtest.cfg ../../stack/nxdtest.cfg
buildout.cfg buildout.cfg
...@@ -23,6 +24,11 @@ parts = ...@@ -23,6 +24,11 @@ parts =
instance.cfg instance.cfg
# test-dependent eggs that must come through in-tree recipes.
[wendelin.core]
depends += ${scipy:egg}
# bin/python s python interpreter with wendelin.core and all other eggs. # bin/python s python interpreter with wendelin.core and all other eggs.
[wendelin.core-python] [wendelin.core-python]
<= python-interpreter <= python-interpreter
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment