Set Pyinstaller, Pip environment to create reproducible builds of Khoj

- Dependency Version Pinning
  - First level dependency versions have been pinned.
  - Transitive dependencies have not been specified yet

- Testing
  - The Pyinstaller build has been only minimally tested for reproducibility
  - The Khoj package generated for PyPi have not been tested for reproducibility

- References
  - https://reproducible-builds.org/docs/source-date-epoch/
  - https://pyinstaller.org/en/stable/advanced-topics.html#creating-a-reproducible-build
This commit is contained in:
Debanjum Singh Solanky
2022-08-17 19:53:44 +03:00
parent f821b614ab
commit 5a20283202
3 changed files with 9 additions and 1 deletions

View File

@@ -45,6 +45,10 @@ jobs:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_KEY }}
run: |
# Setup Environment for Reproducible Builds
export PYTHONHASHSEED=42
export SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct
rm -rf dist
python -m build
twine check dist/*