scott-griffiths / bitstring

A Python module to help you manage your bits
https://bitstring.readthedocs.io/en/stable/index.html
MIT License
404 stars 68 forks source link

Make the build reproducible #269

Closed lamby closed 1 year ago

lamby commented 1 year ago

Whilst working on the Reproducible Builds effort in Debian, I noticed that bitstring could not be built reproducibly.

This was because the documentation used the build year in the documentation:

│ │ │ ├── ./usr/share/doc/python-bitstring-doc/html/bitarray.html
│ │ │ │ @@ -973,11 +973,11 @@
│ │ │ │               >previous</a> |</li>
│ │ │ │          <li class="nav-item nav-item-0"><a href="index.html">bitstring 4.0 documentation</a> &#187;</li>
│ │ │ │            <li class="nav-item nav-item-1"><a href="reference.html" >Reference</a> &#187;</li>
│ │ │ │          <li class="nav-item nav-item-this"><a href="">BitArray Class</a></li>
│ │ │ │        </ul>
│ │ │ │      </div>
│ │ │ │      <div class="footer" role="contentinfo">
│ │ │ │ -        &#169; Copyright 2023 - 2023, Scott Griffiths.
│ │ │ │ +        &#169; Copyright 2023 - 2024, Scott Griffiths.
│ │ │ │      </div>
│ │ │ │    </body>
│ │ │ │  </html>

This patch bases this value on the SOURCE_DATE_EPOCH environment variable (if available). I originally filed this in Debian as bug #1039932.

scott-griffiths commented 1 year ago

Looks fine to me. Thanks.