Add bytecode cleanup to postinst before building wheel
Remove stale .pyc files and __pycache__ directories before installing the sensorpajen package to ensure Python rebuilds bytecode fresh. This should prevent cached bytecode issues from old syntax errors.
This commit is contained in:
3
debian/postinst
vendored
3
debian/postinst
vendored
@@ -64,6 +64,9 @@ case "$1" in
|
||||
# Install sensorpajen package itself
|
||||
echo "Installing sensorpajen application..."
|
||||
cd /opt/sensorpajen
|
||||
# Clean up any stale bytecode before building wheel
|
||||
find . -name "*.pyc" -delete
|
||||
find . -name "__pycache__" -type d -delete
|
||||
venv/bin/pip install --no-deps . || {
|
||||
echo "Error: Failed to install sensorpajen package"
|
||||
exit 1
|
||||
|
||||
3
debian/sensorpajen/DEBIAN/postinst
vendored
3
debian/sensorpajen/DEBIAN/postinst
vendored
@@ -64,6 +64,9 @@ case "$1" in
|
||||
# Install sensorpajen package itself
|
||||
echo "Installing sensorpajen application..."
|
||||
cd /opt/sensorpajen
|
||||
# Clean up any stale bytecode before building wheel
|
||||
find . -name "*.pyc" -delete
|
||||
find . -name "__pycache__" -type d -delete
|
||||
venv/bin/pip install --no-deps . || {
|
||||
echo "Error: Failed to install sensorpajen package"
|
||||
exit 1
|
||||
|
||||
Reference in New Issue
Block a user