summary refs log tree commit diff
path: root/doc/languages-frameworks
diff options
context:
space:
mode:
authorRobert Schütz <dev@schuetz-co.de>2021-03-24 13:03:31 +0100
committerGitHub <noreply@github.com>2021-03-24 13:03:31 +0100
commit7dfc2d269bb21d4ea7fe33d4a51f77215564562c (patch)
tree53e0d7f1a32ece81badd9e68cdf011a6942b75c7 /doc/languages-frameworks
parenta710de5592ebfa0b0b1bef0b0b3feb9174303ac7 (diff)
downloadnixpkgs-7dfc2d269bb21d4ea7fe33d4a51f77215564562c.tar
nixpkgs-7dfc2d269bb21d4ea7fe33d4a51f77215564562c.tar.gz
nixpkgs-7dfc2d269bb21d4ea7fe33d4a51f77215564562c.tar.bz2
nixpkgs-7dfc2d269bb21d4ea7fe33d4a51f77215564562c.tar.lz
nixpkgs-7dfc2d269bb21d4ea7fe33d4a51f77215564562c.tar.xz
nixpkgs-7dfc2d269bb21d4ea7fe33d4a51f77215564562c.tar.zst
nixpkgs-7dfc2d269bb21d4ea7fe33d4a51f77215564562c.zip
doc: improve Python section (#116344)
Avoid confusion as in https://github.com/NixOS/nixpkgs/pull/116325#discussion_r593946638.
Diffstat (limited to 'doc/languages-frameworks')
-rw-r--r--doc/languages-frameworks/python.section.md19
1 files changed, 10 insertions, 9 deletions
diff --git a/doc/languages-frameworks/python.section.md b/doc/languages-frameworks/python.section.md
index 26458c3906e..821d7aa886d 100644
--- a/doc/languages-frameworks/python.section.md
+++ b/doc/languages-frameworks/python.section.md
@@ -638,7 +638,7 @@ are disabled.
 
 #### Using pythonImportsCheck
 
-Although unit tests are highly prefered to valid correctness of a package. Not
+Although unit tests are highly prefered to validate correctness of a package, not
 all packages have test suites that can be ran easily, and some have none at all.
 To help ensure the package still works, `pythonImportsCheck` can attempt to import
 the listed modules.
@@ -1551,13 +1551,11 @@ In a `setup.py` or `setup.cfg` it is common to declare dependencies:
 
 ### Contributing guidelines
 
-Following rules are desired to be respected:
+The following rules are desired to be respected:
 
 * Python libraries are called from `python-packages.nix` and packaged with
   `buildPythonPackage`. The expression of a library should be in
   `pkgs/development/python-modules/<name>/default.nix`.
-* Libraries in `pkgs/top-level/python-packages.nix` are sorted
-  alphanumerically to avoid merge conflicts and ease locating attributes.
 * Python applications live outside of `python-packages.nix` and are packaged
   with `buildPythonApplication`.
 * Make sure libraries build for all Python interpreters.
@@ -1567,8 +1565,11 @@ Following rules are desired to be respected:
   case, when you disable tests, leave a comment explaining why.
 * Commit names of Python libraries should reflect that they are Python
   libraries, so write for example `pythonPackages.numpy: 1.11 -> 1.12`.
-* Attribute names in `python-packages.nix` should be normalized according to
-  [PEP 0503](https://www.python.org/dev/peps/pep-0503/#normalized-names). This
-  means that characters should be converted to lowercase and `.` and `_` should
-  be replaced by a single `-` (foo-bar-baz instead of Foo__Bar.baz )
-* Attribute names in `python-packages.nix` should be sorted alphanumerically.
+* Attribute names in `python-packages.nix` as well as `pname`s should match the
+  library's name on PyPI, but be normalized according to [PEP
+  0503](https://www.python.org/dev/peps/pep-0503/#normalized-names). This means
+  that characters should be converted to lowercase and `.` and `_` should be
+  replaced by a single `-` (foo-bar-baz instead of Foo__Bar.baz).
+  If necessary, `pname` has to be given a different value within `fetchPypi`.
+* Attribute names in `python-packages.nix` should be sorted alphanumerically to
+  avoid merge conflicts and ease locating attributes.