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..e6f1d8f4 100644 --- a/Makefile +++ b/Makefile @@ -14,7 +14,7 @@ all: install ## Alias for install install: virtualenv $(INSTALL_STAMP) ## Install dependencies $(INSTALL_STAMP): $(VENV)/bin/pip install -U pip - $(VENV)/bin/pip install -r requirements.txt + $(VENV)/bin/pip install -e . touch $(INSTALL_STAMP) .PHONY: virtualenv @@ -24,8 +24,8 @@ $(PYTHON): .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 +$(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/dev-requirements.txt b/dev-requirements.txt deleted file mode 100644 index e198b7b8..00000000 --- a/dev-requirements.txt +++ /dev/null @@ -1,6 +0,0 @@ -zest.releaser -tox -pytest -flake8 -Flask-Testing -mock; python_version < '3.3' diff --git a/docs/contributing.rst b/docs/contributing.rst index 0ca1da50..f5058999 100644 --- a/docs/contributing.rst +++ b/docs/contributing.rst @@ -23,10 +23,9 @@ 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:: @@ -156,11 +155,7 @@ In order to prepare a new release, we are following the following steps: - Merge remaining pull requests; - Update :file:`CHANGELOG.rst` with the last changes; - Update :file:`CONTRIBUTORS`; -- Update known good versions of dependencies in ``requirements.txt`` with this - command (from inside the venv):: - - make build-requirements - +- Update known good versions of dependencies in ``setup.py``; - If needed, recompress assets. It requires zopflipng:: make compress-assets diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index a4c66274..00000000 --- a/requirements.txt +++ /dev/null @@ -1,27 +0,0 @@ -alembic==1.1.0 -aniso8601==8.0.0 -Babel==2.7.0 -blinker==1.4 -Click==7.0 -dnspython==1.16.0 -email-validator==1.0.4 -Flask==1.1.1 -Flask-Babel==0.12.2 -Flask-Cors==3.0.8 -Flask-Mail==0.9.1 -Flask-Migrate==2.5.2 -Flask-RESTful==0.3.7 -Flask-Script==2.0.6 -Flask-SQLAlchemy==2.4.0 -Flask-WTF==0.14.2 -idna==2.8 -itsdangerous==1.1.0 -Jinja2==2.10.1 -Mako==1.1.0 -MarkupSafe==1.1.1 -python-dateutil==2.8.0 -pytz==2019.2 -six==1.12.0 -SQLAlchemy==1.3.8 -Werkzeug==0.15.6 -WTForms==2.2.1 diff --git a/setup.py b/setup.py index a2a5a6df..9f34708d 100644 --- a/setup.py +++ b/setup.py @@ -56,18 +56,27 @@ setup(name='ihatemoney', include_package_data=True, zip_safe=False, install_requires=[ - "flask", - "flask-wtf", - "flask-sqlalchemy<3.0", - "flask-mail", - "Flask-Migrate", - "Flask-script", - "flask-babel", - "flask-restful", - "jinja2", - "blinker", - "flask-cors", - "six", - "itsdangerous", - "email_validator"], + "blinker==1.4", + "email-validator==1.0.4", + "Flask==1.1.1", + "Flask-Babel==0.12.2", + "Flask-Cors==3.0.8", + "Flask-Mail==0.9.1", + "Flask-Migrate==2.5.2", + "Flask-RESTful==0.3.7", + "Flask-Script==2.0.6", + "Flask-SQLAlchemy==2.4.0", + "Flask-WTF==0.14.2", + "itsdangerous==1.1.0", + "Jinja2==2.10.1", + "six==1.12.0", + ], + extras_require={"dev": [ + "zest.releaser", + "tox", + "pytest", + "flake8", + "Flask-Testing", + "mock; python_version < '3.3'" + ]}, entry_points=ENTRY_POINTS) diff --git a/tox.ini b/tox.ini index e13fa190..ab05ff6e 100644 --- a/tox.ini +++ b/tox.ini @@ -9,8 +9,7 @@ commands = py.test --pyargs ihatemoney.tests.tests deps = - -rdev-requirements.txt - -rrequirements.txt + -e.[dev] # To be sure we are importing ihatemoney pkg from pip-installed version changedir = /tmp @@ -23,8 +22,6 @@ changedir = {toxinidir} [testenv:lint] commands = flake8 ihatemoney -deps = - -rdev-requirements.txt changedir = {toxinidir} [flake8]