Browse Source

Python venv not needed

sisyphus
JezerM 3 years ago
parent
commit
34547846f8
No known key found for this signature in database
GPG Key ID: 66BBC5D01388C6B5
  1. 23
      Makefile
  2. 6
      README.md

23
Makefile

@ -17,7 +17,7 @@ ifeq (${ENABLE_BASH_COMPLETION}, true)
endif endif
ifeq (${ENABLE_ZSH_COMPLETION}, true) ifeq (${ENABLE_ZSH_COMPLETION}, true)
ifeq ($(shell which zsh 2>/dev/null 1>&2 && echo 0), 0) ifeq ($(shell which zsh >/dev/null 2>&1 && echo 0), 0)
zshcompletiondir := /usr/share/zsh/site-functions/ zshcompletiondir := /usr/share/zsh/site-functions/
endif endif
endif endif
@ -37,11 +37,6 @@ endif
all: build all: build
# Virtual Environment
venv/bin/activate: requirements.txt
python3 -m venv venv
./venv/bin/pip install -r requirements.txt
# Dist and web-greeter directories # Dist and web-greeter directories
build/dist := ${BUILD_DIR}/dist build/dist := ${BUILD_DIR}/dist
build/web-greeter := ${BUILD_DIR}/web-greeter build/web-greeter := ${BUILD_DIR}/web-greeter
@ -66,8 +61,8 @@ $(bundle.js): $(build/web-greeter)
resources.py := ${BUILD_DIR}/web-greeter/resources.py resources.py := ${BUILD_DIR}/web-greeter/resources.py
$(resources.py): venv/bin/activate $(bundle.js) $(resources.py): $(bundle.js)
@./venv/bin/pyrcc5 -o ${BUILD_DIR}/web-greeter/resources.py\ @pyrcc5 -o ${BUILD_DIR}/web-greeter/resources.py\
${BUILD_DIR}/web-greeter/resources/resources.qrc ${BUILD_DIR}/web-greeter/resources/resources.qrc
@cp ${resources.py} src/ @cp ${resources.py} src/
@echo "✔ Resources compiled with pyrcc5" @echo "✔ Resources compiled with pyrcc5"
@ -209,7 +204,7 @@ $(bin_local/web-greeter): build_install_root $(resources.py) $(bin/screensaver.s
# Useful rules # Useful rules
.PHONY: build .PHONY: build
build: venv/bin/activate $(bin_local/web-greeter) build: $(bin_local/web-greeter)
@echo "✔ Build succeded" @echo "✔ Build succeded"
.PHONY: install .PHONY: install
@ -247,11 +242,11 @@ uninstall: uninstall_preserve
@echo " web-greeter config was not uninstalled. Remove it manually or use \`make uninstall_all\`:\ @echo " web-greeter config was not uninstalled. Remove it manually or use \`make uninstall_all\`:\
\n${config/web-greeter}" \n${config/web-greeter}"
run: venv/bin/activate $(resources.py) run: $(resources.py)
./venv/bin/python3 src python3 src
run_debug: venv/bin/activate $(resources.py) run_debug: $(resources.py)
./venv/bin/python3 src --debug python3 src --debug
clean: clean:
rm -rf venv ${INSTALL_ROOT} ${BUILD_DIR}/dist ${BUILD_DIR}/web-greeter rm -rf ${INSTALL_ROOT} ${BUILD_DIR}/dist ${BUILD_DIR}/web-greeter

6
README.md

@ -54,10 +54,11 @@ apt install ./web-greeter-VER.deb
|**libxcb** |libxcb |libxcb1-dev |libxcb-devel |libxcb |libxcb1-dev | |**libxcb** |libxcb |libxcb1-dev |libxcb-devel |libxcb |libxcb1-dev |
|**libx11** |libx11 |libx11-dev |libX11-devel |libx11 |libx11-dev | |**libx11** |libx11 |libx11-dev |libX11-devel |libx11 |libx11-dev |
> Note: web-greeter does not work in Fedora. See #19
### Build dependencies ### Build dependencies
- rsync - rsync
- zip
- make - make
- pyrcc5 (Should be installed with above dependencies) - pyrcc5 (Should be installed with above dependencies)
- base-devel (build-essential) - base-devel (build-essential)
@ -85,8 +86,7 @@ cd web-greeter
sudo make install sudo make install
``` ```
This will build **web-greeter** in a virtal environment, compile some bindings with `gcc` and This will build **web-greeter** and package all the files to be installed.
package all the files to be installed.
See [latest release][releases]. See [latest release][releases].

Loading…
Cancel
Save