diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 879d1c61c..292dcd86f 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -105,6 +105,10 @@ You may have noticed we have a `Makefile` and a `make.bat` in the top-level dire 3. `make newenv`: Set up a new virtual environment in the `.venv` subdirectory, and install Red and its dependencies. If one already exists, it is cleared out and replaced. 4. `make syncenv`: Sync your environment with Red's latest dependencies. +The other make recipes are most likely for project maintainers rather than contributors. + +You can specify the Python executable used in the make recipes with the `PYTHON` environment variable, e.g. `make PYTHON=/usr/bin/python3.7 newenv`. + ### 4.5 Keeping your dependencies up to date Whenever you pull from upstream (V3/develop on the main repository) and you notice either of the files `setup.cfg` or `tools/dev-requirements.txt` have been changed, it can often mean some package dependencies have been updated, added or removed. To make sure you're testing and formatting with the most up-to-date versions of our dependencies, run `make syncenv`. You could also simply do `make newenv` to install them to a clean new virtual environment. diff --git a/Makefile b/Makefile index c6f92b713..7ae79fedd 100644 --- a/Makefile +++ b/Makefile @@ -1,12 +1,14 @@ +PYTHON ?= python3.7 + # Python Code Style reformat: - black -l 99 --target-version py37 `git ls-files "*.py"` + $(PYTHON) -m black -l 99 --target-version py37 `git ls-files "*.py"` stylecheck: - black --check -l 99 --target-version py37 `git ls-files "*.py"` + $(PYTHON) -m black --check -l 99 --target-version py37 `git ls-files "*.py"` # Translations gettext: - redgettext --command-docstrings --verbose --recursive redbot --exclude-files "redbot/pytest/**/*" + $(PYTHON) -m redgettext --command-docstrings --verbose --recursive redbot --exclude-files "redbot/pytest/**/*" upload_translations: $(MAKE) gettext crowdin upload sources @@ -15,11 +17,11 @@ download_translations: # Dependencies bumpdeps: - python tools/bumpdeps.py + $(PYTHON) tools/bumpdeps.py # Development environment newenv: - python3.7 -m venv --clear .venv + $(PYTHON) -m venv --clear .venv .venv/bin/pip install -U pip setuptools $(MAKE) syncenv syncenv: @@ -28,4 +30,4 @@ syncenv: # Changelog check checkchangelog: bash tools/check_changelog_entries.sh - python -m towncrier --draft + $(PYTHON) -m towncrier --draft diff --git a/changelog.d/2939.misc.1.rst b/changelog.d/2939.misc.1.rst new file mode 100644 index 000000000..1fd5f21b4 --- /dev/null +++ b/changelog.d/2939.misc.1.rst @@ -0,0 +1 @@ +Updated dependencies, most notably PyYAML, tqdm, uvloop and pymongo. diff --git a/changelog.d/2939.misc.2.rst b/changelog.d/2939.misc.2.rst new file mode 100644 index 000000000..b67b15a5e --- /dev/null +++ b/changelog.d/2939.misc.2.rst @@ -0,0 +1 @@ +Setting the ``PYTHON`` env var whilst running ``make`` now allows you to specify which python executable to use. diff --git a/setup.cfg b/setup.cfg index 3579342c5..8b653ed99 100644 --- a/setup.cfg +++ b/setup.cfg @@ -31,7 +31,7 @@ install_requires = appdirs==1.4.3 async-timeout==3.0.1 attrs==19.1.0 - babel==2.7.0 + Babel==2.7.0 chardet==3.0.4 Click==7.0 colorama==0.4.1 @@ -42,31 +42,31 @@ install_requires = idna==2.8 multidict==4.5.2 python-Levenshtein-wheels==0.13.1 - PyYAML==5.1.1 + pytz==2019.2 + PyYAML==5.1.2 Red-Lavalink==0.3.0 schema==0.7.0 - tqdm==4.32.2 - uvloop==0.12.2; sys_platform != "win32" and platform_python_implementation == "CPython" + tqdm==4.35.0 + uvloop==0.13.0; sys_platform != "win32" and platform_python_implementation == "CPython" websockets==6.0 yarl==1.3.0 [options.extras_require] docs = alabaster==0.7.12 - Babel==2.7.0 certifi==2019.6.16 - docutils==0.14 + docutils==0.15.2 imagesize==1.1.0 + incremental==17.5.0 Jinja2==2.10.1 MarkupSafe==1.1.1 - packaging==19.0 + packaging==19.1 Pygments==2.4.2 - pyparsing==2.4.0 - pytz==2019.1 + pyparsing==2.4.2 requests==2.22.0 six==1.12.0 snowballstemmer==1.9.0 - Sphinx==2.1.2 + Sphinx==2.2.0 sphinx-rtd-theme==0.4.3 sphinxcontrib-applehelp==1.0.1 sphinxcontrib-devhelp==1.0.1 @@ -75,12 +75,13 @@ docs = sphinxcontrib-qthelp==1.0.2 sphinxcontrib-serializinghtml==1.1.3 sphinxcontrib-trio==1.1.0 + toml==0.10.0 towncrier==19.2.0 urllib3==1.25.3 mongo = dnspython==1.16.0 motor==2.0.0 - pymongo==3.8.0 + pymongo==3.9.0 postgres = asyncpg==0.18.3 style = @@ -89,23 +90,23 @@ style = test = astroid==2.2.5 atomicwrites==1.3.0 - importlib-metadata==0.18 + importlib-metadata==0.19 isort==4.3.21 - lazy-object-proxy==1.4.1 + lazy-object-proxy==1.4.2 mccabe==0.6.1 - more-itertools==7.1.0 - packaging==19.0 + more-itertools==7.2.0 + packaging==19.1 pluggy==0.12.0 py==1.8.0 pylint==2.3.1 - pyparsing==2.4.0 - pytest==5.0.0 + pyparsing==2.4.2 + pytest==5.1.2 pytest-asyncio==0.10.0 six==1.12.0 typed-ast==1.4.0 wcwidth==0.1.7 wrapt==1.11.2 - zipp==0.5.1 + zipp==0.6.0 [options.entry_points] console_scripts =