summaryrefslogtreecommitdiff
path: root/docs/userguide
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2021-07-21 18:05:12 -0400
committerJason R. Coombs <jaraco@jaraco.com>2021-07-21 18:09:29 -0400
commitdb3dd226eb52d437dc8859e19dcef82cbbbba547 (patch)
treeb0d8efb3da16f51e1eb271e0743bb199b867ee78 /docs/userguide
parent0f1b2013fd2d431910c043203f601cb92137ce67 (diff)
downloadpython-setuptools-git-db3dd226eb52d437dc8859e19dcef82cbbbba547.tar.gz
Restore whitespace and single quotes after blacken-docs.
Diffstat (limited to 'docs/userguide')
-rw-r--r--docs/userguide/dependency_management.rst29
-rw-r--r--docs/userguide/entry_point.rst6
-rw-r--r--docs/userguide/package_discovery.rst12
-rw-r--r--docs/userguide/quickstart.rst8
4 files changed, 32 insertions, 23 deletions
diff --git a/docs/userguide/dependency_management.rst b/docs/userguide/dependency_management.rst
index 9071753d..b97896ba 100644
--- a/docs/userguide/dependency_management.rst
+++ b/docs/userguide/dependency_management.rst
@@ -62,8 +62,11 @@ finesse to it, let's start with a simple example.
.. code-block:: python
setup(
- # ...,
- install_requires=["docutils", "BazSpam ==1.1"]
+ ...,
+ install_requires=[
+ 'docutils',
+ 'BazSpam ==1.1',
+ ],
)
@@ -95,10 +98,10 @@ the Python version is older than 3.4. To accomplish this
.. code-block:: python
setup(
- # ...
+ ...,
install_requires=[
"enum34;python_version<'3.4'",
- ]
+ ],
)
Similarly, if you also wish to declare ``pywin32`` with a minimal version of 1.0
@@ -119,11 +122,11 @@ and only install it if the user is using a Windows operating system:
.. code-block:: python
setup(
- # ...
+ ...,
install_requires=[
"enum34;python_version<'3.4'",
"pywin32 >= 1.0;platform_system=='Windows'",
- ]
+ ],
)
The environmental markers that may be used for testing platform types are
@@ -202,8 +205,10 @@ distributions, if the package's dependencies aren't already installed:
.. code-block:: python
setup(
- # ...
- dependency_links=["http://peak.telecommunity.com/snapshots/"],
+ ...,
+ dependency_links=[
+ "http://peak.telecommunity.com/snapshots/",
+ ],
)
@@ -238,7 +243,7 @@ dependencies for it to work:
setup(
name="Project-A",
- # ...
+ ...,
extras_require={
"PDF": ["ReportLab>=1.2", "RXP"],
},
@@ -308,7 +313,11 @@ installed, it might declare the dependency like this:
.. code-block:: python
- setup(name="Project-B", install_requires=["Project-A[PDF]"], ...)
+ setup(
+ name="Project-B",
+ install_requires=["Project-A[PDF]"],
+ ...,
+ )
This will cause ReportLab to be installed along with project A, if project B is
installed -- even if project A was already installed. In this way, a project
diff --git a/docs/userguide/entry_point.rst b/docs/userguide/entry_point.rst
index 3244ce39..c92ccf76 100644
--- a/docs/userguide/entry_point.rst
+++ b/docs/userguide/entry_point.rst
@@ -37,7 +37,7 @@ and ``__main__.py`` providing a hook:
from . import hello_world
- if __name__ == "__main__":
+ if __name__ == '__main__':
hello_world()
After installing the package, the function may be invoked through the
@@ -106,7 +106,7 @@ For example, to find the console script entry points from the example above:
.. code-block:: pycon
>>> from importlib import metadata
- >>> eps = metadata.entry_points()["console_scripts"]
+ >>> eps = metadata.entry_points()['console_scripts']
``eps`` is now a list of ``EntryPoint`` objects, one of which corresponds
to the ``hello-world = timmins:hello_world`` defined above. Each ``EntryPoint``
@@ -125,7 +125,7 @@ the following routine to load (and invoke) such plugins:
.. code-block:: pycon
>>> from importlib import metadata
- >>> eps = metadata.entry_points()["my.plugins"]
+ >>> eps = metadata.entry_points()['my.plugins']
>>> for ep in eps:
... plugin = ep.load()
... plugin()
diff --git a/docs/userguide/package_discovery.rst b/docs/userguide/package_discovery.rst
index e02035b3..551e02e6 100644
--- a/docs/userguide/package_discovery.rst
+++ b/docs/userguide/package_discovery.rst
@@ -35,7 +35,7 @@ included manually in the following manner:
setup(
# ...
- packages=["mypkg1", "mypkg2"]
+ packages=['mypkg1', 'mypkg2']
)
This can get tiresome reallly quickly. To speed things up, we introduce two
@@ -101,9 +101,9 @@ in ``src`` that starts with the name ``pkg`` and not ``additional``:
setup(
# ...
packages=find_packages(
- where="src",
- include=["pkg*"],
- exclude=["additional"],
+ where='src',
+ include=['pkg*'],
+ exclude=['additional'],
),
package_dir={"": "src"}
# ...
@@ -221,7 +221,7 @@ And the ``namespace_packages`` keyword in your ``setup.cfg`` or ``setup.py``:
setup(
# ...
- namespace_packages=["timmins"]
+ namespace_packages=['timmins']
)
And your directory should look like this
@@ -246,6 +246,6 @@ file contains the following:
.. code-block:: python
- __path__ = __import__("pkgutil").extend_path(__path__, __name__)
+ __path__ = __import__('pkgutil').extend_path(__path__, __name__)
The project layout remains the same and ``setup.cfg`` remains the same.
diff --git a/docs/userguide/quickstart.rst b/docs/userguide/quickstart.rst
index 0ab23ca2..1bd04ded 100644
--- a/docs/userguide/quickstart.rst
+++ b/docs/userguide/quickstart.rst
@@ -60,11 +60,11 @@ the minimum
from setuptools import setup
setup(
- name="mypackage",
- version="0.0.1",
- packages=["mypackage"],
+ name='mypackage',
+ version='0.0.1',
+ packages=['mypackage'],
install_requires=[
- "requests",
+ 'requests',
'importlib; python_version == "2.6"',
],
)