Replace requirements.txt with extras_require

This commit is contained in:
Hugo van Kemenade 2022-02-19 15:39:37 +02:00
parent 14b9b597ff
commit b14aa51037
5 changed files with 24 additions and 30 deletions

View File

@ -39,7 +39,6 @@ help:
@echo " inplace make inplace extension" @echo " inplace make inplace extension"
@echo " install make and install" @echo " install make and install"
@echo " install-coverage make and install with C coverage" @echo " install-coverage make and install with C coverage"
@echo " install-req install documentation and test dependencies"
@echo " install-venv (deprecated) install in virtualenv" @echo " install-venv (deprecated) install in virtualenv"
@echo " lint run the lint checks" @echo " lint run the lint checks"
@echo " lint-fix run black and isort to (mostly) fix lint issues." @echo " lint-fix run black and isort to (mostly) fix lint issues."
@ -70,20 +69,14 @@ debug:
make clean > /dev/null make clean > /dev/null
CFLAGS='-g -O0' python3 -m pip install --global-option="build_ext" . > /dev/null CFLAGS='-g -O0' python3 -m pip install --global-option="build_ext" . > /dev/null
.PHONY: install-req
install-req:
python3 -m pip install -r requirements.txt
.PHONY: install-venv .PHONY: install-venv
install-venv: install-venv:
echo "'install-venv' is deprecated and will be removed in a future Pillow release" echo "'install-venv' is deprecated and will be removed in a future Pillow release"
virtualenv . virtualenv .
bin/pip install -r requirements.txt
.PHONY: release-test .PHONY: release-test
release-test: release-test:
$(MAKE) install-req python3 -m pip install -e .[tests]
python3 -m pip install -e .
python3 selftest.py python3 selftest.py
python3 -m pytest Tests python3 -m pytest Tests
python3 -m pip install . python3 -m pip install .

View File

@ -53,7 +53,7 @@ Then ``sudo apt-get update && sudo apt-get install libtiff5-dbgsym``
virtualenv -p python3.8-dbg ~/vpy38-dbg virtualenv -p python3.8-dbg ~/vpy38-dbg
source ~/vpy38-dbg/bin/activate source ~/vpy38-dbg/bin/activate
cd ~/Pillow && pip install -r requirements.txt && make install cd ~/Pillow && make install
Test Case Test Case
--------- ---------

View File

@ -1,18 +0,0 @@
# Development, documentation & testing requirements.
black
check-manifest
coverage
defusedxml
markdown2
olefile
packaging
pyroma
pytest
pytest-cov
pytest-timeout
sphinx>=2.4
sphinx-copybutton
sphinx-issues>=3.0.1
sphinx-removed-in
sphinx-rtd-theme>=1.0
sphinxext-opengraph

View File

@ -35,6 +35,26 @@ project_urls =
[options] [options]
python_requires = >=3.7 python_requires = >=3.7
[options.extras_require]
docs =
sphinx>=2.4
sphinx-copybutton
sphinx-issues>=3.0.1
sphinx-removed-in
sphinx-rtd-theme>=1.0
sphinxext-opengraph
tests =
check-manifest
coverage
defusedxml
markdown2
olefile
packaging
pyroma
pytest
pytest-cov
pytest-timeout
[flake8] [flake8]
extend-ignore = E203 extend-ignore = E203
max-line-length = 88 max-line-length = 88

View File

@ -10,6 +10,8 @@ envlist =
minversion = 1.9 minversion = 1.9
[testenv] [testenv]
extras =
tests
commands = commands =
make clean make clean
{envpython} -m pip install --global-option="build_ext" --global-option="--inplace" . {envpython} -m pip install --global-option="build_ext" --global-option="--inplace" .
@ -18,9 +20,6 @@ commands =
deps = deps =
cffi cffi
numpy numpy
olefile
pyroma
pytest
[testenv:lint] [testenv:lint]
commands = commands =