mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-08 05:39:13 +00:00
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:
4
.github/workflows/publish.yml
vendored
4
.github/workflows/publish.yml
vendored
@@ -45,6 +45,10 @@ jobs:
|
|||||||
TWINE_USERNAME: __token__
|
TWINE_USERNAME: __token__
|
||||||
TWINE_PASSWORD: ${{ secrets.PYPI_API_KEY }}
|
TWINE_PASSWORD: ${{ secrets.PYPI_API_KEY }}
|
||||||
run: |
|
run: |
|
||||||
|
# Setup Environment for Reproducible Builds
|
||||||
|
export PYTHONHASHSEED=42
|
||||||
|
export SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct
|
||||||
|
|
||||||
rm -rf dist
|
rm -rf dist
|
||||||
python -m build
|
python -m build
|
||||||
twine check dist/*
|
twine check dist/*
|
||||||
|
|||||||
4
.github/workflows/release.yml
vendored
4
.github/workflows/release.yml
vendored
@@ -47,6 +47,10 @@ jobs:
|
|||||||
- name: Package Khoj App
|
- name: Package Khoj App
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
# Setup Environment for Reproducible Builds
|
||||||
|
export PYTHONHASHSEED=42
|
||||||
|
export SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct
|
||||||
|
|
||||||
pyinstaller Khoj.spec
|
pyinstaller Khoj.spec
|
||||||
if [ "$RUNNER_OS" == "Windows" ]; then
|
if [ "$RUNNER_OS" == "Windows" ]; then
|
||||||
mv dist/Khoj.exe dist/khoj_"$GITHUB_REF_NAME"_amd64.exe
|
mv dist/Khoj.exe dist/khoj_"$GITHUB_REF_NAME"_amd64.exe
|
||||||
|
|||||||
2
setup.py
2
setup.py
@@ -36,7 +36,7 @@ setup(
|
|||||||
"jinja2 == 3.1.2",
|
"jinja2 == 3.1.2",
|
||||||
"pyyaml == 6.0",
|
"pyyaml == 6.0",
|
||||||
"pytest == 7.1.2",
|
"pytest == 7.1.2",
|
||||||
"pillow >= 9.0.1",
|
"pillow == 9.2.0",
|
||||||
"aiofiles == 0.8.0",
|
"aiofiles == 0.8.0",
|
||||||
"dateparser == 1.1.1",
|
"dateparser == 1.1.1",
|
||||||
"pyqt6 == 6.3.1",
|
"pyqt6 == 6.3.1",
|
||||||
|
|||||||
Reference in New Issue
Block a user