celery / django-celery-results

Celery result back end with django
Other
668 stars 206 forks source link

Building docs fails with Sphinx 7.2 and SOURCE_DATE_EPOCH environment variable #412

Open s3v- opened 8 months ago

s3v- commented 8 months ago

Hi, Currently your package fails to build from source in Debian with Sphinx 7.2: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1042693 The failure is caused by SOURCE_DATE_EPOCH environment variable added during build in Debian. Please see here and here for reference.

Step to reproduce:

$ export SOURCE_DATE_EPOCH=1699613320; sphinx-build -b html python-django-celery-results-2.5.1/docs/ .

Running Sphinx v7.2.6
WARNING: html_static_path entry '_static' is placed inside outdir

Extension error (sphinx.config):
Handler <function correct_copyright_year at 0x7f6891a0cae0> for event 'config-inited' threw an exception (exception: string index out of range)

Offending line: https://github.com/celery/django-celery-results/blob/cb9448976bc51865922319c91b6c2218859ba80d/docs/conf.py#L13

This change solves the issue:

copyright='2009-2022, something',

Kind Regards