summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorThomas Watson <twatson52@icloud.com>2024-01-21 11:31:42 -0600
committerThomas Watson <twatson52@icloud.com>2024-03-24 19:21:55 -0500
commit26ccdea3d777937f3dd9607b9b9e3853c996b406 (patch)
tree4ac34988f8476967d8622e9882316460ad90f877 /doc
parentce38ee87c8025862822ea75698763eba30f415d0 (diff)
python3Packages.setuptoolsBuildHook: delete broken setuptoolsShellHook
Broken since the switch to PyPA's build/installer in 6c85fff302615c62bf4f632bca661bc48298b0a3. The hook was always janky and maintainers appear to not want its current implementation in-tree. No replacement is currently planned. However, this leaves the path open for future replacements as a broken hook will no longer be installed by default.
Diffstat (limited to 'doc')
-rw-r--r--doc/languages-frameworks/python.section.md76
1 files changed, 1 insertions, 75 deletions
diff --git a/doc/languages-frameworks/python.section.md b/doc/languages-frameworks/python.section.md
index 049b395dcc25..6bd1ad74435e 100644
--- a/doc/languages-frameworks/python.section.md
+++ b/doc/languages-frameworks/python.section.md
@@ -489,40 +489,6 @@ are used in [`buildPythonPackage`](#buildpythonpackage-function).
with the `pipInstallHook`.
- `unittestCheckHook` will run tests with `python -m unittest discover`. See [example usage](#using-unittestcheckhook).
-### Development mode {#development-mode}
-
-Development or editable mode is supported. To develop Python packages
-[`buildPythonPackage`](#buildpythonpackage-function) has additional logic inside `shellPhase` to run `pip
-install -e . --prefix $TMPDIR/`for the package.
-
-Warning: `shellPhase` is executed only if `setup.py` exists.
-
-Given a `default.nix`:
-
-```nix
-with import <nixpkgs> {};
-
-python3Packages.buildPythonPackage {
- name = "myproject";
- buildInputs = with python3Packages; [ pyramid ];
-
- src = ./.;
-}
-```
-
-Running `nix-shell` with no arguments should give you the environment in which
-the package would be built with `nix-build`.
-
-Shortcut to setup environments with C headers/libraries and Python packages:
-
-```shell
-nix-shell -p python3Packages.pyramid zlib libjpeg git
-```
-
-::: {.note}
-There is a boolean value `lib.inNixShell` set to `true` if nix-shell is invoked.
-:::
-
## User Guide {#user-guide}
### Using Python {#using-python}
@@ -859,8 +825,7 @@ Above, we were mostly just focused on use cases and what to do to get started
creating working Python environments in nix.
Now that you know the basics to be up and running, it is time to take a step
-back and take a deeper look at how Python packages are packaged on Nix. Then,
-we will look at how you can use development mode with your code.
+back and take a deeper look at how Python packages are packaged on Nix.
#### Python library packages in Nixpkgs {#python-library-packages-in-nixpkgs}
@@ -1449,45 +1414,6 @@ documentation source root.
The hook is also available to packages outside the python ecosystem by
referencing it using `sphinxHook` from top-level.
-### Develop local package {#develop-local-package}
-
-As a Python developer you're likely aware of [development mode](http://setuptools.readthedocs.io/en/latest/setuptools.html#development-mode)
-(`python setup.py develop`); instead of installing the package this command
-creates a special link to the project code. That way, you can run updated code
-without having to reinstall after each and every change you make. Development
-mode is also available. Let's see how you can use it.
-
-In the previous Nix expression the source was fetched from a url. We can also
-refer to a local source instead using `src = ./path/to/source/tree;`
-
-If we create a `shell.nix` file which calls [`buildPythonPackage`](#buildpythonpackage-function), and if `src`
-is a local source, and if the local source has a `setup.py`, then development
-mode is activated.
-
-In the following example, we create a simple environment that has a Python 3.11
-version of our package in it, as well as its dependencies and other packages we
-like to have in the environment, all specified with `dependencies`.
-
-```nix
-with import <nixpkgs> {};
-with python311Packages;
-
-buildPythonPackage rec {
- name = "mypackage";
- src = ./path/to/package/source;
- dependencies = [
- pytest
- numpy
- ];
- propagatedBuildInputs = [
- pkgs.libsndfile
- ];
-}
-```
-
-It is important to note that due to how development mode is implemented on Nix
-it is not possible to have multiple packages simultaneously in development mode.
-
### Organising your packages {#organising-your-packages}
So far we discussed how you can use Python on Nix, and how you can develop with