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
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -336,11 +336,11 @@ If you want to support conda users, you may want to also maintain a conda enviro
336
336
```{admonition} A note for conda users
337
337
:class: tip
338
338
339
-
If you use a conda environment for developing your tool, keep in mind that when you install your package using `pip install -e .` (or using pip in general), dependencies will be installed from PyPI rather than conda.
339
+
If you use a conda environment for developing your tool, keep in mind that when you install your package using `python -m pip install -e .` (or using pip in general), dependencies will be installed from PyPI rather than conda.
340
340
341
341
Thus, if you are running a conda environment, installing your package in "editable" mode risks dependency conflicts. This is particularly important if you have a spatial package that requires geospatial system libraries like GDAL or another system-level dependency.
342
342
343
-
Alternatively, you can install your package using `pip install -e . --no-deps` to only install the package. And install the rest of your dependencies using a conda environment file.
343
+
Alternatively, you can install your package using `python -m pip install -e . --no-deps` to only install the package. And install the rest of your dependencies using a conda environment file.
Copy file name to clipboardExpand all lines: package-structure-code/pyproject-toml-python-package-metadata.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -168,7 +168,7 @@ what dependencies your package requires.
168
168
169
169
-**dependencies:** dependencies are optional but we strongly suggest you include them in your pyproject.toml. Dependencies will be installed by pip when your project is installed creating a better user-experience.
170
170
171
-
-**`[project.optional-dependencies]`:** the optional or development dependencies will be installed if someone runs `pip install projectname[dev]`. This is a nice way to include your development dependencies for users who may wish to contribute to your project.
171
+
-**`[project.optional-dependencies]`:** the optional or development dependencies will be installed if someone runs `python -m pip install projectname[dev]`. This is a nice way to include your development dependencies for users who may wish to contribute to your project.
172
172
173
173
-**keywords:** These are the keywords that will appear on your PyPI landing page. Think of them as words that people might use to search for your package.
174
174
-**classifiers:** The classifiers section of your metadata is also important for the landing page of your package in PyPI and for filtering of packages in PyPI. A list of [all options for classifiers can be found her](https://PyPI.org/classifiers/)e. Some of the classifiers that you should consider including
@@ -201,13 +201,13 @@ Then specify dependency groups as follows:
201
201
202
202
Following the above example, you install dependencies like this:
203
203
204
-
-`pip install -e .[tests]`
204
+
-`python -m pip install -e .[tests]`
205
205
206
206
The above will install both your package in editable mode and all of the dependencies declared in the tests section of your `[project.optional-dependencies]` table.
207
207
208
208
To install all dependencies and also your package, you'd use:
Copy file name to clipboardExpand all lines: package-structure-code/python-package-build-tools.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -308,7 +308,7 @@ Install your package in editable mode|✅| Flit supports installing your package
308
308
Build your sdist and wheel distributions|✅| Flit can be used to build your packages sdist and wheel distributions.
309
309
```
310
310
311
-
NOTE: _If you are using the most current version of pip, it supports both a symlink approach `flit install -s` and `pip install -e .`_
311
+
NOTE: _If you are using the most current version of pip, it supports both a symlink approach `flit install -s` and `python -m pip install -e .`_
312
312
313
313
```{admonition} Learn more about flit
314
314
* [Why use flit?](https://flit.pypa.io/en/stable/rationale.html)
@@ -351,7 +351,7 @@ Publish to PyPI and test PyPI|✅|Hatch supports publishing to both test PyPI an
351
351
Version Control based versioning|✅ | Hatch offers `hatch_vcs` which is a plugin that uses setuptools_scm to support versioning using git tags. The workflow with `hatch_vcs` is the same as that with `setuptools_scm`.
352
352
Version bumping| ✅ | Hatch supports you bumping the version of your package using standard semantic version terms patch; minor; major
353
353
Follows current packaging standards|✅|Hatch supports current packaging standards for adding metadata to the **pyproject.toml** file.
354
-
Install your package in editable mode|✅| Hatch will install your package into any of its environments by default in editable mode. You can install your package in editable mode manually using `pip install -e .` Hatch mentions [editable installs](https://hatch.pypa.io/latest/config/build/#dev-mode) but refers to pip in its documentation.
354
+
Install your package in editable mode|✅| Hatch will install your package into any of its environments by default in editable mode. You can install your package in editable mode manually using `python -m pip install -e .` Hatch mentions [editable installs](https://hatch.pypa.io/latest/config/build/#dev-mode) but refers to pip in its documentation.
355
355
Build your sdist and wheel distributions|✅| Hatch will build the sdist and wheel distributions
356
356
✨Matrix environment creation to support testing across Python versions✨|✅| The matrix environment creation is a feature that is unique to Hatch in the packaging ecosystem. This feature is useful if you wish to test your package locally across Python versions (instead of using a tool such as tox).
357
357
✨[Nox / MAKEFILE like functionality](https://hatch.pypa.io/latest/environment/#selection)✨| ✅| This feature is also unique to Hatch. This functionality allows you to create workflows in the **pyproject.toml** configuration to do things like serve docs locally and clean your package build directory. This means you may have one less tool in your build workflow.
# use pip list instead of conda list here if you are working in an venv environment rather than a conda envt
528
528
```
529
529
530
-
:::{admonition} What does `pip install -e .` do?
530
+
:::{admonition} What does `python -m pip install -e .` do?
531
531
:class: tip
532
532
533
-
Let's break down `pip install -e .`
533
+
Let's break down `python -m pip install -e .`
534
534
535
-
`pip install -e .` installs your package into the current active
535
+
`python -m pip install -e .` installs your package into the current active
536
536
Python environment in **editable mode** (`-e`). Installing your package in
537
537
editable mode, allows you to work on your code and then test the updates
538
538
interactively in your favorite Python interface. One important caveat of editable mode is that every time you update your code, you may need to restart Python.
@@ -606,7 +606,7 @@ If you wish to share your code without publishing to PyPI you can
606
606
always install packages directly from GitHub using the syntax:
Copy file name to clipboardExpand all lines: tutorials/publish-pypi.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -142,7 +142,7 @@ by default it uses venv[^venv] which is the default environment management tool
142
142
Hatch will:
143
143
144
144
1. Create a new virtualenv (venv) that is located on your computer.
145
-
2. Install your package into the environment in editable mode (similar to `pip install -e`). This means it installs both your project and your project's dependencies as declared in your pyproject.toml file.
145
+
2. Install your package into the environment in editable mode (similar to `python -m pip install -e`). This means it installs both your project and your project's dependencies as declared in your pyproject.toml file.
146
146
147
147
## Step 2: Build your package's sdist and wheel distributions
148
148
@@ -308,7 +308,7 @@ As an example, [check out our pyOpenSci pyosPackage landing page on TestPyPI](ht
308
308
the page has information about the current package version and also
0 commit comments