You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: package-structure-code/declare-dependencies.md
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -223,9 +223,9 @@ feature = [
223
223
224
224
:::{figure-md} python-package-dependencies
225
225
226
-
<imgsrc="../images/python-package-dependencies.png"alt="Diagram showing a ven diagram with three sections representing the dependency groups listed above - docs feature and tests. In the center it says yourPackage and lists the core dependencies of that package seaborn and numpy. To the right are two arrows. the first shows the command python - m pip install yourPackage. it them shows how installing your package that way installs only the package and the two core dependencies into a users environment. Below is a second arrow with python -m pip install youPackage[tests]. This leads to an environment with both the package dependencies - yourPackage, seaborn and numpy and also the tests dependencies including pytest and pytest-cov ">
226
+
<imgsrc="../images/python-package-dependencies.png"alt="Diagram showing a ven diagram with three sections representing the dependency groups listed above - docs feature and tests. In the center it says your-package and lists the core dependencies of that package seaborn and numpy. To the right are two arrows. The first shows the command python - m pip install your-package. it them shows how installing your package that way installs only the package and the two core dependencies into a users environment. Below is a second arrow with python -m pip install youPackage[tests]. This leads to an environment with both the package dependencies - your-package, seaborn and numpy and also the tests dependencies including pytest and pytest-cov ">
227
227
228
-
When a user installs your package locally using python -m pip install yourPackage only your package and it's core dependencies get installed. When they install your package`[tests]` pip will install both your package and its core dependencies plus any of the dependencies listed within the tests array of your `[optional.dependencies]` table.
228
+
When a user installs your package locally using python -m pip install your-package only your package and it's core dependencies get installed. When they install your package`[tests]` pip will install both your package and its core dependencies plus any of the dependencies listed within the tests array of your `[optional.dependencies]` table.
229
229
:::
230
230
231
231
:::{admonition} Using `python -m pip install` vs. `pip install`
@@ -278,9 +278,9 @@ quotes to the command in this guide like this:
278
278
In some cases you may see commands without the quotes in guidebooks or contributing
279
279
guides like the example below:
280
280
281
-
`python -m pip install yourPackage[tests]`
281
+
`python -m pip install your-package[tests]`
282
282
283
-
Calling yourPackage[tests] without the double quotes will work on some shells *but not all*.
283
+
Calling your-package[tests] without the double quotes will work on some shells *but not all*.
284
284
285
285
```
286
286
@@ -319,7 +319,7 @@ When you install dependencies using the above syntax:
319
319
The `pyproject.toml` file allows you to list any
320
320
Python package published on PyPI (or on GitHub/ GitLab) as a dependency. Once you create this file, declare dependencies, [build your package](python-package-distribution-files-sdist-wheel.md) and [publish your package to PyPI](publish-python-package-pypi-conda.md), people can install both your package and all of it's dependencies with one command.
321
321
322
-
`python -m pip install yourPackage`
322
+
`python -m pip install your-package`
323
323
324
324
This works great if your package is pure-python (no other languages used).
0 commit comments