Removed the qt/Makefile INSTALL_PYAUDIO variable and

created the Makefile SYSTEM_PACKAGES updating README.development
This commit is contained in:
evandrocoan 2020-02-25 20:46:54 -03:00
parent 14a86273c4
commit d88e5eb308
3 changed files with 10 additions and 11 deletions

View file

@ -3,9 +3,11 @@ SHELL := /bin/bash
ifeq ($(OS),Windows_NT) ifeq ($(OS),Windows_NT)
PYTHON_BIN := python PYTHON_BIN := python
ACTIVATE_SCRIPT := pyenv/Scripts/activate ACTIVATE_SCRIPT := pyenv/Scripts/activate
SYSTEM_PACKAGES := sed -iv -- "s/include-system-site-packages\s*=\s*false/include-system-site-packages = true/g" pyenv/pyvenv.cfg
else else
PYTHON_BIN := python3 PYTHON_BIN := python3
ACTIVATE_SCRIPT := pyenv/bin/activate ACTIVATE_SCRIPT := pyenv/bin/activate
SYSTEM_PACKAGES := echo Skipping Windows Pythons system packages inheritance activation...
endif endif
.SHELLFLAGS := -eu -o pipefail -c .SHELLFLAGS := -eu -o pipefail -c
@ -28,6 +30,7 @@ all: run
# - add qt if missing # - add qt if missing
pyenv: pyenv:
"${PYTHON_BIN}" -m venv pyenv && \ "${PYTHON_BIN}" -m venv pyenv && \
${SYSTEM_PACKAGES} && \
. "${ACTIVATE_SCRIPT}" && \ . "${ACTIVATE_SCRIPT}" && \
python --version && \ python --version && \
python -m pip install --upgrade pip setuptools && \ python -m pip install --upgrade pip setuptools && \

View file

@ -88,11 +88,14 @@ Windows users (using Visual Studio)
The problem with the `/usr/bin/` is that it should not exists. Cygwin should map/mount `/bin/` The problem with the `/usr/bin/` is that it should not exists. Cygwin should map/mount `/bin/`
into `/usr/bin/`, i.e., they should be the same directory. into `/usr/bin/`, i.e., they should be the same directory.
1. Download and install Python for Windows (not from Cygwin) and put `python.exe` (not `python3.exe`) on your system path. 1. Download and install Python for Windows (not from Cygwin) and put `python.exe` (not `python3.exe`) on your system path.
1. Download and install pip for your Windows Python. 1. Download and install pip for your Windows Python (`python -m ensurepip`).
1. Download and install rust (compiler), npm, git and put them your system path. 1. Download and install rust (compiler), npm, git and put them your system path.
1. Download and install the pyaudio wheel from: https://www.lfd.uci.edu/~gohlke/pythonlibs/#pyaudio
1. After download the file for your Python version, you can install it using a command like
`python -m pip install PyAudio0.2.11cp38cp38win_amd64.whl`
1. If got an error from pip trying to build the `pyaudio` library,
or there is not a wheel available for your Python version, you can built it from the source
following the installation instructions on: https://github.com/evandroforks/pyaudio
1. Open a `cmd.exe` (command prompt) on the anki repository and run the command `sh run` 1. Open a `cmd.exe` (command prompt) on the anki repository and run the command `sh run`
1. Do not use `bash run` because it my call for Windows Subsystem for Linux 1. Do not use `bash run` because it my call for Windows Subsystem for Linux
1. Do not use any Cygwin terminal as `mintty.exe` because the `rust lang` compiler does not work with them 1. Do not use any Cygwin terminal as `mintty.exe` because the `rust lang` compiler does not work with them
1. If got an error from pip trying to build the `pyaudio` library,
follow the installation instructions from: https://github.com/evandroforks/pyaudio
and install the `portaudio.lib` on your system.

View file

@ -1,12 +1,6 @@
SHELL := /bin/bash SHELL := /bin/bash
FIND := $(if $(wildcard /bin/find),/bin/find,/usr/bin/find) FIND := $(if $(wildcard /bin/find),/bin/find,/usr/bin/find)
ifeq ($(OS),Windows_NT)
INSTALL_PYAUDIO := python -m pip install git+https://github.com/evandroforks/pyaudio
else
INSTALL_PYAUDIO := @echo Skipping pyaudio for Windows...
endif
.SHELLFLAGS := -eu -o pipefail -c .SHELLFLAGS := -eu -o pipefail -c
.DELETE_ON_ERROR: .DELETE_ON_ERROR:
MAKEFLAGS += --warn-undefined-variables MAKEFLAGS += --warn-undefined-variables
@ -22,7 +16,6 @@ PHONY: all
all: check all: check
.build/run-deps: setup.py .build/run-deps: setup.py
${INSTALL_PYAUDIO}
python -m pip install -e . python -m pip install -e .
@touch $@ @touch $@