Hi all, Am Dienstag, 17. November 2015, 11:39:12 schrieb Jason Craig:
On 11/14/2015 03:41 PM, Axel Braun wrote:
Am Samstag, 14. November 2015, 23:07:32 schrieb Benjamin Denisart:
On 11/14/2015 11:04 PM, Axel Braun wrote:
Hi all,
I was recently building new modules for the tryton-server. One of the modules runs a test-script:
%check python setup.py test
Problem: Unlike the installation, which takes all resources from the repository (e.g. the server module trytond), the test wants to download this from pypi:
[ 39s] + python setup.py test [ 39s] running test [ 39s] Searching for trytond>=3.8,<3.9 [ 39s] Reading https://pypi.python.org/simple/trytond/ [ 39s] Download error on https://pypi.python.org/simple/trytond/: [Errno -2] Name or service not known -- Some packages may not be found!
...
The idea to add trytond as build requirement did not help either, as this produces dome other funny error messages (about some missing mysql-stuff - which I see first time now)
Is there a way to tell the test to *not* download from pypi, but to use local resources instead?
Basically tests in Python packages sometimes have requirements that the package itself doesn't need to run. A common example of this is python-nose, this package is made for tests, but the end user doesn't really need it installed unless they want to run the package's tests themselves (rather uncommon). So BuildRequires: python-nose would be added, but not Requires: python-nose.
In your case however, I think that trytond is probably required for the package to run as well as to be tested. Once you add trytond to Requires, then the test run gets a little further but now doesn't have whatever the mysql requirement the package needs, so that's why that is showing up for the first time. The setuptools process will quit on the first package it needs that isn't found, it won't give you a complete list of missing packages.
Yes, thats what I found out in between as well. Trytond runs mostly with a postgres-DB, and there is no dependency on mysql in the spec for trytond. I had a chat with the author of trytond as well. He explained me that trytond uses for tests SQlite - this may be where the requirement comes from. I added (beside others) BuildRequires: libmysqlclient-devel BuildRequires: mariadb and that removed the error. Now it does not find the tryton.cfg file, although it is in the package.....
I would check the package's setup.py to see what the "install_requires" packages are and add all these to the Requires for your package. Also sometimes whoever made the Python package didn't accurately set "install_requires", so you have to dig around in documentation or by trial and error to see what packages are going to be required to test/run the package.
Also it is possible that the trytond package, not the package you are working on, does not have the proper Requires set, so that the missing mysql stuff OBS is complaining about is really something that should be included with trytond.
Link to your package ?
I tried a osc linkpac Application:ERP:Tryton:3.8 trytond Application:ERP:Tryton:3.8 trytond_customs ...but that did not help
I think maybe he was asking for a URL to the package on OBS so he could look at the package himself?
Sure: https://build.opensuse.org/package/show/Application:ERP:Tryton:3.8/trytond_c... Problem with Build enables is that the 'older' Distris SLE12 ond openSUSE 13.1 dont find libsqlclient.so.18 anymore - probably there is an older version available for these. So, under this light I think about dropping the test.... I'm currently on vacation, so I might not answer immediately. Thanks guys Axel -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org