Support #35587
Le paquet 'lasso' est absent lors des tests tox
0%
Description
Bonjour,
Sur une Archlinux à jour, lorsque je lance les tests tox, sur tous les environnements, et après avoir appliqué le correctif proposé sur #35584, j'obtiens le message d'erreur en bas de ticket.
Supprimer de tox.ini l'appel à getlasso.sh, et rajouter 'lasso' dans la section 'install_requires' de setup.py semble corriger ce problème.
Par ailleurs, 'lasso' a été renommé 'gnarl' https://github.com/aperezdc/gnarl et donc une correction plus pérènne serait sans doute d'utiliser la dépendance 'gnarl' plutôt que 'lasso'.
py27-coverage-dj18-authentic-pg- recreate: /tmp/tox-eloi/authentic/py27-coverage-dj18-authentic-pg- py27-coverage-dj18-authentic-pg- installdeps: pip > 9, django>1.8,<1.9, django-tables2<1.1, django-jsonfield<1.1, psycopg2-binary, coverage, pytest-cov, pytest-django<3.4.6, pytest-random, mock, pytest<5, lxml, cssselect, django-webtest<1.9.3, Markdown<3, WebTest, pyquery, httmock, pytz, pytest-freezegun, ldaptools>=0.15, django-model-utils<3.2 py27-coverage-dj18-authentic-pg- develop-inst: /home/eloi/dev/authentic py27-coverage-dj18-authentic-pg- installed: asn1crypto==0.24.0,atomicwrites==1.3.0,attrs==19.1.0,-e git+http://repos.entrouvert.org/authentic.git@900c8dab0fa0309c97250113039da3686a314dd7#egg=authentic2,backports.csv==1.0.7,backports.functools-lru-cache==1.5,beautifulsoup4==4.8.0,certifi==2019.6.16,cffi==1.12.3,chardet==3.0.4,configparser==3.8.1,contextlib2==0.5.5,coverage==4.5.4,cryptography==2.7,cssselect==1.1.0,defusedxml==0.6.0,diff-match-patch==20181111,Django==1.8.19,django-appconf==1.0.3,django-filter==1.1.0,django-import-export==1.2.0,django-jsonfield==1.0.1,django-mellon==1.2.38,django-model-utils==3.1.2,Django-Select2==5.11.1,django-tables2==1.0.7,django-webtest==1.9.2,djangorestframework==3.4.7,dnspython==1.16.0,enum34==1.1.6,et-xmlfile==1.0.1,freezegun==0.3.12,funcsigs==1.0.2,gadjo==0.81,httmock==1.3.0,idna==2.8,importlib-metadata==0.19,ipaddress==1.0.22,isodate==0.6.0,jdcal==1.4.1,jwcrypto==0.6.0,ldaptools==0.18,lxml==4.4.1,Markdown==2.6.11,mock==3.0.5,more-itertools==5.0.0,oauthlib==3.1.0,odfpy==1.4.0,openpyxl==2.6.3,packaging==19.1,pathlib2==2.3.4,Pillow==6.1.0,pluggy==0.12.0,psycopg2-binary==2.8.3,py==1.8.0,pyasn1==0.4.6,pyasn1-modules==0.2.6,pycparser==2.19,pycryptodome==3.8.2,pyparsing==2.4.2,pyquery==1.4.0,pytest==4.6.5,pytest-cov==2.7.1,pytest-django==3.4.5,pytest-freezegun==0.3.0.post1,pytest-random==0.2,python-dateutil==2.8.0,python-ldap==3.2.0,pytz==2019.2,PyYAML==5.1.2,requests==2.22.0,requests-oauthlib==1.2.0,scandir==1.10.0,six==1.12.0,soupsieve==1.9.3,tablib==0.13.0,urllib3==1.25.3,waitress==1.3.0,wcwidth==0.1.7,WebOb==1.8.5,WebTest==2.0.33,xlrd==1.2.0,xlwt==1.3.0,XStatic==1.0.2,XStatic-Font-Awesome==4.7.0.0,XStatic-jQuery==1.12.4.1,XStatic-jquery-ui==1.12.1.1,XStatic-OpenSans==1.0.0,XStatic-Select2==4.0.3.1,zipp==0.6.0 py27-coverage-dj18-authentic-pg- run-test-pre: PYTHONHASHSEED='3349256826' py27-coverage-dj18-authentic-pg- run-test: commands[0] | ./getlasso.sh '/tmp/tox-eloi/authentic/py27-coverage-dj18-authentic-pg-/lib/python2.7/site-packages/lasso.py' -> '/usr/lib/python3.7/site-packages/lasso.py' '/tmp/tox-eloi/authentic/py27-coverage-dj18-authentic-pg-/lib/python2.7/site-packages/_lasso.*' -> '/usr/lib/python3.7/site-packages/_lasso.*' py27-coverage-dj18-authentic-pg- run-test: commands[1] | py.test --cov=src --cov-branch --cov-append --cov-report xml --cov-report html tests/ --random-group ***** django-mellon needs the Python binding for the lasso library, ***** ***** look on http://lasso.entrouvert.org/download/ to obtain it ***** Traceback (most recent call last): File "/tmp/tox-eloi/authentic/py27-coverage-dj18-authentic-pg-/bin/py.test", line 11, in <module> sys.exit(main()) File "/tmp/tox-eloi/authentic/py27-coverage-dj18-authentic-pg-/lib/python2.7/site-packages/_pytest/config/__init__.py", line 63, in main config = _prepareconfig(args, plugins) File "/tmp/tox-eloi/authentic/py27-coverage-dj18-authentic-pg-/lib/python2.7/site-packages/_pytest/config/__init__.py", line 207, in _prepareconfig pluginmanager=pluginmanager, args=args File "/tmp/tox-eloi/authentic/py27-coverage-dj18-authentic-pg-/lib/python2.7/site-packages/pluggy/hooks.py", line 289, in __call__ return self._hookexec(self, self.get_hookimpls(), kwargs) File "/tmp/tox-eloi/authentic/py27-coverage-dj18-authentic-pg-/lib/python2.7/site-packages/pluggy/manager.py", line 87, in _hookexec return self._inner_hookexec(hook, methods, kwargs) File "/tmp/tox-eloi/authentic/py27-coverage-dj18-authentic-pg-/lib/python2.7/site-packages/pluggy/manager.py", line 81, in <lambda> firstresult=hook.spec.opts.get("firstresult") if hook.spec else False, File "/tmp/tox-eloi/authentic/py27-coverage-dj18-authentic-pg-/lib/python2.7/site-packages/pluggy/callers.py", line 203, in _multicall gen.send(outcome) File "/tmp/tox-eloi/authentic/py27-coverage-dj18-authentic-pg-/lib/python2.7/site-packages/_pytest/helpconfig.py", line 94, in pytest_cmdline_parse config = outcome.get_result() File "/tmp/tox-eloi/authentic/py27-coverage-dj18-authentic-pg-/lib/python2.7/site-packages/pluggy/callers.py", line 81, in get_result _reraise(*ex) # noqa File "/tmp/tox-eloi/authentic/py27-coverage-dj18-authentic-pg-/lib/python2.7/site-packages/pluggy/callers.py", line 187, in _multicall res = hook_impl.function(*args) File "/tmp/tox-eloi/authentic/py27-coverage-dj18-authentic-pg-/lib/python2.7/site-packages/_pytest/config/__init__.py", line 687, in pytest_cmdline_parse self.parse(args) File "/tmp/tox-eloi/authentic/py27-coverage-dj18-authentic-pg-/lib/python2.7/site-packages/_pytest/config/__init__.py", line 895, in parse self._preparse(args, addopts=addopts) File "/tmp/tox-eloi/authentic/py27-coverage-dj18-authentic-pg-/lib/python2.7/site-packages/_pytest/config/__init__.py", line 851, in _preparse early_config=self, args=args, parser=self._parser File "/tmp/tox-eloi/authentic/py27-coverage-dj18-authentic-pg-/lib/python2.7/site-packages/pluggy/hooks.py", line 289, in __call__ return self._hookexec(self, self.get_hookimpls(), kwargs) File "/tmp/tox-eloi/authentic/py27-coverage-dj18-authentic-pg-/lib/python2.7/site-packages/pluggy/manager.py", line 87, in _hookexec return self._inner_hookexec(hook, methods, kwargs) File "/tmp/tox-eloi/authentic/py27-coverage-dj18-authentic-pg-/lib/python2.7/site-packages/pluggy/manager.py", line 81, in <lambda> firstresult=hook.spec.opts.get("firstresult") if hook.spec else False, File "/tmp/tox-eloi/authentic/py27-coverage-dj18-authentic-pg-/lib/python2.7/site-packages/pluggy/callers.py", line 208, in _multicall return outcome.get_result() File "/tmp/tox-eloi/authentic/py27-coverage-dj18-authentic-pg-/lib/python2.7/site-packages/pluggy/callers.py", line 81, in get_result _reraise(*ex) # noqa File "/tmp/tox-eloi/authentic/py27-coverage-dj18-authentic-pg-/lib/python2.7/site-packages/pluggy/callers.py", line 187, in _multicall res = hook_impl.function(*args) File "/tmp/tox-eloi/authentic/py27-coverage-dj18-authentic-pg-/lib/python2.7/site-packages/pytest_django/plugin.py", line 328, in pytest_load_initial_conftests _setup_django() File "/tmp/tox-eloi/authentic/py27-coverage-dj18-authentic-pg-/lib/python2.7/site-packages/pytest_django/plugin.py", line 216, in _setup_django django.setup() File "/tmp/tox-eloi/authentic/py27-coverage-dj18-authentic-pg-/lib/python2.7/site-packages/django/__init__.py", line 18, in setup apps.populate(settings.INSTALLED_APPS) File "/tmp/tox-eloi/authentic/py27-coverage-dj18-authentic-pg-/lib/python2.7/site-packages/django/apps/registry.py", line 85, in populate app_config = AppConfig.create(entry) File "/tmp/tox-eloi/authentic/py27-coverage-dj18-authentic-pg-/lib/python2.7/site-packages/django/apps/config.py", line 86, in create module = import_module(entry) File "/usr/lib64/python2.7/importlib/__init__.py", line 37, in import_module __import__(name) File "/tmp/tox-eloi/authentic/py27-coverage-dj18-authentic-pg-/lib/python2.7/site-packages/mellon/__init__.py", line 2, in <module> import lasso ImportError: No module named lasso ERROR: InvocationError for command /tmp/tox-eloi/authentic/py27-coverage-dj18-authentic-pg-/bin/py.test --cov=src --cov-branch --cov-append --cov-report xml --cov-report html tests/ --random-group (exited with code 1) ________________________________________________________________________________________________________________________________________ summary ________________________________________________________________________________________________________________________________________ ERROR: py27-coverage-dj18-authentic-pg-: commands failed
Historique
Mis à jour par Frédéric Péters il y a plus de 4 ans
Par ailleurs, 'lasso' a été renommé 'gnarl' https://github.com/aperezdc/gnarl et donc une correction plus pérènne serait sans doute d'utiliser la dépendance 'gnarl' plutôt que 'lasso'.
C'est vraiment la dépendance lasso qu'il faut, https://git.entrouvert.org/lasso.git/ , c'est avant tout une bibliothèque en C, le script getlasso.sh sert à poser dans tox la version qui aurait été compilée/installée sur le système, la première étape est donc d'avoir cette bibliothèque sur le système, je ne sais pas si ça existe sous forme de paquet pour arch. (côté debian, c'est https://packages.debian.org/buster/python-lasso).
Mis à jour par Éloi Rivard il y a plus de 4 ans
Entendu. Dans ce cas il y a peut-être un problème avec 'getlasso.sh'.
Sur archlinux, la version par défaut de python est python3, donc les appels à python dans 'getlasso.sh' utilisent python 3. J'imagine que c'est python 2 que l'on voudrait si l'on veut éviter ceci :
'/tmp/tox-eloi/authentic/py27-coverage-dj18-authentic-pg-/lib/python2.7/site-packages/lasso.py' -> '/usr/lib/python3.7/site-packages/lasso.py' '/tmp/tox-eloi/authentic/py27-coverage-dj18-authentic-pg-/lib/python2.7/site-packages/_lasso.*' -> '/usr/lib/python3.7/site-packages/_lasso.*'
Je vais tester avec la version de lasso sur entrouvert.org
Mis à jour par Paul Marillonnet il y a plus de 4 ans
Frédéric Péters a écrit :
C'est vraiment la dépendance lasso qu'il faut[…].
Et surtout, il ne s'agit pas du même logiciel (cf https://dev.entrouvert.org/projects/lasso) que le paquet lasso référencé sur PyPI.
Le lasso que nous développons et maintenons gère l'authentification unique (SSO) SAML2 (et n'a donc rien à voir avec la lib de d'annotation de schéma de classes sérialisable disponible sur PyPI).
Mis à jour par Éloi Rivard il y a plus de 4 ans
Ok, je comprends mieux. Pour info il existe un paquet AUR pour Archlinux, mais il a deux ans.
https://aur.archlinux.org/packages/lasso/