Commit Graph

26 Commits

Author SHA1 Message Date
Markus Heiser
38b39ef0ae [fix] re-add 'pip-exe' target - partial revert 9b48ae47
Target pip-exe is a prerequisite of the targets:

  - pyinstall
  - pyuninstall

and was accidentally deleted in commit 9b48ae47.

HINT:
  do not confuse pyinstall with penvinstall

pyinstall & pyuninstall
    Installing into user's HOME using pip from OS,
    therefore the message is needed.

pyenvinstall & pyenvuninstall
    Installing into virtualenv (./local) using pip which is provided by
    prerequisite 'pyenv' in the virtualenv.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-02-01 16:58:04 +01:00
Alexandre Flament
d70c5a621a [mod] more robust make pyenv / make pyenvinstall
"make pyenv" ensures that ./local/py3/bin/python is an executable
2021-02-01 16:58:04 +01:00
Markus Heiser
dc544498d0 [mod] add target upload-pypi-test https://test.pypi.org/
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2021-01-10 17:05:37 +01:00
Markus Heiser
af584f2c40 [perf] pylint: Use multiple processes to speed up Pylint.
Specifying '-j 0' will auto-detect the number of processors available to use.

Suggested-by: @dalf / https://github.com/searx/searx/pull/2421#issuecomment-751444257
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2020-12-27 12:04:39 +01:00
Markus Heiser
6316a8d49a [fix] message to install different python versions from apt PPA
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2020-12-24 23:17:21 +01:00
Markus Heiser
809bf85426 [perf] pyenvinstall: reinstall only when requirements are change
Create a (PY_ENV)/requirements.sha256 file with sha256 sums of the
./requirements*.txt files and reinstall only if the sha256 sums change.

Suggested-by: @dalf / https://github.com/searx/searx/pull/2418#pullrequestreview-558426579
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2020-12-24 16:25:09 +01:00
Markus Heiser
d85012b49b [perf] virtualenv: install boilerplate only once
Install boilerplate packages (pip, wheel, setuptools and requirements.txt) only
once, when virtualenv is created.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2020-12-24 15:59:57 +01:00
Markus Heiser
af49bd2bd2 [fix] makefile.python: remove duplicate pyenv-(un)install targets
Makefile targets 'pyenv-install' and 'pyenv-uninstall' are unused duplicates of
'pyenvinstall' and 'pyenvuninstall'.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2020-12-24 09:18:22 +01:00
Markus Heiser
1a4524e03c [mod] remove obsolete virtualenv command
Installation and use of the command 'virtualenv' was only needed in py2 and py2
is no longer suported by searx.  In py3 the command is replaced by 'python -m
venv'.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2020-12-18 22:31:13 +01:00
Alexandre Flament
38d32337e7 [mod] documentations & comments: update http://* URL to https://*.
About http://lesscss.org see https://github.com/less/less-docs/issues/520
2020-12-04 16:52:25 +01:00
Dalf
1022228d95 Drop Python 2 (1/n): remove unicode string and url_utils 2020-09-10 10:39:04 +02:00
Markus Heiser
f32b4fcedd LXC: add virtualenv to LXC_BASE_PACKAGES
Commit 09a40625 adds virtualenv dependency.  BTW remove deprecated
--no-site-packages.  Not having access to global site-packages is now the
default behavior.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2020-04-02 20:27:44 +02:00
Markus Heiser
2441e24288 Merge branch 'master' of https://github.com/asciimoo/searx into filtron 2020-04-02 18:59:43 +02:00
Markus Heiser
09a4062505 makefile.python: partial revert off 9b48ae47, adds py2 support back
revert "makefile.python: ... drop build support py2" to get back Py2 support.
TPy2 support need virtualenv installed by the OS.

BTW: log environment and python version in travis's install phase

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2020-04-01 17:21:26 +02:00
Markus Heiser
31437d04e8 makefile.python: hardening - start pylint by module
- replace: $(PY_ENV_BIN)/pylint --> $(PY_ENV_BIN)/python -m pylint

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2020-04-01 16:07:59 +02:00
Markus Heiser
9b48ae47ec makefile.python: hardening - drop virtualenv, drop build support py2
From py3.3 on a subset of virtualenv is built-in, so you can run '-m venv' ot of
the box.

- replace: $(PY_ENV_BIN)/pip --> $(PY_ENV_BIN)/python -m pip
- remove obsolete virtualenv-exe target and adjust VTENV_OPTS
- remove obsolete msg-pip-exe target
- print list of py launchers available from $(PY_ENV_BIN) to the log
- fix hard coded ./local

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2020-04-01 14:16:49 +02:00
Markus Heiser
3bbcfe6ab3 travis: make travis build more verbose
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2020-04-01 11:57:48 +02:00
Markus Heiser
6007bd7fc8 makefile.python: fix (old) typo
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2020-04-01 10:59:51 +02:00
Markus Heiser
5e2b161379 Makefile: marginal fix
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2020-03-29 16:46:07 +02:00
Markus Heiser
baf1ffd1fa LXC: set LXC_ENV_FOLDER=lxc/$(shell hostname)/
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2020-03-23 18:05:46 +01:00
Markus Heiser
86e79488aa LXC: utils/makefile.lxc (inital) add /.lxcenv.mk to contaiiners
Get LXC environment when building make targets.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2020-03-15 17:01:36 +01:00
Markus Heiser
80f7b65804 searx.sh: add buildhost cmd, installs OS packages for builds
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2020-03-09 01:37:26 +01:00
Markus Heiser
04ad648105 makefile.python: remove python2 support
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2020-03-08 18:35:38 +01:00
Markus Heiser
a014fa0ccd upload-pypi: twine is needed to upload to PyPi 'make upload-pypi'
To build & deploy packages on PyPi call make target:

  make upload-pypi

- https://github.com/asciimoo/searx/issues/1829

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2020-02-05 15:26:57 +01:00
Markus Heiser
ef85943e06 Makefile: add documentation build targets docs & docs-live
BTW:
- add build & dist folder to .gitignore
- justify indentation of build messages (makefile.python)

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2019-12-12 12:10:32 +01:00
Markus Heiser
b55a8004ed boilerplate: add inital Makefile with run & install targets
Add *Makefile* boilerplate useful for python projects.  All python tasks are
using a virtualenv from ./local/py3

$ make help
  run       - run developer instance
  install   - developer install (./local)
  uninstall - uninstall (./local)

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2019-11-28 19:54:57 +01:00