From 3a943e8b3a388938a93de82a16b0bc5b25eaf48a Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Mon, 8 Oct 2018 01:45:32 -0700 Subject: Some steps are not the previous, but earlier. Mention that we may now configure setup.py and run pip install variants. --- docs/quick_tutorial/tutorial_approach.rst | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'docs') diff --git a/docs/quick_tutorial/tutorial_approach.rst b/docs/quick_tutorial/tutorial_approach.rst index 7ef28bdb8..0b9212e62 100644 --- a/docs/quick_tutorial/tutorial_approach.rst +++ b/docs/quick_tutorial/tutorial_approach.rst @@ -36,11 +36,13 @@ Each of the directories in our ``quick_tutorial`` workspace (e.g., ``request_res project* (except as noted for the ``hello_world`` step). The ``tutorial`` directory is a *Python package*. -For most steps you will copy the previous step's directory to a new directory, and change your working directory to the new directory, then install your project: +For most steps you will copy an earlier step's directory to a new directory, change your working directory to the new directory, then install your project: .. code-block:: bash cd ..; cp -r package ini; cd ini $VENV/bin/pip install -e . -For a few steps, you won't copy the previous step's directory, but you will still need to install your project with ``$VENV/bin/pip install -e .``. +For a few steps, you won't copy an earlier step's directory, but you will still need to install your project with ``$VENV/bin/pip install -e .``. + +Finally for a few steps, you might add a dependency to your project in its ``setup.py`` file, and then install both the dependency and the project with either ``$VENV/bin/pip install -e .`` or ``$VENV/bin/pip install -e ".[testing]"``. -- cgit v1.2.3 From 307313574f9726d1c03639114d1c976535c9b968 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Mon, 8 Oct 2018 02:12:00 -0700 Subject: Update all the `setup.py`s --- docs/quick_tutorial/authentication/setup.py | 35 ++++++++++++++-------- docs/quick_tutorial/authorization/setup.py | 35 ++++++++++++++-------- docs/quick_tutorial/databases/setup.py | 40 +++++++++++++++---------- docs/quick_tutorial/debugtoolbar/setup.py | 18 ++++++----- docs/quick_tutorial/forms/setup.py | 35 ++++++++++++++-------- docs/quick_tutorial/functional_testing/setup.py | 35 ++++++++++++++-------- docs/quick_tutorial/ini/setup.py | 18 ++++++----- docs/quick_tutorial/jinja2/setup.py | 35 ++++++++++++++-------- docs/quick_tutorial/json/setup.py | 35 ++++++++++++++-------- docs/quick_tutorial/logging/setup.py | 35 ++++++++++++++-------- docs/quick_tutorial/more_view_classes/setup.py | 35 ++++++++++++++-------- docs/quick_tutorial/package/setup.py | 9 ++++-- docs/quick_tutorial/request_response/setup.py | 35 ++++++++++++++-------- docs/quick_tutorial/retail_forms/setup.py | 16 ++++++---- docs/quick_tutorial/routing/setup.py | 35 ++++++++++++++-------- docs/quick_tutorial/sessions/setup.py | 35 ++++++++++++++-------- docs/quick_tutorial/static_assets/setup.py | 35 ++++++++++++++-------- docs/quick_tutorial/templating/setup.py | 35 ++++++++++++++-------- docs/quick_tutorial/unit_testing/setup.py | 33 ++++++++++++-------- docs/quick_tutorial/view_classes/setup.py | 35 ++++++++++++++-------- docs/quick_tutorial/views/setup.py | 35 ++++++++++++++-------- 21 files changed, 414 insertions(+), 245 deletions(-) (limited to 'docs') diff --git a/docs/quick_tutorial/authentication/setup.py b/docs/quick_tutorial/authentication/setup.py index 05104b158..b38be63a3 100644 --- a/docs/quick_tutorial/authentication/setup.py +++ b/docs/quick_tutorial/authentication/setup.py @@ -1,5 +1,7 @@ from setuptools import setup +# List of dependencies installed via `pip install -e .`. +# by virtue of the Setuptools `install_requires` value below. requires = [ 'bcrypt', 'pyramid', @@ -8,16 +10,23 @@ requires = [ 'waitress', ] -setup(name='tutorial', - install_requires=requires, - extras_require={ - 'test': [ - 'pytest', - 'webtest', - ], - }, - entry_points="""\ - [paste.app_factory] - main = tutorial:main - """, - ) +# List of dependencies installed via `pip install -e ".[testing]"` +# by virtue of the Setuptools `extras_require` value in the Python +# dictionary below. +tests_require = [ + 'pytest', + 'webtest', +] + +setup( + name='tutorial', + install_requires=requires, + extras_require={ + 'testing': tests_require, + }, + entry_points={ + 'paste.app_factory': [ + 'main = tutorial:main' + ], + }, +) diff --git a/docs/quick_tutorial/authorization/setup.py b/docs/quick_tutorial/authorization/setup.py index 05104b158..b38be63a3 100644 --- a/docs/quick_tutorial/authorization/setup.py +++ b/docs/quick_tutorial/authorization/setup.py @@ -1,5 +1,7 @@ from setuptools import setup +# List of dependencies installed via `pip install -e .`. +# by virtue of the Setuptools `install_requires` value below. requires = [ 'bcrypt', 'pyramid', @@ -8,16 +10,23 @@ requires = [ 'waitress', ] -setup(name='tutorial', - install_requires=requires, - extras_require={ - 'test': [ - 'pytest', - 'webtest', - ], - }, - entry_points="""\ - [paste.app_factory] - main = tutorial:main - """, - ) +# List of dependencies installed via `pip install -e ".[testing]"` +# by virtue of the Setuptools `extras_require` value in the Python +# dictionary below. +tests_require = [ + 'pytest', + 'webtest', +] + +setup( + name='tutorial', + install_requires=requires, + extras_require={ + 'testing': tests_require, + }, + entry_points={ + 'paste.app_factory': [ + 'main = tutorial:main' + ], + }, +) diff --git a/docs/quick_tutorial/databases/setup.py b/docs/quick_tutorial/databases/setup.py index 29dede2af..197617282 100644 --- a/docs/quick_tutorial/databases/setup.py +++ b/docs/quick_tutorial/databases/setup.py @@ -1,5 +1,7 @@ from setuptools import setup +# List of dependencies installed via `pip install -e .`. +# by virtue of the Setuptools `install_requires` value below. requires = [ 'deform', 'pyramid', @@ -11,18 +13,26 @@ requires = [ 'zope.sqlalchemy', ] -setup(name='tutorial', - install_requires=requires, - extras_require={ - 'test': [ - 'pytest', - 'webtest', - ], - }, - entry_points="""\ - [paste.app_factory] - main = tutorial:main - [console_scripts] - initialize_tutorial_db = tutorial.initialize_db:main - """, - ) +# List of dependencies installed via `pip install -e ".[testing]"` +# by virtue of the Setuptools `extras_require` value in the Python +# dictionary below. +tests_require = [ + 'pytest', + 'webtest', +] + +setup( + name='tutorial', + install_requires=requires, + extras_require={ + 'testing': tests_require, + }, + entry_points={ + 'paste.app_factory': [ + 'main = tutorial:main' + ], + 'console_scripts': [ + 'initialize_tutorial_db = tutorial.initialize_db:main' + ], + }, +) diff --git a/docs/quick_tutorial/debugtoolbar/setup.py b/docs/quick_tutorial/debugtoolbar/setup.py index a947e20d8..5fee31f01 100644 --- a/docs/quick_tutorial/debugtoolbar/setup.py +++ b/docs/quick_tutorial/debugtoolbar/setup.py @@ -1,15 +1,19 @@ from setuptools import setup +# List of dependencies installed via `pip install -e .`. +# by virtue of the Setuptools `install_requires` value below. requires = [ 'pyramid', 'pyramid_debugtoolbar', 'waitress', ] -setup(name='tutorial', - install_requires=requires, - entry_points="""\ - [paste.app_factory] - main = tutorial:main - """, - ) +setup( + name='tutorial', + install_requires=requires, + entry_points={ + 'paste.app_factory': [ + 'main = tutorial:main' + ], + }, +) diff --git a/docs/quick_tutorial/forms/setup.py b/docs/quick_tutorial/forms/setup.py index e911d5bb8..f3e80f25e 100644 --- a/docs/quick_tutorial/forms/setup.py +++ b/docs/quick_tutorial/forms/setup.py @@ -1,5 +1,7 @@ from setuptools import setup +# List of dependencies installed via `pip install -e .`. +# by virtue of the Setuptools `install_requires` value below. requires = [ 'deform', 'pyramid', @@ -8,16 +10,23 @@ requires = [ 'waitress', ] -setup(name='tutorial', - install_requires=requires, - extras_require={ - 'test': [ - 'pytest', - 'webtest', - ], - }, - entry_points="""\ - [paste.app_factory] - main = tutorial:main - """, - ) +# List of dependencies installed via `pip install -e ".[testing]"` +# by virtue of the Setuptools `extras_require` value in the Python +# dictionary below. +tests_require = [ + 'pytest', + 'webtest', +] + +setup( + name='tutorial', + install_requires=requires, + extras_require={ + 'testing': tests_require, + }, + entry_points={ + 'paste.app_factory': [ + 'main = tutorial:main' + ], + }, +) diff --git a/docs/quick_tutorial/functional_testing/setup.py b/docs/quick_tutorial/functional_testing/setup.py index c0d3dee8f..68a522ad7 100644 --- a/docs/quick_tutorial/functional_testing/setup.py +++ b/docs/quick_tutorial/functional_testing/setup.py @@ -1,21 +1,30 @@ from setuptools import setup +# List of dependencies installed via `pip install -e .`. +# by virtue of the Setuptools `install_requires` value below. requires = [ 'pyramid', 'pyramid_debugtoolbar', 'waitress', ] -setup(name='tutorial', - install_requires=requires, - extras_require={ - 'test': [ - 'pytest', - 'webtest', - ], - }, - entry_points="""\ - [paste.app_factory] - main = tutorial:main - """, - ) +# List of dependencies installed via `pip install -e ".[testing]"` +# by virtue of the Setuptools `extras_require` value in the Python +# dictionary below. +tests_require = [ + 'pytest', + 'webtest', +] + +setup( + name='tutorial', + install_requires=requires, + extras_require={ + 'testing': tests_require, + }, + entry_points={ + 'paste.app_factory': [ + 'main = tutorial:main' + ], + }, +) diff --git a/docs/quick_tutorial/ini/setup.py b/docs/quick_tutorial/ini/setup.py index 7a2677ebd..1ecf9c4ff 100644 --- a/docs/quick_tutorial/ini/setup.py +++ b/docs/quick_tutorial/ini/setup.py @@ -1,14 +1,18 @@ from setuptools import setup +# List of dependencies installed via `pip install -e .`. +# by virtue of the Setuptools `install_requires` value below. requires = [ 'pyramid', 'waitress', ] -setup(name='tutorial', - install_requires=requires, - entry_points="""\ - [paste.app_factory] - main = tutorial:main - """, - ) +setup( + name='tutorial', + install_requires=requires, + entry_points={ + 'paste.app_factory': [ + 'main = tutorial:main' + ], + }, +) diff --git a/docs/quick_tutorial/jinja2/setup.py b/docs/quick_tutorial/jinja2/setup.py index 86f177866..6edd2ab39 100644 --- a/docs/quick_tutorial/jinja2/setup.py +++ b/docs/quick_tutorial/jinja2/setup.py @@ -1,5 +1,7 @@ from setuptools import setup +# List of dependencies installed via `pip install -e .`. +# by virtue of the Setuptools `install_requires` value below. requires = [ 'pyramid', 'pyramid_chameleon', @@ -8,16 +10,23 @@ requires = [ 'waitress', ] -setup(name='tutorial', - install_requires=requires, - extras_require={ - 'test': [ - 'pytest', - 'webtest', - ], - }, - entry_points="""\ - [paste.app_factory] - main = tutorial:main - """, - ) +# List of dependencies installed via `pip install -e ".[testing]"` +# by virtue of the Setuptools `extras_require` value in the Python +# dictionary below. +tests_require = [ + 'pytest', + 'webtest', +] + +setup( + name='tutorial', + install_requires=requires, + extras_require={ + 'testing': tests_require, + }, + entry_points={ + 'paste.app_factory': [ + 'main = tutorial:main' + ], + }, +) diff --git a/docs/quick_tutorial/json/setup.py b/docs/quick_tutorial/json/setup.py index 3ad7f004e..a84fe79ee 100644 --- a/docs/quick_tutorial/json/setup.py +++ b/docs/quick_tutorial/json/setup.py @@ -1,5 +1,7 @@ from setuptools import setup +# List of dependencies installed via `pip install -e .`. +# by virtue of the Setuptools `install_requires` value below. requires = [ 'pyramid', 'pyramid_chameleon', @@ -7,16 +9,23 @@ requires = [ 'waitress', ] -setup(name='tutorial', - install_requires=requires, - extras_require={ - 'test': [ - 'pytest', - 'webtest', - ], - }, - entry_points="""\ - [paste.app_factory] - main = tutorial:main - """, - ) +# List of dependencies installed via `pip install -e ".[testing]"` +# by virtue of the Setuptools `extras_require` value in the Python +# dictionary below. +tests_require = [ + 'pytest', + 'webtest', +] + +setup( + name='tutorial', + install_requires=requires, + extras_require={ + 'testing': tests_require, + }, + entry_points={ + 'paste.app_factory': [ + 'main = tutorial:main' + ], + }, +) diff --git a/docs/quick_tutorial/logging/setup.py b/docs/quick_tutorial/logging/setup.py index 3ad7f004e..a84fe79ee 100644 --- a/docs/quick_tutorial/logging/setup.py +++ b/docs/quick_tutorial/logging/setup.py @@ -1,5 +1,7 @@ from setuptools import setup +# List of dependencies installed via `pip install -e .`. +# by virtue of the Setuptools `install_requires` value below. requires = [ 'pyramid', 'pyramid_chameleon', @@ -7,16 +9,23 @@ requires = [ 'waitress', ] -setup(name='tutorial', - install_requires=requires, - extras_require={ - 'test': [ - 'pytest', - 'webtest', - ], - }, - entry_points="""\ - [paste.app_factory] - main = tutorial:main - """, - ) +# List of dependencies installed via `pip install -e ".[testing]"` +# by virtue of the Setuptools `extras_require` value in the Python +# dictionary below. +tests_require = [ + 'pytest', + 'webtest', +] + +setup( + name='tutorial', + install_requires=requires, + extras_require={ + 'testing': tests_require, + }, + entry_points={ + 'paste.app_factory': [ + 'main = tutorial:main' + ], + }, +) diff --git a/docs/quick_tutorial/more_view_classes/setup.py b/docs/quick_tutorial/more_view_classes/setup.py index 3ad7f004e..a84fe79ee 100644 --- a/docs/quick_tutorial/more_view_classes/setup.py +++ b/docs/quick_tutorial/more_view_classes/setup.py @@ -1,5 +1,7 @@ from setuptools import setup +# List of dependencies installed via `pip install -e .`. +# by virtue of the Setuptools `install_requires` value below. requires = [ 'pyramid', 'pyramid_chameleon', @@ -7,16 +9,23 @@ requires = [ 'waitress', ] -setup(name='tutorial', - install_requires=requires, - extras_require={ - 'test': [ - 'pytest', - 'webtest', - ], - }, - entry_points="""\ - [paste.app_factory] - main = tutorial:main - """, - ) +# List of dependencies installed via `pip install -e ".[testing]"` +# by virtue of the Setuptools `extras_require` value in the Python +# dictionary below. +tests_require = [ + 'pytest', + 'webtest', +] + +setup( + name='tutorial', + install_requires=requires, + extras_require={ + 'testing': tests_require, + }, + entry_points={ + 'paste.app_factory': [ + 'main = tutorial:main' + ], + }, +) diff --git a/docs/quick_tutorial/package/setup.py b/docs/quick_tutorial/package/setup.py index a59527bf4..9667d24bd 100644 --- a/docs/quick_tutorial/package/setup.py +++ b/docs/quick_tutorial/package/setup.py @@ -1,10 +1,13 @@ from setuptools import setup +# List of dependencies installed via `pip install -e .`. +# by virtue of the Setuptools `install_requires` value below. requires = [ 'pyramid', 'waitress', ] -setup(name='tutorial', - install_requires=requires, - ) +setup( + name='tutorial', + install_requires=requires, +) diff --git a/docs/quick_tutorial/request_response/setup.py b/docs/quick_tutorial/request_response/setup.py index 3ad7f004e..a84fe79ee 100644 --- a/docs/quick_tutorial/request_response/setup.py +++ b/docs/quick_tutorial/request_response/setup.py @@ -1,5 +1,7 @@ from setuptools import setup +# List of dependencies installed via `pip install -e .`. +# by virtue of the Setuptools `install_requires` value below. requires = [ 'pyramid', 'pyramid_chameleon', @@ -7,16 +9,23 @@ requires = [ 'waitress', ] -setup(name='tutorial', - install_requires=requires, - extras_require={ - 'test': [ - 'pytest', - 'webtest', - ], - }, - entry_points="""\ - [paste.app_factory] - main = tutorial:main - """, - ) +# List of dependencies installed via `pip install -e ".[testing]"` +# by virtue of the Setuptools `extras_require` value in the Python +# dictionary below. +tests_require = [ + 'pytest', + 'webtest', +] + +setup( + name='tutorial', + install_requires=requires, + extras_require={ + 'testing': tests_require, + }, + entry_points={ + 'paste.app_factory': [ + 'main = tutorial:main' + ], + }, +) diff --git a/docs/quick_tutorial/retail_forms/setup.py b/docs/quick_tutorial/retail_forms/setup.py index 968889e74..46c10728a 100644 --- a/docs/quick_tutorial/retail_forms/setup.py +++ b/docs/quick_tutorial/retail_forms/setup.py @@ -1,5 +1,7 @@ from setuptools import setup +# List of dependencies installed via `pip install -e .`. +# by virtue of the Setuptools `install_requires` value below. requires = [ 'deform', 'pyramid', @@ -7,10 +9,12 @@ requires = [ 'waitress', ] -setup(name='tutorial', - install_requires=requires, - entry_points="""\ - [paste.app_factory] - main = tutorial:main - """, +setup( + name='tutorial', + install_requires=requires, + entry_points={ + 'paste.app_factory': [ + 'main = tutorial:main' + ], + }, ) diff --git a/docs/quick_tutorial/routing/setup.py b/docs/quick_tutorial/routing/setup.py index 3ad7f004e..a84fe79ee 100644 --- a/docs/quick_tutorial/routing/setup.py +++ b/docs/quick_tutorial/routing/setup.py @@ -1,5 +1,7 @@ from setuptools import setup +# List of dependencies installed via `pip install -e .`. +# by virtue of the Setuptools `install_requires` value below. requires = [ 'pyramid', 'pyramid_chameleon', @@ -7,16 +9,23 @@ requires = [ 'waitress', ] -setup(name='tutorial', - install_requires=requires, - extras_require={ - 'test': [ - 'pytest', - 'webtest', - ], - }, - entry_points="""\ - [paste.app_factory] - main = tutorial:main - """, - ) +# List of dependencies installed via `pip install -e ".[testing]"` +# by virtue of the Setuptools `extras_require` value in the Python +# dictionary below. +tests_require = [ + 'pytest', + 'webtest', +] + +setup( + name='tutorial', + install_requires=requires, + extras_require={ + 'testing': tests_require, + }, + entry_points={ + 'paste.app_factory': [ + 'main = tutorial:main' + ], + }, +) diff --git a/docs/quick_tutorial/sessions/setup.py b/docs/quick_tutorial/sessions/setup.py index 3ad7f004e..a84fe79ee 100644 --- a/docs/quick_tutorial/sessions/setup.py +++ b/docs/quick_tutorial/sessions/setup.py @@ -1,5 +1,7 @@ from setuptools import setup +# List of dependencies installed via `pip install -e .`. +# by virtue of the Setuptools `install_requires` value below. requires = [ 'pyramid', 'pyramid_chameleon', @@ -7,16 +9,23 @@ requires = [ 'waitress', ] -setup(name='tutorial', - install_requires=requires, - extras_require={ - 'test': [ - 'pytest', - 'webtest', - ], - }, - entry_points="""\ - [paste.app_factory] - main = tutorial:main - """, - ) +# List of dependencies installed via `pip install -e ".[testing]"` +# by virtue of the Setuptools `extras_require` value in the Python +# dictionary below. +tests_require = [ + 'pytest', + 'webtest', +] + +setup( + name='tutorial', + install_requires=requires, + extras_require={ + 'testing': tests_require, + }, + entry_points={ + 'paste.app_factory': [ + 'main = tutorial:main' + ], + }, +) diff --git a/docs/quick_tutorial/static_assets/setup.py b/docs/quick_tutorial/static_assets/setup.py index 3ad7f004e..a84fe79ee 100644 --- a/docs/quick_tutorial/static_assets/setup.py +++ b/docs/quick_tutorial/static_assets/setup.py @@ -1,5 +1,7 @@ from setuptools import setup +# List of dependencies installed via `pip install -e .`. +# by virtue of the Setuptools `install_requires` value below. requires = [ 'pyramid', 'pyramid_chameleon', @@ -7,16 +9,23 @@ requires = [ 'waitress', ] -setup(name='tutorial', - install_requires=requires, - extras_require={ - 'test': [ - 'pytest', - 'webtest', - ], - }, - entry_points="""\ - [paste.app_factory] - main = tutorial:main - """, - ) +# List of dependencies installed via `pip install -e ".[testing]"` +# by virtue of the Setuptools `extras_require` value in the Python +# dictionary below. +tests_require = [ + 'pytest', + 'webtest', +] + +setup( + name='tutorial', + install_requires=requires, + extras_require={ + 'testing': tests_require, + }, + entry_points={ + 'paste.app_factory': [ + 'main = tutorial:main' + ], + }, +) diff --git a/docs/quick_tutorial/templating/setup.py b/docs/quick_tutorial/templating/setup.py index 3ad7f004e..a84fe79ee 100644 --- a/docs/quick_tutorial/templating/setup.py +++ b/docs/quick_tutorial/templating/setup.py @@ -1,5 +1,7 @@ from setuptools import setup +# List of dependencies installed via `pip install -e .`. +# by virtue of the Setuptools `install_requires` value below. requires = [ 'pyramid', 'pyramid_chameleon', @@ -7,16 +9,23 @@ requires = [ 'waitress', ] -setup(name='tutorial', - install_requires=requires, - extras_require={ - 'test': [ - 'pytest', - 'webtest', - ], - }, - entry_points="""\ - [paste.app_factory] - main = tutorial:main - """, - ) +# List of dependencies installed via `pip install -e ".[testing]"` +# by virtue of the Setuptools `extras_require` value in the Python +# dictionary below. +tests_require = [ + 'pytest', + 'webtest', +] + +setup( + name='tutorial', + install_requires=requires, + extras_require={ + 'testing': tests_require, + }, + entry_points={ + 'paste.app_factory': [ + 'main = tutorial:main' + ], + }, +) diff --git a/docs/quick_tutorial/unit_testing/setup.py b/docs/quick_tutorial/unit_testing/setup.py index 617c806aa..34c750843 100644 --- a/docs/quick_tutorial/unit_testing/setup.py +++ b/docs/quick_tutorial/unit_testing/setup.py @@ -1,20 +1,29 @@ from setuptools import setup +# List of dependencies installed via `pip install -e .`. +# by virtue of the Setuptools `install_requires` value below. requires = [ 'pyramid', 'pyramid_debugtoolbar', 'waitress', ] -setup(name='tutorial', - install_requires=requires, - extras_require={ - 'test': [ - 'pytest', - ], - }, - entry_points="""\ - [paste.app_factory] - main = tutorial:main - """, - ) +# List of dependencies installed via `pip install -e ".[testing]"` +# by virtue of the Setuptools `extras_require` value in the Python +# dictionary below. +tests_require = [ + 'pytest', +] + +setup( + name='tutorial', + install_requires=requires, + extras_require={ + 'testing': tests_require, + }, + entry_points={ + 'paste.app_factory': [ + 'main = tutorial:main' + ], + }, +) diff --git a/docs/quick_tutorial/view_classes/setup.py b/docs/quick_tutorial/view_classes/setup.py index 3ad7f004e..a84fe79ee 100644 --- a/docs/quick_tutorial/view_classes/setup.py +++ b/docs/quick_tutorial/view_classes/setup.py @@ -1,5 +1,7 @@ from setuptools import setup +# List of dependencies installed via `pip install -e .`. +# by virtue of the Setuptools `install_requires` value below. requires = [ 'pyramid', 'pyramid_chameleon', @@ -7,16 +9,23 @@ requires = [ 'waitress', ] -setup(name='tutorial', - install_requires=requires, - extras_require={ - 'test': [ - 'pytest', - 'webtest', - ], - }, - entry_points="""\ - [paste.app_factory] - main = tutorial:main - """, - ) +# List of dependencies installed via `pip install -e ".[testing]"` +# by virtue of the Setuptools `extras_require` value in the Python +# dictionary below. +tests_require = [ + 'pytest', + 'webtest', +] + +setup( + name='tutorial', + install_requires=requires, + extras_require={ + 'testing': tests_require, + }, + entry_points={ + 'paste.app_factory': [ + 'main = tutorial:main' + ], + }, +) diff --git a/docs/quick_tutorial/views/setup.py b/docs/quick_tutorial/views/setup.py index c0d3dee8f..68a522ad7 100644 --- a/docs/quick_tutorial/views/setup.py +++ b/docs/quick_tutorial/views/setup.py @@ -1,21 +1,30 @@ from setuptools import setup +# List of dependencies installed via `pip install -e .`. +# by virtue of the Setuptools `install_requires` value below. requires = [ 'pyramid', 'pyramid_debugtoolbar', 'waitress', ] -setup(name='tutorial', - install_requires=requires, - extras_require={ - 'test': [ - 'pytest', - 'webtest', - ], - }, - entry_points="""\ - [paste.app_factory] - main = tutorial:main - """, - ) +# List of dependencies installed via `pip install -e ".[testing]"` +# by virtue of the Setuptools `extras_require` value in the Python +# dictionary below. +tests_require = [ + 'pytest', + 'webtest', +] + +setup( + name='tutorial', + install_requires=requires, + extras_require={ + 'testing': tests_require, + }, + entry_points={ + 'paste.app_factory': [ + 'main = tutorial:main' + ], + }, +) -- cgit v1.2.3 From a1bc90aeca43111e5fe68132721185e8b6ebfa94 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Mon, 8 Oct 2018 02:15:56 -0700 Subject: Emphasize the changes to setup.py Reformat numbered list. --- docs/quick_tutorial/ini.rst | 49 ++++++++++++++++++++++----------------------- 1 file changed, 24 insertions(+), 25 deletions(-) (limited to 'docs') diff --git a/docs/quick_tutorial/ini.rst b/docs/quick_tutorial/ini.rst index 90f66009c..0bb7da1ba 100644 --- a/docs/quick_tutorial/ini.rst +++ b/docs/quick_tutorial/ini.rst @@ -32,49 +32,48 @@ Objectives Steps ===== -#. First we copy the results of the previous step: +#. First we copy the results of the previous step: - .. code-block:: bash + .. code-block:: bash - cd ..; cp -r package ini; cd ini + cd ..; cp -r package ini; cd ini -#. Our ``ini/setup.py`` needs a :term:`Setuptools` :term:`entry point` in the ``setup()`` function: +#. Our ``ini/setup.py`` needs a :term:`Setuptools` :term:`entry point` in the ``setup()`` function: - .. literalinclude:: ini/setup.py - :linenos: + .. literalinclude:: ini/setup.py + :linenos: + :emphasize-lines: 13-17 -#. We can now install our project, thus generating (or re-generating) an "egg" - at ``ini/tutorial.egg-info``: +#. We can now install our project, thus generating (or re-generating) an "egg" at ``ini/tutorial.egg-info``: - .. code-block:: bash + .. code-block:: bash - $VENV/bin/pip install -e . + $VENV/bin/pip install -e . -#. Let's make a file ``ini/development.ini`` for our configuration: +#. Let's make a file ``ini/development.ini`` for our configuration: - .. literalinclude:: ini/development.ini - :language: ini - :linenos: + .. literalinclude:: ini/development.ini + :language: ini + :linenos: -#. We can refactor our startup code from the previous step's ``app.py`` into - ``ini/tutorial/__init__.py``: +#. We can refactor our startup code from the previous step's ``app.py`` into ``ini/tutorial/__init__.py``: - .. literalinclude:: ini/tutorial/__init__.py - :linenos: + .. literalinclude:: ini/tutorial/__init__.py + :linenos: -#. Now that ``ini/tutorial/app.py`` isn't used, let's remove it: +#. Now that ``ini/tutorial/app.py`` isn't used, let's remove it: - .. code-block:: bash + .. code-block:: bash - rm tutorial/app.py + rm tutorial/app.py -#. Run your Pyramid application with: +#. Run your Pyramid application with: - .. code-block:: bash + .. code-block:: bash - $VENV/bin/pserve development.ini --reload + $VENV/bin/pserve development.ini --reload -#. Open http://localhost:6543/. +#. Open http://localhost:6543/. Analysis ======== -- cgit v1.2.3 From 1db3bacaab1f68344806ad91ebb6ab62c06a6788 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Mon, 8 Oct 2018 02:21:20 -0700 Subject: Replace [test] with [testing], and quote as needed --- docs/quick_tutorial/functional_testing.rst | 4 ++-- docs/quick_tutorial/unit_testing.rst | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'docs') diff --git a/docs/quick_tutorial/functional_testing.rst b/docs/quick_tutorial/functional_testing.rst index d3ada3793..236152003 100644 --- a/docs/quick_tutorial/functional_testing.rst +++ b/docs/quick_tutorial/functional_testing.rst @@ -45,11 +45,11 @@ Steps :emphasize-lines: 14 #. Install our project and its newly added dependency. - Note that we use the extra specifier ``[test]`` to install testing requirements. + Note that we use the extra specifier ``[testing]`` to install testing requirements and surround it with double quote marks. .. code-block:: bash - $VENV/bin/pip install -e .[test] + $VENV/bin/pip install -e ".[testing]" #. Let's extend ``functional_testing/tutorial/tests.py`` to include a functional test: diff --git a/docs/quick_tutorial/unit_testing.rst b/docs/quick_tutorial/unit_testing.rst index 2e58ee8d9..283730f0f 100644 --- a/docs/quick_tutorial/unit_testing.rst +++ b/docs/quick_tutorial/unit_testing.rst @@ -54,14 +54,14 @@ Steps .. literalinclude:: unit_testing/setup.py :language: python :linenos: - :emphasize-lines: 11-15 + :emphasize-lines: 11-16, 21-23 #. Install our project and its newly added dependency. - Note that we use the extra specifier ``[test]`` to install testing requirements. + Note that we use the extra specifier ``[testing]`` to install testing requirements and surround it with double quote marks. .. code-block:: bash - $VENV/bin/pip install -e .[test] + $VENV/bin/pip install -e ".[testing]" #. Now we write a simple unit test in ``unit_testing/tutorial/tests.py``: -- cgit v1.2.3 From 0a799313f142d9ec886494331acd8c624950c61f Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Mon, 8 Oct 2018 02:22:22 -0700 Subject: Emphasize the changes to setup.py --- docs/quick_tutorial/debugtoolbar.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/quick_tutorial/debugtoolbar.rst b/docs/quick_tutorial/debugtoolbar.rst index a13d153d8..dbd93a6cb 100644 --- a/docs/quick_tutorial/debugtoolbar.rst +++ b/docs/quick_tutorial/debugtoolbar.rst @@ -43,7 +43,7 @@ Steps .. literalinclude:: debugtoolbar/setup.py :language: python :linenos: - :emphasize-lines: 5 + :emphasize-lines: 7 #. Install our project and its newly added dependency. -- cgit v1.2.3 From 7535806c3cfffee96fec6a4966dd17b6ece92d18 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Mon, 8 Oct 2018 02:23:14 -0700 Subject: Align emphasize-lines to setup.py --- docs/quick_tutorial/functional_testing.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/quick_tutorial/functional_testing.rst b/docs/quick_tutorial/functional_testing.rst index 236152003..b09c68b36 100644 --- a/docs/quick_tutorial/functional_testing.rst +++ b/docs/quick_tutorial/functional_testing.rst @@ -42,7 +42,7 @@ Steps .. literalinclude:: functional_testing/setup.py :language: python :linenos: - :emphasize-lines: 14 + :emphasize-lines: 16 #. Install our project and its newly added dependency. Note that we use the extra specifier ``[testing]`` to install testing requirements and surround it with double quote marks. -- cgit v1.2.3 From b9145548646e378da8ce97f60bca16ab1e7d7bf3 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Mon, 8 Oct 2018 02:25:44 -0700 Subject: Align emphasize-lines to setup.py Reformat numbered list. --- docs/quick_tutorial/templating.rst | 71 ++++++++++++++++++-------------------- 1 file changed, 34 insertions(+), 37 deletions(-) (limited to 'docs') diff --git a/docs/quick_tutorial/templating.rst b/docs/quick_tutorial/templating.rst index 4d4ccea4f..cef54fb6f 100644 --- a/docs/quick_tutorial/templating.rst +++ b/docs/quick_tutorial/templating.rst @@ -42,67 +42,64 @@ Objectives Steps ===== -#. Let's begin by using the previous package as a starting point for a new - project: +#. Let's begin by using the previous package as a starting point for a new project: - .. code-block:: bash + .. code-block:: bash - cd ..; cp -r views templating; cd templating + cd ..; cp -r views templating; cd templating -#. This step depends on ``pyramid_chameleon``, so add it as a dependency in - ``templating/setup.py``: +#. This step depends on ``pyramid_chameleon``, so add it as a dependency in ``templating/setup.py``: - .. literalinclude:: templating/setup.py - :linenos: + .. literalinclude:: templating/setup.py + :linenos: + :emphasize-lines: 7 -#. Now we can activate the development-mode distribution: +#. Now we can activate the development-mode distribution: - .. code-block:: bash + .. code-block:: bash - $VENV/bin/pip install -e . + $VENV/bin/pip install -e . -#. We need to connect ``pyramid_chameleon`` as a renderer by making a call in - the setup of ``templating/tutorial/__init__.py``: +#. We need to connect ``pyramid_chameleon`` as a renderer by making a call in the setup of ``templating/tutorial/__init__.py``: - .. literalinclude:: templating/tutorial/__init__.py - :linenos: + .. literalinclude:: templating/tutorial/__init__.py + :linenos: -#. Our ``templating/tutorial/views.py`` no longer has HTML in it: +#. Our ``templating/tutorial/views.py`` no longer has HTML in it: - .. literalinclude:: templating/tutorial/views.py - :linenos: + .. literalinclude:: templating/tutorial/views.py + :linenos: -#. Instead we have ``templating/tutorial/home.pt`` as a template: +#. Instead we have ``templating/tutorial/home.pt`` as a template: - .. literalinclude:: templating/tutorial/home.pt - :language: html + .. literalinclude:: templating/tutorial/home.pt + :language: html -#. For convenience, change ``templating/development.ini`` to reload templates - automatically with ``pyramid.reload_templates``: +#. For convenience, change ``templating/development.ini`` to reload templates automatically with ``pyramid.reload_templates``: - .. literalinclude:: templating/development.ini - :language: ini + .. literalinclude:: templating/development.ini + :language: ini -#. Our unit tests in ``templating/tutorial/tests.py`` can focus on data: +#. Our unit tests in ``templating/tutorial/tests.py`` can focus on data: - .. literalinclude:: templating/tutorial/tests.py - :linenos: + .. literalinclude:: templating/tutorial/tests.py + :linenos: -#. Now run the tests: +#. Now run the tests: - .. code-block:: bash + .. code-block:: bash - $VENV/bin/pytest tutorial/tests.py -q - .... - 4 passed in 0.46 seconds + $VENV/bin/pytest tutorial/tests.py -q + .... + 4 passed in 0.46 seconds -#. Run your Pyramid application with: +#. Run your Pyramid application with: - .. code-block:: bash + .. code-block:: bash - $VENV/bin/pserve development.ini --reload + $VENV/bin/pserve development.ini --reload -#. Open http://localhost:6543/ and http://localhost:6543/howdy in your browser. +#. Open http://localhost:6543/ and http://localhost:6543/howdy in your browser. Analysis -- cgit v1.2.3 From 2cf5a0f5a5236ba63f815bde04e6871f12e34a0a Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Mon, 8 Oct 2018 02:28:12 -0700 Subject: Reformat numbered list. --- docs/quick_tutorial/view_classes.rst | 41 +++++++++++++++++------------------- 1 file changed, 19 insertions(+), 22 deletions(-) (limited to 'docs') diff --git a/docs/quick_tutorial/view_classes.rst b/docs/quick_tutorial/view_classes.rst index 4b7b78140..1307857b7 100644 --- a/docs/quick_tutorial/view_classes.rst +++ b/docs/quick_tutorial/view_classes.rst @@ -37,41 +37,38 @@ Objectives Steps ===== -#. First we copy the results of the previous step: +#. First we copy the results of the previous step: - .. code-block:: bash + .. code-block:: bash - cd ..; cp -r templating view_classes; cd view_classes - $VENV/bin/pip install -e . + cd ..; cp -r templating view_classes; cd view_classes + $VENV/bin/pip install -e . -#. Our ``view_classes/tutorial/views.py`` now has a view class with our two - views: +#. Our ``view_classes/tutorial/views.py`` now has a view class with our two views: - .. literalinclude:: view_classes/tutorial/views.py - :linenos: + .. literalinclude:: view_classes/tutorial/views.py + :linenos: -#. Our unit tests in ``view_classes/tutorial/tests.py`` don't run, so let's - modify them to import the view class, and make an instance before getting a - response: +#. Our unit tests in ``view_classes/tutorial/tests.py`` don't run, so let's modify them to import the view class, and make an instance before getting a response: - .. literalinclude:: view_classes/tutorial/tests.py - :linenos: + .. literalinclude:: view_classes/tutorial/tests.py + :linenos: -#. Now run the tests: +#. Now run the tests: - .. code-block:: bash + .. code-block:: bash - $VENV/bin/pytest tutorial/tests.py -q - .... - 4 passed in 0.34 seconds + $VENV/bin/pytest tutorial/tests.py -q + .... + 4 passed in 0.34 seconds -#. Run your Pyramid application with: +#. Run your Pyramid application with: - .. code-block:: bash + .. code-block:: bash - $VENV/bin/pserve development.ini --reload + $VENV/bin/pserve development.ini --reload -#. Open http://localhost:6543/ and http://localhost:6543/howdy in your browser. +#. Open http://localhost:6543/ and http://localhost:6543/howdy in your browser. Analysis -- cgit v1.2.3 From e73977d032b75b165084afba1595c1881b815a28 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Mon, 8 Oct 2018 02:32:24 -0700 Subject: Align emphasize-lines to setup.py --- docs/quick_tutorial/authentication.rst | 2 +- docs/quick_tutorial/databases.rst | 2 +- docs/quick_tutorial/forms.rst | 2 +- docs/quick_tutorial/jinja2.rst | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'docs') diff --git a/docs/quick_tutorial/authentication.rst b/docs/quick_tutorial/authentication.rst index eb9b6b395..cd038ea36 100644 --- a/docs/quick_tutorial/authentication.rst +++ b/docs/quick_tutorial/authentication.rst @@ -39,7 +39,7 @@ Steps .. literalinclude:: authentication/setup.py :language: python - :emphasize-lines: 4 + :emphasize-lines: 6 :linenos: #. We can now install our project in development mode: diff --git a/docs/quick_tutorial/databases.rst b/docs/quick_tutorial/databases.rst index 5ba23e937..1d499cc9d 100644 --- a/docs/quick_tutorial/databases.rst +++ b/docs/quick_tutorial/databases.rst @@ -51,7 +51,7 @@ Steps .. literalinclude:: databases/setup.py :linenos: - :emphasize-lines: 8-9, 11, 25-26 + :emphasize-lines: 10-11, 13, 34-36 .. note:: We aren't yet doing ``$VENV/bin/pip install -e .`` because we need to write a script and update configuration first. diff --git a/docs/quick_tutorial/forms.rst b/docs/quick_tutorial/forms.rst index 7d759b72d..3cd1e26aa 100644 --- a/docs/quick_tutorial/forms.rst +++ b/docs/quick_tutorial/forms.rst @@ -40,7 +40,7 @@ Steps #. Let's edit ``forms/setup.py`` to declare a dependency on Deform, which in turn pulls in Colander as a dependency: .. literalinclude:: forms/setup.py - :emphasize-lines: 4 + :emphasize-lines: 6 :linenos: #. We can now install our project in development mode: diff --git a/docs/quick_tutorial/jinja2.rst b/docs/quick_tutorial/jinja2.rst index 23a9982d3..865a8a6cb 100644 --- a/docs/quick_tutorial/jinja2.rst +++ b/docs/quick_tutorial/jinja2.rst @@ -33,7 +33,7 @@ Steps .. literalinclude:: jinja2/setup.py :language: python :linenos: - :emphasize-lines: 7 + :emphasize-lines: 9 #. Install our project and its newly added dependency. -- cgit v1.2.3 From 29f69b107313b3897280d10608f28a6fa5360e37 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Mon, 8 Oct 2018 23:45:30 -0700 Subject: Revise `setup.py`s --- docs/quick_tutorial/authentication/setup.py | 6 +++--- docs/quick_tutorial/authorization/setup.py | 6 +++--- docs/quick_tutorial/databases/setup.py | 6 +++--- docs/quick_tutorial/debugtoolbar/setup.py | 8 +++++++- docs/quick_tutorial/forms/setup.py | 6 +++--- docs/quick_tutorial/functional_testing/setup.py | 6 +++--- docs/quick_tutorial/jinja2/setup.py | 6 +++--- docs/quick_tutorial/json/setup.py | 6 +++--- docs/quick_tutorial/logging/setup.py | 6 +++--- docs/quick_tutorial/more_view_classes/setup.py | 6 +++--- docs/quick_tutorial/request_response/setup.py | 6 +++--- docs/quick_tutorial/routing/setup.py | 6 +++--- docs/quick_tutorial/sessions/setup.py | 6 +++--- docs/quick_tutorial/static_assets/setup.py | 6 +++--- docs/quick_tutorial/templating/setup.py | 6 +++--- docs/quick_tutorial/unit_testing/setup.py | 6 +++--- docs/quick_tutorial/view_classes/setup.py | 6 +++--- docs/quick_tutorial/views/setup.py | 6 +++--- 18 files changed, 58 insertions(+), 52 deletions(-) (limited to 'docs') diff --git a/docs/quick_tutorial/authentication/setup.py b/docs/quick_tutorial/authentication/setup.py index b38be63a3..5c51563af 100644 --- a/docs/quick_tutorial/authentication/setup.py +++ b/docs/quick_tutorial/authentication/setup.py @@ -6,14 +6,14 @@ requires = [ 'bcrypt', 'pyramid', 'pyramid_chameleon', - 'pyramid_debugtoolbar', 'waitress', ] # List of dependencies installed via `pip install -e ".[testing]"` # by virtue of the Setuptools `extras_require` value in the Python # dictionary below. -tests_require = [ +dev_requires = [ + 'pyramid_debugtoolbar', 'pytest', 'webtest', ] @@ -22,7 +22,7 @@ setup( name='tutorial', install_requires=requires, extras_require={ - 'testing': tests_require, + 'dev': dev_requires, }, entry_points={ 'paste.app_factory': [ diff --git a/docs/quick_tutorial/authorization/setup.py b/docs/quick_tutorial/authorization/setup.py index b38be63a3..5c51563af 100644 --- a/docs/quick_tutorial/authorization/setup.py +++ b/docs/quick_tutorial/authorization/setup.py @@ -6,14 +6,14 @@ requires = [ 'bcrypt', 'pyramid', 'pyramid_chameleon', - 'pyramid_debugtoolbar', 'waitress', ] # List of dependencies installed via `pip install -e ".[testing]"` # by virtue of the Setuptools `extras_require` value in the Python # dictionary below. -tests_require = [ +dev_requires = [ + 'pyramid_debugtoolbar', 'pytest', 'webtest', ] @@ -22,7 +22,7 @@ setup( name='tutorial', install_requires=requires, extras_require={ - 'testing': tests_require, + 'dev': dev_requires, }, entry_points={ 'paste.app_factory': [ diff --git a/docs/quick_tutorial/databases/setup.py b/docs/quick_tutorial/databases/setup.py index 197617282..5d6935c57 100644 --- a/docs/quick_tutorial/databases/setup.py +++ b/docs/quick_tutorial/databases/setup.py @@ -6,7 +6,6 @@ requires = [ 'deform', 'pyramid', 'pyramid_chameleon', - 'pyramid_debugtoolbar', 'pyramid_tm', 'sqlalchemy', 'waitress', @@ -16,7 +15,8 @@ requires = [ # List of dependencies installed via `pip install -e ".[testing]"` # by virtue of the Setuptools `extras_require` value in the Python # dictionary below. -tests_require = [ +dev_requires = [ + 'pyramid_debugtoolbar', 'pytest', 'webtest', ] @@ -25,7 +25,7 @@ setup( name='tutorial', install_requires=requires, extras_require={ - 'testing': tests_require, + 'dev': dev_requires, }, entry_points={ 'paste.app_factory': [ diff --git a/docs/quick_tutorial/debugtoolbar/setup.py b/docs/quick_tutorial/debugtoolbar/setup.py index 5fee31f01..6120d7a2f 100644 --- a/docs/quick_tutorial/debugtoolbar/setup.py +++ b/docs/quick_tutorial/debugtoolbar/setup.py @@ -4,13 +4,19 @@ from setuptools import setup # by virtue of the Setuptools `install_requires` value below. requires = [ 'pyramid', - 'pyramid_debugtoolbar', 'waitress', ] +dev_requires = [ + 'pyramid_debugtoolbar', +] + setup( name='tutorial', install_requires=requires, + extras_require={ + 'dev': dev_requires, + }, entry_points={ 'paste.app_factory': [ 'main = tutorial:main' diff --git a/docs/quick_tutorial/forms/setup.py b/docs/quick_tutorial/forms/setup.py index f3e80f25e..bf3ddd1a6 100644 --- a/docs/quick_tutorial/forms/setup.py +++ b/docs/quick_tutorial/forms/setup.py @@ -6,14 +6,14 @@ requires = [ 'deform', 'pyramid', 'pyramid_chameleon', - 'pyramid_debugtoolbar', 'waitress', ] # List of dependencies installed via `pip install -e ".[testing]"` # by virtue of the Setuptools `extras_require` value in the Python # dictionary below. -tests_require = [ +dev_requires = [ + 'pyramid_debugtoolbar', 'pytest', 'webtest', ] @@ -22,7 +22,7 @@ setup( name='tutorial', install_requires=requires, extras_require={ - 'testing': tests_require, + 'dev': dev_requires, }, entry_points={ 'paste.app_factory': [ diff --git a/docs/quick_tutorial/functional_testing/setup.py b/docs/quick_tutorial/functional_testing/setup.py index 68a522ad7..278210299 100644 --- a/docs/quick_tutorial/functional_testing/setup.py +++ b/docs/quick_tutorial/functional_testing/setup.py @@ -4,14 +4,14 @@ from setuptools import setup # by virtue of the Setuptools `install_requires` value below. requires = [ 'pyramid', - 'pyramid_debugtoolbar', 'waitress', ] # List of dependencies installed via `pip install -e ".[testing]"` # by virtue of the Setuptools `extras_require` value in the Python # dictionary below. -tests_require = [ +dev_requires = [ + 'pyramid_debugtoolbar', 'pytest', 'webtest', ] @@ -20,7 +20,7 @@ setup( name='tutorial', install_requires=requires, extras_require={ - 'testing': tests_require, + 'dev': dev_requires, }, entry_points={ 'paste.app_factory': [ diff --git a/docs/quick_tutorial/jinja2/setup.py b/docs/quick_tutorial/jinja2/setup.py index 6edd2ab39..fee95d267 100644 --- a/docs/quick_tutorial/jinja2/setup.py +++ b/docs/quick_tutorial/jinja2/setup.py @@ -5,7 +5,6 @@ from setuptools import setup requires = [ 'pyramid', 'pyramid_chameleon', - 'pyramid_debugtoolbar', 'pyramid_jinja2', 'waitress', ] @@ -13,7 +12,8 @@ requires = [ # List of dependencies installed via `pip install -e ".[testing]"` # by virtue of the Setuptools `extras_require` value in the Python # dictionary below. -tests_require = [ +dev_requires = [ + 'pyramid_debugtoolbar', 'pytest', 'webtest', ] @@ -22,7 +22,7 @@ setup( name='tutorial', install_requires=requires, extras_require={ - 'testing': tests_require, + 'dev': dev_requires, }, entry_points={ 'paste.app_factory': [ diff --git a/docs/quick_tutorial/json/setup.py b/docs/quick_tutorial/json/setup.py index a84fe79ee..0c980b613 100644 --- a/docs/quick_tutorial/json/setup.py +++ b/docs/quick_tutorial/json/setup.py @@ -5,14 +5,14 @@ from setuptools import setup requires = [ 'pyramid', 'pyramid_chameleon', - 'pyramid_debugtoolbar', 'waitress', ] # List of dependencies installed via `pip install -e ".[testing]"` # by virtue of the Setuptools `extras_require` value in the Python # dictionary below. -tests_require = [ +dev_requires = [ + 'pyramid_debugtoolbar', 'pytest', 'webtest', ] @@ -21,7 +21,7 @@ setup( name='tutorial', install_requires=requires, extras_require={ - 'testing': tests_require, + 'dev': dev_requires, }, entry_points={ 'paste.app_factory': [ diff --git a/docs/quick_tutorial/logging/setup.py b/docs/quick_tutorial/logging/setup.py index a84fe79ee..0c980b613 100644 --- a/docs/quick_tutorial/logging/setup.py +++ b/docs/quick_tutorial/logging/setup.py @@ -5,14 +5,14 @@ from setuptools import setup requires = [ 'pyramid', 'pyramid_chameleon', - 'pyramid_debugtoolbar', 'waitress', ] # List of dependencies installed via `pip install -e ".[testing]"` # by virtue of the Setuptools `extras_require` value in the Python # dictionary below. -tests_require = [ +dev_requires = [ + 'pyramid_debugtoolbar', 'pytest', 'webtest', ] @@ -21,7 +21,7 @@ setup( name='tutorial', install_requires=requires, extras_require={ - 'testing': tests_require, + 'dev': dev_requires, }, entry_points={ 'paste.app_factory': [ diff --git a/docs/quick_tutorial/more_view_classes/setup.py b/docs/quick_tutorial/more_view_classes/setup.py index a84fe79ee..0c980b613 100644 --- a/docs/quick_tutorial/more_view_classes/setup.py +++ b/docs/quick_tutorial/more_view_classes/setup.py @@ -5,14 +5,14 @@ from setuptools import setup requires = [ 'pyramid', 'pyramid_chameleon', - 'pyramid_debugtoolbar', 'waitress', ] # List of dependencies installed via `pip install -e ".[testing]"` # by virtue of the Setuptools `extras_require` value in the Python # dictionary below. -tests_require = [ +dev_requires = [ + 'pyramid_debugtoolbar', 'pytest', 'webtest', ] @@ -21,7 +21,7 @@ setup( name='tutorial', install_requires=requires, extras_require={ - 'testing': tests_require, + 'dev': dev_requires, }, entry_points={ 'paste.app_factory': [ diff --git a/docs/quick_tutorial/request_response/setup.py b/docs/quick_tutorial/request_response/setup.py index a84fe79ee..0c980b613 100644 --- a/docs/quick_tutorial/request_response/setup.py +++ b/docs/quick_tutorial/request_response/setup.py @@ -5,14 +5,14 @@ from setuptools import setup requires = [ 'pyramid', 'pyramid_chameleon', - 'pyramid_debugtoolbar', 'waitress', ] # List of dependencies installed via `pip install -e ".[testing]"` # by virtue of the Setuptools `extras_require` value in the Python # dictionary below. -tests_require = [ +dev_requires = [ + 'pyramid_debugtoolbar', 'pytest', 'webtest', ] @@ -21,7 +21,7 @@ setup( name='tutorial', install_requires=requires, extras_require={ - 'testing': tests_require, + 'dev': dev_requires, }, entry_points={ 'paste.app_factory': [ diff --git a/docs/quick_tutorial/routing/setup.py b/docs/quick_tutorial/routing/setup.py index a84fe79ee..0c980b613 100644 --- a/docs/quick_tutorial/routing/setup.py +++ b/docs/quick_tutorial/routing/setup.py @@ -5,14 +5,14 @@ from setuptools import setup requires = [ 'pyramid', 'pyramid_chameleon', - 'pyramid_debugtoolbar', 'waitress', ] # List of dependencies installed via `pip install -e ".[testing]"` # by virtue of the Setuptools `extras_require` value in the Python # dictionary below. -tests_require = [ +dev_requires = [ + 'pyramid_debugtoolbar', 'pytest', 'webtest', ] @@ -21,7 +21,7 @@ setup( name='tutorial', install_requires=requires, extras_require={ - 'testing': tests_require, + 'dev': dev_requires, }, entry_points={ 'paste.app_factory': [ diff --git a/docs/quick_tutorial/sessions/setup.py b/docs/quick_tutorial/sessions/setup.py index a84fe79ee..0c980b613 100644 --- a/docs/quick_tutorial/sessions/setup.py +++ b/docs/quick_tutorial/sessions/setup.py @@ -5,14 +5,14 @@ from setuptools import setup requires = [ 'pyramid', 'pyramid_chameleon', - 'pyramid_debugtoolbar', 'waitress', ] # List of dependencies installed via `pip install -e ".[testing]"` # by virtue of the Setuptools `extras_require` value in the Python # dictionary below. -tests_require = [ +dev_requires = [ + 'pyramid_debugtoolbar', 'pytest', 'webtest', ] @@ -21,7 +21,7 @@ setup( name='tutorial', install_requires=requires, extras_require={ - 'testing': tests_require, + 'dev': dev_requires, }, entry_points={ 'paste.app_factory': [ diff --git a/docs/quick_tutorial/static_assets/setup.py b/docs/quick_tutorial/static_assets/setup.py index a84fe79ee..0c980b613 100644 --- a/docs/quick_tutorial/static_assets/setup.py +++ b/docs/quick_tutorial/static_assets/setup.py @@ -5,14 +5,14 @@ from setuptools import setup requires = [ 'pyramid', 'pyramid_chameleon', - 'pyramid_debugtoolbar', 'waitress', ] # List of dependencies installed via `pip install -e ".[testing]"` # by virtue of the Setuptools `extras_require` value in the Python # dictionary below. -tests_require = [ +dev_requires = [ + 'pyramid_debugtoolbar', 'pytest', 'webtest', ] @@ -21,7 +21,7 @@ setup( name='tutorial', install_requires=requires, extras_require={ - 'testing': tests_require, + 'dev': dev_requires, }, entry_points={ 'paste.app_factory': [ diff --git a/docs/quick_tutorial/templating/setup.py b/docs/quick_tutorial/templating/setup.py index a84fe79ee..0c980b613 100644 --- a/docs/quick_tutorial/templating/setup.py +++ b/docs/quick_tutorial/templating/setup.py @@ -5,14 +5,14 @@ from setuptools import setup requires = [ 'pyramid', 'pyramid_chameleon', - 'pyramid_debugtoolbar', 'waitress', ] # List of dependencies installed via `pip install -e ".[testing]"` # by virtue of the Setuptools `extras_require` value in the Python # dictionary below. -tests_require = [ +dev_requires = [ + 'pyramid_debugtoolbar', 'pytest', 'webtest', ] @@ -21,7 +21,7 @@ setup( name='tutorial', install_requires=requires, extras_require={ - 'testing': tests_require, + 'dev': dev_requires, }, entry_points={ 'paste.app_factory': [ diff --git a/docs/quick_tutorial/unit_testing/setup.py b/docs/quick_tutorial/unit_testing/setup.py index 34c750843..e9c773dab 100644 --- a/docs/quick_tutorial/unit_testing/setup.py +++ b/docs/quick_tutorial/unit_testing/setup.py @@ -4,14 +4,14 @@ from setuptools import setup # by virtue of the Setuptools `install_requires` value below. requires = [ 'pyramid', - 'pyramid_debugtoolbar', 'waitress', ] # List of dependencies installed via `pip install -e ".[testing]"` # by virtue of the Setuptools `extras_require` value in the Python # dictionary below. -tests_require = [ +dev_requires = [ + 'pyramid_debugtoolbar', 'pytest', ] @@ -19,7 +19,7 @@ setup( name='tutorial', install_requires=requires, extras_require={ - 'testing': tests_require, + 'dev': dev_requires, }, entry_points={ 'paste.app_factory': [ diff --git a/docs/quick_tutorial/view_classes/setup.py b/docs/quick_tutorial/view_classes/setup.py index a84fe79ee..0c980b613 100644 --- a/docs/quick_tutorial/view_classes/setup.py +++ b/docs/quick_tutorial/view_classes/setup.py @@ -5,14 +5,14 @@ from setuptools import setup requires = [ 'pyramid', 'pyramid_chameleon', - 'pyramid_debugtoolbar', 'waitress', ] # List of dependencies installed via `pip install -e ".[testing]"` # by virtue of the Setuptools `extras_require` value in the Python # dictionary below. -tests_require = [ +dev_requires = [ + 'pyramid_debugtoolbar', 'pytest', 'webtest', ] @@ -21,7 +21,7 @@ setup( name='tutorial', install_requires=requires, extras_require={ - 'testing': tests_require, + 'dev': dev_requires, }, entry_points={ 'paste.app_factory': [ diff --git a/docs/quick_tutorial/views/setup.py b/docs/quick_tutorial/views/setup.py index 68a522ad7..278210299 100644 --- a/docs/quick_tutorial/views/setup.py +++ b/docs/quick_tutorial/views/setup.py @@ -4,14 +4,14 @@ from setuptools import setup # by virtue of the Setuptools `install_requires` value below. requires = [ 'pyramid', - 'pyramid_debugtoolbar', 'waitress', ] # List of dependencies installed via `pip install -e ".[testing]"` # by virtue of the Setuptools `extras_require` value in the Python # dictionary below. -tests_require = [ +dev_requires = [ + 'pyramid_debugtoolbar', 'pytest', 'webtest', ] @@ -20,7 +20,7 @@ setup( name='tutorial', install_requires=requires, extras_require={ - 'testing': tests_require, + 'dev': dev_requires, }, entry_points={ 'paste.app_factory': [ -- cgit v1.2.3 From 43da8c96b77342b9d2203da9f32dc6b8db04e2a8 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Mon, 8 Oct 2018 23:55:40 -0700 Subject: Fix comments in `setup.py`s --- docs/quick_tutorial/authentication/setup.py | 4 ++-- docs/quick_tutorial/authorization/setup.py | 4 ++-- docs/quick_tutorial/databases/setup.py | 4 ++-- docs/quick_tutorial/debugtoolbar/setup.py | 5 ++++- docs/quick_tutorial/forms/setup.py | 4 ++-- docs/quick_tutorial/functional_testing/setup.py | 4 ++-- docs/quick_tutorial/ini/setup.py | 2 +- docs/quick_tutorial/jinja2/setup.py | 4 ++-- docs/quick_tutorial/json/setup.py | 4 ++-- docs/quick_tutorial/logging/setup.py | 4 ++-- docs/quick_tutorial/more_view_classes/setup.py | 4 ++-- docs/quick_tutorial/package/setup.py | 2 +- docs/quick_tutorial/request_response/setup.py | 4 ++-- docs/quick_tutorial/retail_forms/setup.py | 2 +- docs/quick_tutorial/routing/setup.py | 4 ++-- docs/quick_tutorial/sessions/setup.py | 4 ++-- docs/quick_tutorial/static_assets/setup.py | 4 ++-- docs/quick_tutorial/templating/setup.py | 4 ++-- docs/quick_tutorial/unit_testing/setup.py | 4 ++-- docs/quick_tutorial/view_classes/setup.py | 4 ++-- docs/quick_tutorial/views/setup.py | 4 ++-- 21 files changed, 41 insertions(+), 38 deletions(-) (limited to 'docs') diff --git a/docs/quick_tutorial/authentication/setup.py b/docs/quick_tutorial/authentication/setup.py index 5c51563af..64366a2df 100644 --- a/docs/quick_tutorial/authentication/setup.py +++ b/docs/quick_tutorial/authentication/setup.py @@ -1,6 +1,6 @@ from setuptools import setup -# List of dependencies installed via `pip install -e .`. +# List of dependencies installed via `pip install -e .` # by virtue of the Setuptools `install_requires` value below. requires = [ 'bcrypt', @@ -9,7 +9,7 @@ requires = [ 'waitress', ] -# List of dependencies installed via `pip install -e ".[testing]"` +# List of dependencies installed via `pip install -e ".[dev]"` # by virtue of the Setuptools `extras_require` value in the Python # dictionary below. dev_requires = [ diff --git a/docs/quick_tutorial/authorization/setup.py b/docs/quick_tutorial/authorization/setup.py index 5c51563af..64366a2df 100644 --- a/docs/quick_tutorial/authorization/setup.py +++ b/docs/quick_tutorial/authorization/setup.py @@ -1,6 +1,6 @@ from setuptools import setup -# List of dependencies installed via `pip install -e .`. +# List of dependencies installed via `pip install -e .` # by virtue of the Setuptools `install_requires` value below. requires = [ 'bcrypt', @@ -9,7 +9,7 @@ requires = [ 'waitress', ] -# List of dependencies installed via `pip install -e ".[testing]"` +# List of dependencies installed via `pip install -e ".[dev]"` # by virtue of the Setuptools `extras_require` value in the Python # dictionary below. dev_requires = [ diff --git a/docs/quick_tutorial/databases/setup.py b/docs/quick_tutorial/databases/setup.py index 5d6935c57..c4e4ae2f2 100644 --- a/docs/quick_tutorial/databases/setup.py +++ b/docs/quick_tutorial/databases/setup.py @@ -1,6 +1,6 @@ from setuptools import setup -# List of dependencies installed via `pip install -e .`. +# List of dependencies installed via `pip install -e .` # by virtue of the Setuptools `install_requires` value below. requires = [ 'deform', @@ -12,7 +12,7 @@ requires = [ 'zope.sqlalchemy', ] -# List of dependencies installed via `pip install -e ".[testing]"` +# List of dependencies installed via `pip install -e ".[dev]"` # by virtue of the Setuptools `extras_require` value in the Python # dictionary below. dev_requires = [ diff --git a/docs/quick_tutorial/debugtoolbar/setup.py b/docs/quick_tutorial/debugtoolbar/setup.py index 6120d7a2f..53bc0f5c7 100644 --- a/docs/quick_tutorial/debugtoolbar/setup.py +++ b/docs/quick_tutorial/debugtoolbar/setup.py @@ -1,12 +1,15 @@ from setuptools import setup -# List of dependencies installed via `pip install -e .`. +# List of dependencies installed via `pip install -e .` # by virtue of the Setuptools `install_requires` value below. requires = [ 'pyramid', 'waitress', ] +# List of dependencies installed via `pip install -e ".[dev]"` +# by virtue of the Setuptools `extras_require` value in the Python +# dictionary below. dev_requires = [ 'pyramid_debugtoolbar', ] diff --git a/docs/quick_tutorial/forms/setup.py b/docs/quick_tutorial/forms/setup.py index bf3ddd1a6..0e9ea72bc 100644 --- a/docs/quick_tutorial/forms/setup.py +++ b/docs/quick_tutorial/forms/setup.py @@ -1,6 +1,6 @@ from setuptools import setup -# List of dependencies installed via `pip install -e .`. +# List of dependencies installed via `pip install -e .` # by virtue of the Setuptools `install_requires` value below. requires = [ 'deform', @@ -9,7 +9,7 @@ requires = [ 'waitress', ] -# List of dependencies installed via `pip install -e ".[testing]"` +# List of dependencies installed via `pip install -e ".[dev]"` # by virtue of the Setuptools `extras_require` value in the Python # dictionary below. dev_requires = [ diff --git a/docs/quick_tutorial/functional_testing/setup.py b/docs/quick_tutorial/functional_testing/setup.py index 278210299..a0fa8217c 100644 --- a/docs/quick_tutorial/functional_testing/setup.py +++ b/docs/quick_tutorial/functional_testing/setup.py @@ -1,13 +1,13 @@ from setuptools import setup -# List of dependencies installed via `pip install -e .`. +# List of dependencies installed via `pip install -e .` # by virtue of the Setuptools `install_requires` value below. requires = [ 'pyramid', 'waitress', ] -# List of dependencies installed via `pip install -e ".[testing]"` +# List of dependencies installed via `pip install -e ".[dev]"` # by virtue of the Setuptools `extras_require` value in the Python # dictionary below. dev_requires = [ diff --git a/docs/quick_tutorial/ini/setup.py b/docs/quick_tutorial/ini/setup.py index 1ecf9c4ff..f1d06fe75 100644 --- a/docs/quick_tutorial/ini/setup.py +++ b/docs/quick_tutorial/ini/setup.py @@ -1,6 +1,6 @@ from setuptools import setup -# List of dependencies installed via `pip install -e .`. +# List of dependencies installed via `pip install -e .` # by virtue of the Setuptools `install_requires` value below. requires = [ 'pyramid', diff --git a/docs/quick_tutorial/jinja2/setup.py b/docs/quick_tutorial/jinja2/setup.py index fee95d267..ea2c59045 100644 --- a/docs/quick_tutorial/jinja2/setup.py +++ b/docs/quick_tutorial/jinja2/setup.py @@ -1,6 +1,6 @@ from setuptools import setup -# List of dependencies installed via `pip install -e .`. +# List of dependencies installed via `pip install -e .` # by virtue of the Setuptools `install_requires` value below. requires = [ 'pyramid', @@ -9,7 +9,7 @@ requires = [ 'waitress', ] -# List of dependencies installed via `pip install -e ".[testing]"` +# List of dependencies installed via `pip install -e ".[dev]"` # by virtue of the Setuptools `extras_require` value in the Python # dictionary below. dev_requires = [ diff --git a/docs/quick_tutorial/json/setup.py b/docs/quick_tutorial/json/setup.py index 0c980b613..e9c068a23 100644 --- a/docs/quick_tutorial/json/setup.py +++ b/docs/quick_tutorial/json/setup.py @@ -1,6 +1,6 @@ from setuptools import setup -# List of dependencies installed via `pip install -e .`. +# List of dependencies installed via `pip install -e .` # by virtue of the Setuptools `install_requires` value below. requires = [ 'pyramid', @@ -8,7 +8,7 @@ requires = [ 'waitress', ] -# List of dependencies installed via `pip install -e ".[testing]"` +# List of dependencies installed via `pip install -e ".[dev]"` # by virtue of the Setuptools `extras_require` value in the Python # dictionary below. dev_requires = [ diff --git a/docs/quick_tutorial/logging/setup.py b/docs/quick_tutorial/logging/setup.py index 0c980b613..e9c068a23 100644 --- a/docs/quick_tutorial/logging/setup.py +++ b/docs/quick_tutorial/logging/setup.py @@ -1,6 +1,6 @@ from setuptools import setup -# List of dependencies installed via `pip install -e .`. +# List of dependencies installed via `pip install -e .` # by virtue of the Setuptools `install_requires` value below. requires = [ 'pyramid', @@ -8,7 +8,7 @@ requires = [ 'waitress', ] -# List of dependencies installed via `pip install -e ".[testing]"` +# List of dependencies installed via `pip install -e ".[dev]"` # by virtue of the Setuptools `extras_require` value in the Python # dictionary below. dev_requires = [ diff --git a/docs/quick_tutorial/more_view_classes/setup.py b/docs/quick_tutorial/more_view_classes/setup.py index 0c980b613..e9c068a23 100644 --- a/docs/quick_tutorial/more_view_classes/setup.py +++ b/docs/quick_tutorial/more_view_classes/setup.py @@ -1,6 +1,6 @@ from setuptools import setup -# List of dependencies installed via `pip install -e .`. +# List of dependencies installed via `pip install -e .` # by virtue of the Setuptools `install_requires` value below. requires = [ 'pyramid', @@ -8,7 +8,7 @@ requires = [ 'waitress', ] -# List of dependencies installed via `pip install -e ".[testing]"` +# List of dependencies installed via `pip install -e ".[dev]"` # by virtue of the Setuptools `extras_require` value in the Python # dictionary below. dev_requires = [ diff --git a/docs/quick_tutorial/package/setup.py b/docs/quick_tutorial/package/setup.py index 9667d24bd..910c552ad 100644 --- a/docs/quick_tutorial/package/setup.py +++ b/docs/quick_tutorial/package/setup.py @@ -1,6 +1,6 @@ from setuptools import setup -# List of dependencies installed via `pip install -e .`. +# List of dependencies installed via `pip install -e .` # by virtue of the Setuptools `install_requires` value below. requires = [ 'pyramid', diff --git a/docs/quick_tutorial/request_response/setup.py b/docs/quick_tutorial/request_response/setup.py index 0c980b613..e9c068a23 100644 --- a/docs/quick_tutorial/request_response/setup.py +++ b/docs/quick_tutorial/request_response/setup.py @@ -1,6 +1,6 @@ from setuptools import setup -# List of dependencies installed via `pip install -e .`. +# List of dependencies installed via `pip install -e .` # by virtue of the Setuptools `install_requires` value below. requires = [ 'pyramid', @@ -8,7 +8,7 @@ requires = [ 'waitress', ] -# List of dependencies installed via `pip install -e ".[testing]"` +# List of dependencies installed via `pip install -e ".[dev]"` # by virtue of the Setuptools `extras_require` value in the Python # dictionary below. dev_requires = [ diff --git a/docs/quick_tutorial/retail_forms/setup.py b/docs/quick_tutorial/retail_forms/setup.py index 46c10728a..dda0a2cc4 100644 --- a/docs/quick_tutorial/retail_forms/setup.py +++ b/docs/quick_tutorial/retail_forms/setup.py @@ -1,6 +1,6 @@ from setuptools import setup -# List of dependencies installed via `pip install -e .`. +# List of dependencies installed via `pip install -e .` # by virtue of the Setuptools `install_requires` value below. requires = [ 'deform', diff --git a/docs/quick_tutorial/routing/setup.py b/docs/quick_tutorial/routing/setup.py index 0c980b613..e9c068a23 100644 --- a/docs/quick_tutorial/routing/setup.py +++ b/docs/quick_tutorial/routing/setup.py @@ -1,6 +1,6 @@ from setuptools import setup -# List of dependencies installed via `pip install -e .`. +# List of dependencies installed via `pip install -e .` # by virtue of the Setuptools `install_requires` value below. requires = [ 'pyramid', @@ -8,7 +8,7 @@ requires = [ 'waitress', ] -# List of dependencies installed via `pip install -e ".[testing]"` +# List of dependencies installed via `pip install -e ".[dev]"` # by virtue of the Setuptools `extras_require` value in the Python # dictionary below. dev_requires = [ diff --git a/docs/quick_tutorial/sessions/setup.py b/docs/quick_tutorial/sessions/setup.py index 0c980b613..e9c068a23 100644 --- a/docs/quick_tutorial/sessions/setup.py +++ b/docs/quick_tutorial/sessions/setup.py @@ -1,6 +1,6 @@ from setuptools import setup -# List of dependencies installed via `pip install -e .`. +# List of dependencies installed via `pip install -e .` # by virtue of the Setuptools `install_requires` value below. requires = [ 'pyramid', @@ -8,7 +8,7 @@ requires = [ 'waitress', ] -# List of dependencies installed via `pip install -e ".[testing]"` +# List of dependencies installed via `pip install -e ".[dev]"` # by virtue of the Setuptools `extras_require` value in the Python # dictionary below. dev_requires = [ diff --git a/docs/quick_tutorial/static_assets/setup.py b/docs/quick_tutorial/static_assets/setup.py index 0c980b613..e9c068a23 100644 --- a/docs/quick_tutorial/static_assets/setup.py +++ b/docs/quick_tutorial/static_assets/setup.py @@ -1,6 +1,6 @@ from setuptools import setup -# List of dependencies installed via `pip install -e .`. +# List of dependencies installed via `pip install -e .` # by virtue of the Setuptools `install_requires` value below. requires = [ 'pyramid', @@ -8,7 +8,7 @@ requires = [ 'waitress', ] -# List of dependencies installed via `pip install -e ".[testing]"` +# List of dependencies installed via `pip install -e ".[dev]"` # by virtue of the Setuptools `extras_require` value in the Python # dictionary below. dev_requires = [ diff --git a/docs/quick_tutorial/templating/setup.py b/docs/quick_tutorial/templating/setup.py index 0c980b613..e9c068a23 100644 --- a/docs/quick_tutorial/templating/setup.py +++ b/docs/quick_tutorial/templating/setup.py @@ -1,6 +1,6 @@ from setuptools import setup -# List of dependencies installed via `pip install -e .`. +# List of dependencies installed via `pip install -e .` # by virtue of the Setuptools `install_requires` value below. requires = [ 'pyramid', @@ -8,7 +8,7 @@ requires = [ 'waitress', ] -# List of dependencies installed via `pip install -e ".[testing]"` +# List of dependencies installed via `pip install -e ".[dev]"` # by virtue of the Setuptools `extras_require` value in the Python # dictionary below. dev_requires = [ diff --git a/docs/quick_tutorial/unit_testing/setup.py b/docs/quick_tutorial/unit_testing/setup.py index e9c773dab..a5f8a250b 100644 --- a/docs/quick_tutorial/unit_testing/setup.py +++ b/docs/quick_tutorial/unit_testing/setup.py @@ -1,13 +1,13 @@ from setuptools import setup -# List of dependencies installed via `pip install -e .`. +# List of dependencies installed via `pip install -e .` # by virtue of the Setuptools `install_requires` value below. requires = [ 'pyramid', 'waitress', ] -# List of dependencies installed via `pip install -e ".[testing]"` +# List of dependencies installed via `pip install -e ".[dev]"` # by virtue of the Setuptools `extras_require` value in the Python # dictionary below. dev_requires = [ diff --git a/docs/quick_tutorial/view_classes/setup.py b/docs/quick_tutorial/view_classes/setup.py index 0c980b613..e9c068a23 100644 --- a/docs/quick_tutorial/view_classes/setup.py +++ b/docs/quick_tutorial/view_classes/setup.py @@ -1,6 +1,6 @@ from setuptools import setup -# List of dependencies installed via `pip install -e .`. +# List of dependencies installed via `pip install -e .` # by virtue of the Setuptools `install_requires` value below. requires = [ 'pyramid', @@ -8,7 +8,7 @@ requires = [ 'waitress', ] -# List of dependencies installed via `pip install -e ".[testing]"` +# List of dependencies installed via `pip install -e ".[dev]"` # by virtue of the Setuptools `extras_require` value in the Python # dictionary below. dev_requires = [ diff --git a/docs/quick_tutorial/views/setup.py b/docs/quick_tutorial/views/setup.py index 278210299..a0fa8217c 100644 --- a/docs/quick_tutorial/views/setup.py +++ b/docs/quick_tutorial/views/setup.py @@ -1,13 +1,13 @@ from setuptools import setup -# List of dependencies installed via `pip install -e .`. +# List of dependencies installed via `pip install -e .` # by virtue of the Setuptools `install_requires` value below. requires = [ 'pyramid', 'waitress', ] -# List of dependencies installed via `pip install -e ".[testing]"` +# List of dependencies installed via `pip install -e ".[dev]"` # by virtue of the Setuptools `extras_require` value in the Python # dictionary below. dev_requires = [ -- cgit v1.2.3 From 23fbcac9c35c5f74a1258a72100518fcff3b03e3 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Mon, 8 Oct 2018 23:57:55 -0700 Subject: Use correct invocation of `pip install - e ".[dev]"` instead of [testing] --- docs/quick_tutorial/debugtoolbar.rst | 5 +++-- docs/quick_tutorial/functional_testing.rst | 4 ++-- docs/quick_tutorial/tutorial_approach.rst | 2 +- docs/quick_tutorial/unit_testing.rst | 4 ++-- 4 files changed, 8 insertions(+), 7 deletions(-) (limited to 'docs') diff --git a/docs/quick_tutorial/debugtoolbar.rst b/docs/quick_tutorial/debugtoolbar.rst index dbd93a6cb..1c4d600d1 100644 --- a/docs/quick_tutorial/debugtoolbar.rst +++ b/docs/quick_tutorial/debugtoolbar.rst @@ -102,8 +102,9 @@ temporarily. Extra credit ============ -#. We added ``pyramid_debugtoolbar`` to the list of ``install_requires`` dependencies in ``debugtoolbar/setup.py`` because this tutorial is for development and educational purposes only. - In what cases would you *not* want to add ``pyramid_debugtoolbar`` to your dependencies? +#. We added ``pyramid_debugtoolbar`` to the list of ``dev_requires`` dependencies in ``debugtoolbar/setup.py``. + We then installed the dependencies via ``pip install -e ".[dev]"`` by virtue of the Setuptools ``extras_require`` value in the Python dictionary. + Why did we add them there instead of in the ``requires`` list? #. Introduce a bug into your application. Change: diff --git a/docs/quick_tutorial/functional_testing.rst b/docs/quick_tutorial/functional_testing.rst index b09c68b36..a4676d7a5 100644 --- a/docs/quick_tutorial/functional_testing.rst +++ b/docs/quick_tutorial/functional_testing.rst @@ -45,11 +45,11 @@ Steps :emphasize-lines: 16 #. Install our project and its newly added dependency. - Note that we use the extra specifier ``[testing]`` to install testing requirements and surround it with double quote marks. + Note that we use the extra specifier ``[dev]`` to install testing requirements and surround it with double quote marks. .. code-block:: bash - $VENV/bin/pip install -e ".[testing]" + $VENV/bin/pip install -e ".[dev]" #. Let's extend ``functional_testing/tutorial/tests.py`` to include a functional test: diff --git a/docs/quick_tutorial/tutorial_approach.rst b/docs/quick_tutorial/tutorial_approach.rst index 0b9212e62..a16bce406 100644 --- a/docs/quick_tutorial/tutorial_approach.rst +++ b/docs/quick_tutorial/tutorial_approach.rst @@ -45,4 +45,4 @@ For most steps you will copy an earlier step's directory to a new directory, cha For a few steps, you won't copy an earlier step's directory, but you will still need to install your project with ``$VENV/bin/pip install -e .``. -Finally for a few steps, you might add a dependency to your project in its ``setup.py`` file, and then install both the dependency and the project with either ``$VENV/bin/pip install -e .`` or ``$VENV/bin/pip install -e ".[testing]"``. +Finally for a few steps, you might add a dependency to your project in its ``setup.py`` file, and then install both the dependency and the project with either ``$VENV/bin/pip install -e .`` or ``$VENV/bin/pip install -e ".[dev]"``. diff --git a/docs/quick_tutorial/unit_testing.rst b/docs/quick_tutorial/unit_testing.rst index 283730f0f..4170e9e06 100644 --- a/docs/quick_tutorial/unit_testing.rst +++ b/docs/quick_tutorial/unit_testing.rst @@ -57,11 +57,11 @@ Steps :emphasize-lines: 11-16, 21-23 #. Install our project and its newly added dependency. - Note that we use the extra specifier ``[testing]`` to install testing requirements and surround it with double quote marks. + Note that we use the extra specifier ``[dev]`` to install testing requirements and surround it with double quote marks. .. code-block:: bash - $VENV/bin/pip install -e ".[testing]" + $VENV/bin/pip install -e ".[dev]" #. Now we write a simple unit test in ``unit_testing/tutorial/tests.py``: -- cgit v1.2.3 From beeb8ee80c1d0823f965e5826ce3633972904dab Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Tue, 9 Oct 2018 00:11:51 -0700 Subject: Align emphasize-lines with setup.py code --- docs/quick_tutorial/databases.rst | 2 +- docs/quick_tutorial/debugtoolbar.rst | 2 +- docs/quick_tutorial/jinja2.rst | 2 +- docs/quick_tutorial/unit_testing.rst | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'docs') diff --git a/docs/quick_tutorial/databases.rst b/docs/quick_tutorial/databases.rst index 1d499cc9d..db75d70ce 100644 --- a/docs/quick_tutorial/databases.rst +++ b/docs/quick_tutorial/databases.rst @@ -51,7 +51,7 @@ Steps .. literalinclude:: databases/setup.py :linenos: - :emphasize-lines: 10-11, 13, 34-36 + :emphasize-lines: 9-10, 12, 34-36 .. note:: We aren't yet doing ``$VENV/bin/pip install -e .`` because we need to write a script and update configuration first. diff --git a/docs/quick_tutorial/debugtoolbar.rst b/docs/quick_tutorial/debugtoolbar.rst index 1c4d600d1..907f3e0b6 100644 --- a/docs/quick_tutorial/debugtoolbar.rst +++ b/docs/quick_tutorial/debugtoolbar.rst @@ -43,7 +43,7 @@ Steps .. literalinclude:: debugtoolbar/setup.py :language: python :linenos: - :emphasize-lines: 7 + :emphasize-lines: 10-16, 20-22 #. Install our project and its newly added dependency. diff --git a/docs/quick_tutorial/jinja2.rst b/docs/quick_tutorial/jinja2.rst index 865a8a6cb..ed9acd955 100644 --- a/docs/quick_tutorial/jinja2.rst +++ b/docs/quick_tutorial/jinja2.rst @@ -33,7 +33,7 @@ Steps .. literalinclude:: jinja2/setup.py :language: python :linenos: - :emphasize-lines: 9 + :emphasize-lines: 8 #. Install our project and its newly added dependency. diff --git a/docs/quick_tutorial/unit_testing.rst b/docs/quick_tutorial/unit_testing.rst index 4170e9e06..dc14a19d0 100644 --- a/docs/quick_tutorial/unit_testing.rst +++ b/docs/quick_tutorial/unit_testing.rst @@ -54,7 +54,7 @@ Steps .. literalinclude:: unit_testing/setup.py :language: python :linenos: - :emphasize-lines: 11-16, 21-23 + :emphasize-lines: 15 #. Install our project and its newly added dependency. Note that we use the extra specifier ``[dev]`` to install testing requirements and surround it with double quote marks. -- cgit v1.2.3 From b15a06346148f6095adf17893490175abc95a494 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Tue, 9 Oct 2018 00:14:00 -0700 Subject: Rearrange introduction of Setuptools and move to debugtoolbar. Replace [testing] with [dev]. Make narrative text more descriptive of what is going on with `extras_require` --- docs/quick_tutorial/debugtoolbar.rst | 10 ++++++++-- docs/quick_tutorial/functional_testing.rst | 2 +- docs/quick_tutorial/unit_testing.rst | 7 +------ 3 files changed, 10 insertions(+), 9 deletions(-) (limited to 'docs') diff --git a/docs/quick_tutorial/debugtoolbar.rst b/docs/quick_tutorial/debugtoolbar.rst index 907f3e0b6..2607c83f2 100644 --- a/docs/quick_tutorial/debugtoolbar.rst +++ b/docs/quick_tutorial/debugtoolbar.rst @@ -38,7 +38,7 @@ Steps cd ..; cp -r ini debugtoolbar; cd debugtoolbar -#. Add ``pyramid_debugtoolbar`` to our project's dependencies in ``setup.py``: +#. Add ``pyramid_debugtoolbar`` to our project's dependencies in ``setup.py`` as a :term:`Setuptools` "extra" for development: .. literalinclude:: debugtoolbar/setup.py :language: python @@ -46,10 +46,11 @@ Steps :emphasize-lines: 10-16, 20-22 #. Install our project and its newly added dependency. + Note that we use the extra specifier ``[dev]`` to install development requirements and surround it and the period with double quote marks. .. code-block:: bash - $VENV/bin/pip install -e . + $VENV/bin/pip install -e ".[dev]" #. Our ``debugtoolbar/development.ini`` gets a configuration entry for ``pyramid.includes``: @@ -96,6 +97,11 @@ experience otherwise inexplicable client-side weirdness, you can shut it off by commenting out the ``pyramid_debugtoolbar`` line in ``pyramid.includes`` temporarily. +Finally we've introduced the concept of :term:`Setuptools` extras. +These are optional or recommended features that may be installed with an "extras" specifier, in this case, ``dev``. +The specifier is the name of a key in a Python dictionary, and is surrounded by square brackets when invoked on the command line, for example, . +The value for the key is a Python list of dependencies. + .. seealso:: See also :ref:`pyramid_debugtoolbar `. diff --git a/docs/quick_tutorial/functional_testing.rst b/docs/quick_tutorial/functional_testing.rst index a4676d7a5..054d03761 100644 --- a/docs/quick_tutorial/functional_testing.rst +++ b/docs/quick_tutorial/functional_testing.rst @@ -45,7 +45,7 @@ Steps :emphasize-lines: 16 #. Install our project and its newly added dependency. - Note that we use the extra specifier ``[dev]`` to install testing requirements and surround it with double quote marks. + Note that we use the extra specifier ``[dev]`` to install testing requirements for development and surround it and the period with double quote marks. .. code-block:: bash diff --git a/docs/quick_tutorial/unit_testing.rst b/docs/quick_tutorial/unit_testing.rst index dc14a19d0..654925347 100644 --- a/docs/quick_tutorial/unit_testing.rst +++ b/docs/quick_tutorial/unit_testing.rst @@ -57,7 +57,7 @@ Steps :emphasize-lines: 15 #. Install our project and its newly added dependency. - Note that we use the extra specifier ``[dev]`` to install testing requirements and surround it with double quote marks. + Note that we use the extra specifier ``[dev]`` to install testing requirements for development and surround it and the period with double quote marks. .. code-block:: bash @@ -102,11 +102,6 @@ Note that our use of ``pyramid.testing.setUp()`` and necessary when your test needs to make use of the ``config`` object (it's a Configurator) to add stuff to the configuration state before calling the view. -Finally we've introduced the concept of :term:`Setuptools` extras. -These are optional or recommended features that may be installed with an "extras" specifier. -The specifier is the name of a key in a Python dictionary, and is surrounded by square brackets when invoked on the command line. -The value for the key is a Python list of dependencies. - Extra credit ============ -- cgit v1.2.3