Donno if you know anything about Selenium and phantomjs, the django-js-reverse tests are failing around those:
$sudo apt install git-buildpackage$gbp clone https://anonscm.debian.org/git/python-modules/packages/django-js-reverse.git$cd django-js-reverse$gbp buildpackage -uc-us[snip]I: pybuild base:184: cd /build/django-js-reverse-0.7.3/.pybuild/pythonX.Y_2.7/build;python2.7 -m unittest discover -vtests.test_urls (unittest.loader.ModuleImportFailure) ... ERROR======================================================================ERROR: tests.test_urls (unittest.loader.ModuleImportFailure)----------------------------------------------------------------------ImportError: Failed to import test module: tests.test_urlsTraceback (most recent call last): File "/usr/lib/python2.7/unittest/loader.py", line 254, in _find_tests module = self._get_module_from_name(name) File "/usr/lib/python2.7/unittest/loader.py", line 232, in _get_module_from_name __import__(name) File "tests/__init__.py", line 2, in <module> from tests.unit_tests import JSReverseViewTestCaseMinified, JSReverseViewTestCaseNotMinified, \ File "tests/unit_tests.py", line 30, in <module> class AbstractJSReverseTestCase(object): File "tests/unit_tests.py", line 32, in AbstractJSReverseTestCase selenium = WebDriver() File "/usr/lib/python2.7/dist-packages/selenium/webdriver/phantomjs/webdriver.py", line 51, in __init__ self.service.start() File "/usr/lib/python2.7/dist-packages/selenium/webdriver/common/service.py", line 88, in start raise WebDriverException("Can not connect to the Service %s" % self.path)WebDriverException: Message: Can not connect to the Service phantomjs
And the last one for the evening, do you know which lib provides this:
I: pybuild base:184: cd /build/django-hvad-1.8.0/.pybuild/pythonX.Y_3.6/build;python3.6 -m unittest discover -vhvad.contrib.restframework (unittest.loader._FailedTest) ... ERROR======================================================================ERROR: hvad.contrib.restframework (unittest.loader._FailedTest)----------------------------------------------------------------------ImportError: Failed to import test module: hvad.contrib.restframeworkTraceback (most recent call last): File "/usr/lib/python3.6/unittest/loader.py", line 462, in _find_test_path package = self._get_module_from_name(name) File "/usr/lib/python3.6/unittest/loader.py", line 369, in _get_module_from_name __import__(name) File "/build/django-hvad-1.8.0/.pybuild/pythonX.Y_3.6/build/hvad/contrib/restframework/__init__.py", line 1, in <module> from hvad.contrib.restframework.serializers import ( File "/build/django-hvad-1.8.0/.pybuild/pythonX.Y_3.6/build/hvad/contrib/restframework/serializers.py", line 3, in <module> from rest_framework import serializersModuleNotFoundError: No module named 'rest_framework'
Looks like python3-pyqt5.qtwebengine and python3-cryptography (>= 1.4.0) might be hard to backport to Ubunut/xenial LTS. Any flexibility there?
python3-pyqt5.qtwebengine is needed to show repomaker like a local application with a window. You could try to use the PyQt4 equivalent of it and see if repomaker falls back gracefully to Qt4.
python3-cryptography (>= 1.4.0) is required for creating SSH keys if I remember correctly. We could create those differently, but I am not sure it is worth the effort.
WebDriverException: Message: Can not connect to the Service phantomjs
Looks like the tests expect a phantomjs service to be running. Maybe it is easy to set one up?
Looks like django-hvad's tests require Django Rest Framework which does not seem to be packaged nor in Debian.
Arghh... I didn't notice they vendorize code when choosing this library.
However, it looks like it is at least packaged for pypi. Did you try using that instead of their vendorized version?
its easy to create SSH keys, just call ssh-keygen.
if setup.py doesn't set up the tests, then I'll just patch out those tests. Unless you want to write a patch to make setup.py do it.
FYI, python3-tinymce also includes a vendorized/minimized copy of tinymce. The Debian package of that must use the tinymce Debian package, but that's at v3.4.8.
Here's another test setup failure, if you have any ideas:
I: pybuild base:184: cd /build/django-background-tasks-1.1.11/.pybuild/pythonX.Y_2.7/build;python2.7 -m unittest discover -vbackground_task.tests.test_tasks (unittest.loader.ModuleImportFailure) ... ERROR======================================================================ERROR: background_task.tests.test_tasks (unittest.loader.ModuleImportFailure)----------------------------------------------------------------------ImportError: Failed to import test module: background_task.tests.test_tasksTraceback (most recent call last): File "/usr/lib/python2.7/unittest/loader.py", line 254, in _find_tests module = self._get_module_from_name(name) File "/usr/lib/python2.7/unittest/loader.py", line 232, in _get_module_from_name __import__(name) File "background_task/tests/test_tasks.py", line 6, in <module> from django.contrib.auth.models import User File "/usr/lib/python2.7/dist-packages/django/contrib/auth/models.py", line 4, in <module> from django.contrib.auth.base_user import AbstractBaseUser, BaseUserManager File "/usr/lib/python2.7/dist-packages/django/contrib/auth/base_user.py", line 52, in <module> class AbstractBaseUser(models.Model): File "/usr/lib/python2.7/dist-packages/django/contrib/auth/base_user.py", line 53, in AbstractBaseUser password = models.CharField(_('password'), max_length=128) File "/usr/lib/python2.7/dist-packages/django/db/models/fields/__init__.py", line 1061, in __init__ super(CharField, self).__init__(*args, **kwargs) File "/usr/lib/python2.7/dist-packages/django/db/models/fields/__init__.py", line 172, in __init__ self.db_tablespace = db_tablespace or settings.DEFAULT_INDEX_TABLESPACE File "/usr/lib/python2.7/dist-packages/django/conf/__init__.py", line 56, in __getattr__ self._setup(name) File "/usr/lib/python2.7/dist-packages/django/conf/__init__.py", line 39, in _setup % (desc, ENVIRONMENT_VARIABLE))ImproperlyConfigured: Requested setting DEFAULT_INDEX_TABLESPACE, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.
You could try to just use python3-pyqt4. It seems to depend on libqtwebkit4 at least.
its easy to create SSH keys, just call ssh-keygen.
I know it is easy, but if a library that we include anyway provides the same functionality I would always prefer this to calling yet another external process. Less attack surface, no need to check if the external program exists and proper exceptions instead of parsing process results.
Can't you update python-cryptography in trusty?
if setup.py doesn't set up the tests, then I'll just patch out those tests. Unless you want to write a patch to make setup.py do it.
Do you mean repomaker's setup.py? Unfortunately, the django test runner doesn't play well with setuptools. I had briefly looked into it. There are some third-party libraries that can make the connection, but they are rather hacky, so had decided against them for now.
FYI, python3-tinymce also includes a vendorized/minimized copy of tinymce. The Debian package of that must use the tinymce Debian package, but that's at v3.4.8.
We are not using this vendorized copy in repomaker, but install the latest version with npm (like the other web dependencies).
ImproperlyConfigured: Requested setting DEFAULT_INDEX_TABLESPACE, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.
Looks like the same problem that repomaker is having. You are trying to run django tests with setuptools which doesn't work without the proper django initialization magic.
So this is Ubuntu/xenial 16.04 we're talking about. Ubuntu Trusty 14.04 would be a lot more work.
Backporting packages is always possible, e.g. python-cryptography, but each backported package makes it more likely that the PPA will conflict with other uses, since it'll upgrade those packages.
For now, I'll just disable the tests when they fail.
no, I just built the package with dpkg-buildpackage. In order to have
it on the PPA, it'll have to build with all the sources bundled somehow.
The Ubuntu/Debian builders do not allow network access during the build
process. If this is a lot of work, we can stick to your .deb builds for
now, but that won't be in a PPA.
To get it into our PPA, we would just need to bundle the node libs in
the source tarball for Repomaker.
We'll have to ultimately package the node stuff for Debian to get this
into Debian. Given that there were tons and tons of node packages added
to Debian/stretch, I imagine its gotten quite easy to do.
Just depend on this instead of the other Qt5 dependencies for new versions.
To get it into our PPA, we would just need to bundle the node libs in
the source tarball for Repomaker.
Yes, this is what the pre-release script is doing among other things. Essentially it creates this repomaker-static package as expected by the installed application.
The Ubuntu/Debian builders do not allow network access during the build process.
If I understood you correctly, the ppa builders do not have this restriction, right?
When uploading repomaker to pypi, I was planning on including the repomaker-static module in the upload, so it is ready to be used without needing npm, etc.
We'll have to ultimately package the node stuff for Debian to get this
into Debian. Given that there were tons and tons of node packages added
to Debian/stretch, I imagine its gotten quite easy to do.