Closed david-venhoff closed 9 months ago
Hmm, this is definitely weird, I cannot reproduce this issue despite the fact that I don't have django
installed globally. And also when I remove django
in my venv before installing django-linkcheck
, the setup command installs it again before compiling the translation file.
My Python version is 3.11.6
and setuptools version is 69.0.3
.
The problem seems to exist on environments where django
is not yet installed locally and the package wheel has to be built before the package can be installed.
This is due to the normal workflow of pip when executing pip install django-linkcheck
:
Since step 4 comes after 3, django-admin
is not yet available when the wheel file is supposed to be built.
So one option would be to install django
manually before calling the subprocess, but I think the more robust and elegant solution would be to build the wheel on the maintainer's machine and upload it to PyPI as well. Apart from the error, it also has the advantage to speed up installations in general, because the intermediary step of generating the wheel is no longer necessary on the end user's machine.
@claudep Would you be open to this idea and upload the wheel for version 2.3.0
as well?
I just uploaded the wheel version. Is it OK now?
@claudep awesome, thanks for the quick reply! :pray: Yes, this fixed our issues!
When trying to install django-linkcheck on CI, the following error shows up:
So it seems like
django-admin
does not get installed correctly or in time. Installation usually works locally, because people often have django already installed previously (Which sets up thedjango-admin
command). This issue only happens in version 2.3 ofdjango-linkcheck
and is probably related to this commit: https://github.com/DjangoAdminHackers/django-linkcheck/commit/6a60a2489fb5c66dec1c93879ebd644f5e7e8bec