From 4ac476fbb3a76a4a1f0e30b9a61dc9587252f792 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20HUBSCHER?= Date: Tue, 21 Apr 2020 10:08:48 +0200 Subject: [PATCH] Cleanup Makefile. --- .travis.yml | 1 + CHANGELOG.rst | 2 +- MANIFEST.in | 2 +- Makefile | 19 ++++++------------- docs/contributing.rst | 6 ++---- setup.cfg | 1 - tox.ini | 1 + 7 files changed, 12 insertions(+), 20 deletions(-) diff --git a/.travis.yml b/.travis.yml index c18d65f8..b3753ea0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,6 +4,7 @@ python: - "3.5" - "3.6" - "3.7" + - "3.8" script: tox install: - pip install tox-travis diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 76831ccb..e4ecb923 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -9,7 +9,7 @@ This document describes changes between each past release. - Add support for espanol latino america (es_419) - Use the external debts lib to solve settlements (#476) - Remove balance column in statistics view (#323) - +- Remove requirements files in favor of setup.cfg pinning (#558) 4.1.3 (2019-09-18) ================== diff --git a/MANIFEST.in b/MANIFEST.in index 74ea23b1..d47086be 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,3 +1,3 @@ include *.rst recursive-include ihatemoney *.rst *.py *.yaml *.po *.mo *.html *.css *.js *.eot *.svg *.woff *.txt *.png *.ini *.cfg *.j2 -include LICENSE CONTRIBUTORS CHANGELOG.rst requirements.txt +include LICENSE CONTRIBUTORS CHANGELOG.rst diff --git a/Makefile b/Makefile index 42b0e263..ae9e46c1 100644 --- a/Makefile +++ b/Makefile @@ -11,10 +11,10 @@ ZOPFLIPNG := zopflipng .PHONY: all all: install ## Alias for install .PHONY: install -install: virtualenv $(INSTALL_STAMP) ## Install dependencies -$(INSTALL_STAMP): +install: setup.cfg $(INSTALL_STAMP) ## Install dependencies +$(INSTALL_STAMP): virtualenv $(VENV)/bin/pip install -U pip - $(VENV)/bin/pip install -r requirements.txt + $(VENV)/bin/pip install -e . touch $(INSTALL_STAMP) .PHONY: virtualenv @@ -23,9 +23,9 @@ $(PYTHON): $(VIRTUALENV) $(VENV) .PHONY: install-dev -install-dev: $(INSTALL_STAMP) $(DEV_STAMP) ## Install development dependencies -$(DEV_STAMP): $(PYTHON) dev-requirements.txt - $(VENV)/bin/pip install -Ur dev-requirements.txt +install-dev: setup.cfg $(INSTALL_STAMP) $(DEV_STAMP) ## Install development dependencies +$(DEV_STAMP): $(PYTHON) + $(VENV)/bin/pip install -Ue .[dev] touch $(DEV_STAMP) .PHONY: remove-install-stamp @@ -76,13 +76,6 @@ create-empty-database-revision: ## Create an empty database revision @read -p "Please enter a message describing this revision: " rev_message; \ $(PYTHON) -m ihatemoney.manage db revision -d ihatemoney/migrations -m "$${rev_message}" -.PHONY: build-requirements -build-requirements: ## Save currently installed packages to requirements.txt - $(VIRTUALENV) $(TEMPDIR) - $(TEMPDIR)/bin/pip install -U pip - $(TEMPDIR)/bin/pip install -Ue "." - $(TEMPDIR)/bin/pip freeze | grep -v -- '-e' > requirements.txt - .PHONY: clean clean: ## Destroy the virtual environment rm -rf .venv diff --git a/docs/contributing.rst b/docs/contributing.rst index b053f8b6..5cff063b 100644 --- a/docs/contributing.rst +++ b/docs/contributing.rst @@ -2,7 +2,7 @@ Contributing ############ Set up a dev environment -======================= +======================== You must develop on top of the Git master branch:: @@ -23,10 +23,8 @@ install dependencies, and run the test server. The hard way ------------ -Alternatively, you can also use the `requirements.txt` file to install the -dependencies yourself. That would be:: +Alternatively, you can use pip to install dependencies yourself. That would be:: - pip install -r requirements.txt pip install -e . And then run the application:: diff --git a/setup.cfg b/setup.cfg index 10fef113..180eabff 100644 --- a/setup.cfg +++ b/setup.cfg @@ -41,7 +41,6 @@ install_requires = [options.extras_require] dev = - black==19.10b0 flake8==3.7.9 Flask-Testing==0.8.0 pytest==5.4.1 diff --git a/tox.ini b/tox.ini index b5ff7055..0db58d31 100644 --- a/tox.ini +++ b/tox.ini @@ -22,6 +22,7 @@ changedir = {toxinidir} [testenv:black] commands = black --check --target-version=py34 . +deps = black changedir = {toxinidir} [testenv:flake8]