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
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/
endif
endif
@ -37,11 +37,6 @@ endif
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
build/dist := ${BUILD_DIR}/dist
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): venv/bin/activate $(bundle.js)
@./venv/bin/pyrcc5 -o ${BUILD_DIR}/web-greeter/resources.py\
$(resources.py): $(bundle.js)
@pyrcc5 -o ${BUILD_DIR}/web-greeter/resources.py\
${BUILD_DIR}/web-greeter/resources/resources.qrc
@cp ${resources.py} src/
@echo "✔ Resources compiled with pyrcc5"
@ -209,7 +204,7 @@ $(bin_local/web-greeter): build_install_root $(resources.py) $(bin/screensaver.s
# Useful rules
.PHONY: build
build: venv/bin/activate $(bin_local/web-greeter)
build: $(bin_local/web-greeter)
@echo "✔ Build succeded"
.PHONY: install
@ -247,11 +242,11 @@ uninstall: uninstall_preserve
@echo " web-greeter config was not uninstalled. Remove it manually or use \`make uninstall_all\`:\
\n${config/web-greeter}"
run: venv/bin/activate $(resources.py)
./venv/bin/python3 src
run: $(resources.py)
python3 src
run_debug: venv/bin/activate $(resources.py)
./venv/bin/python3 src --debug
run_debug: $(resources.py)
python3 src --debug
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 |
|**libx11** |libx11 |libx11-dev |libX11-devel |libx11 |libx11-dev |
> Note: web-greeter does not work in Fedora. See #19
### Build dependencies
- rsync
- zip
- make
- pyrcc5 (Should be installed with above dependencies)
- base-devel (build-essential)
@ -85,8 +86,7 @@ cd web-greeter
sudo make install
```
This will build **web-greeter** in a virtal environment, compile some bindings with `gcc` and
package all the files to be installed.
This will build **web-greeter** and package all the files to be installed.
See [latest release][releases].

Loading…
Cancel
Save