From 2ef3cb25100ad7008bf5de2387f4b6d1dccbd3fa Mon Sep 17 00:00:00 2001 From: Jeff Hale Date: Wed, 20 Feb 2019 15:33:48 -0500 Subject: [PATCH 1/7] Recommend use venv instead of virtualenv From the Python docs: "Changed in version 3.5: The use of venv is now recommended for creating virtual environments." -https://docs.python.org/3/library/venv.html --- doc/en/goodpractices.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/en/goodpractices.rst b/doc/en/goodpractices.rst index 080685a4c..709437d49 100644 --- a/doc/en/goodpractices.rst +++ b/doc/en/goodpractices.rst @@ -7,12 +7,12 @@ Good Integration Practices Install package with pip ------------------------------------------------- -For development, we recommend to use virtualenv_ environments and pip_ +For development, we recommend you use venv_ for virtual environments and pip_ for installing your application and any dependencies as well as the ``pytest`` package itself. This ensures your code and dependencies are isolated from the system Python installation. -First you need to place a ``setup.py`` file in the root of your package with the following minimum content:: +Next, place a ``setup.py`` file in the root of your package with the following minimum content:: from setuptools import setup, find_packages From da5dec83f6c78af304044e20be54bfeb94ba12fb Mon Sep 17 00:00:00 2001 From: Jeff Hale Date: Wed, 20 Feb 2019 15:36:34 -0500 Subject: [PATCH 2/7] update links for virtualenv -> venv --- doc/en/links.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/en/links.inc b/doc/en/links.inc index 4d5a4b1ee..64e222aae 100644 --- a/doc/en/links.inc +++ b/doc/en/links.inc @@ -14,7 +14,7 @@ .. _`distribute docs`: .. _`distribute`: https://pypi.org/project/distribute/ .. _`pip`: https://pypi.org/project/pip/ -.. _`virtualenv`: https://pypi.org/project/virtualenv/ +.. _`venv`: https://docs.python.org/3/library/venv.html/ .. _hudson: http://hudson-ci.org/ .. _jenkins: http://jenkins-ci.org/ .. _tox: http://testrun.org/tox From 6b661795cf072ff57132376e59bff6e00ba163d1 Mon Sep 17 00:00:00 2001 From: Jeff Hale Date: Thu, 21 Feb 2019 10:41:59 -0500 Subject: [PATCH 3/7] update links.inc to include both venv and virtualenv --- doc/en/links.inc | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/en/links.inc b/doc/en/links.inc index 64e222aae..1b7cbd05b 100644 --- a/doc/en/links.inc +++ b/doc/en/links.inc @@ -15,6 +15,7 @@ .. _`distribute`: https://pypi.org/project/distribute/ .. _`pip`: https://pypi.org/project/pip/ .. _`venv`: https://docs.python.org/3/library/venv.html/ +.. _`virtualenv`: https://pypi.org/project/virtualenv/ .. _hudson: http://hudson-ci.org/ .. _jenkins: http://jenkins-ci.org/ .. _tox: http://testrun.org/tox From cfaa8bbee85937dfef7e4cce6671bb38bf5863a8 Mon Sep 17 00:00:00 2001 From: Jeff Hale Date: Thu, 21 Feb 2019 10:50:49 -0500 Subject: [PATCH 4/7] recommend venv or virtualenv, depending on python version venv has been installed with Python since 3.3. https://docs.python.org/3/library/venv.html --- doc/en/goodpractices.rst | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/doc/en/goodpractices.rst b/doc/en/goodpractices.rst index 709437d49..48ce08ae3 100644 --- a/doc/en/goodpractices.rst +++ b/doc/en/goodpractices.rst @@ -7,10 +7,11 @@ Good Integration Practices Install package with pip ------------------------------------------------- -For development, we recommend you use venv_ for virtual environments and pip_ -for installing your application and any dependencies -as well as the ``pytest`` package itself. This ensures your code and -dependencies are isolated from the system Python installation. +For development, we recommend you use venv_ for virtual environments +(or virtualenv_ for Python 2.7) and +pip_ for installing your application and any dependencies, +as well as the ``pytest`` package itself. +This ensures your code and dependencies are isolated from your system Python installation. Next, place a ``setup.py`` file in the root of your package with the following minimum content:: From ba2a43266a21e6808cf301dc574b545fafe55543 Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Thu, 21 Feb 2019 12:52:09 -0300 Subject: [PATCH 5/7] Mention that virtualenv should be used for Python 3.4 as well --- doc/en/goodpractices.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/en/goodpractices.rst b/doc/en/goodpractices.rst index 48ce08ae3..46733a4f2 100644 --- a/doc/en/goodpractices.rst +++ b/doc/en/goodpractices.rst @@ -8,7 +8,7 @@ Install package with pip ------------------------------------------------- For development, we recommend you use venv_ for virtual environments -(or virtualenv_ for Python 2.7) and +(or virtualenv_ for Python 2.7 and 3.4) and pip_ for installing your application and any dependencies, as well as the ``pytest`` package itself. This ensures your code and dependencies are isolated from your system Python installation. From e75915bb736d91145fa630e2ef732c55e366ba16 Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Thu, 21 Feb 2019 13:03:19 -0300 Subject: [PATCH 6/7] Revert recommending virtualenv for Python 3.4 `venv` is already available in Python 3.4, my mistake --- doc/en/goodpractices.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/en/goodpractices.rst b/doc/en/goodpractices.rst index 46733a4f2..48ce08ae3 100644 --- a/doc/en/goodpractices.rst +++ b/doc/en/goodpractices.rst @@ -8,7 +8,7 @@ Install package with pip ------------------------------------------------- For development, we recommend you use venv_ for virtual environments -(or virtualenv_ for Python 2.7 and 3.4) and +(or virtualenv_ for Python 2.7) and pip_ for installing your application and any dependencies, as well as the ``pytest`` package itself. This ensures your code and dependencies are isolated from your system Python installation. From e1aeb6915eb2e79a962a4aa741a99743d71a68dd Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Thu, 21 Feb 2019 13:27:12 -0300 Subject: [PATCH 7/7] Fix linting --- doc/en/goodpractices.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/en/goodpractices.rst b/doc/en/goodpractices.rst index 48ce08ae3..ba79e71f4 100644 --- a/doc/en/goodpractices.rst +++ b/doc/en/goodpractices.rst @@ -7,10 +7,10 @@ Good Integration Practices Install package with pip ------------------------------------------------- -For development, we recommend you use venv_ for virtual environments -(or virtualenv_ for Python 2.7) and -pip_ for installing your application and any dependencies, -as well as the ``pytest`` package itself. +For development, we recommend you use venv_ for virtual environments +(or virtualenv_ for Python 2.7) and +pip_ for installing your application and any dependencies, +as well as the ``pytest`` package itself. This ensures your code and dependencies are isolated from your system Python installation. Next, place a ``setup.py`` file in the root of your package with the following minimum content::