Unverified Commit e667a3d2 authored by Martin Weinelt's avatar Martin Weinelt Committed by GitHub
Browse files

doc: Clarify that fetchPypi is not preferred for python (#405714)

parents 0cc343a5 9d2e92d7
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -2117,6 +2117,7 @@ because we can only provide security support for non-vendored dependencies.

We recommend [nix-init](https://github.com/nix-community/nix-init) for creating new python packages within nixpkgs,
as it already prefetches the source, parses dependencies for common formats and prefills most things in `meta`.
When using the tool, pull from the original source repository instead of PyPI, if possible.

See also [contributing section](#contributing).

@@ -2190,6 +2191,8 @@ The following rules are desired to be respected:
  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`.
* It's generally preferable to fetch `src` directly from the repo and not from
  PyPI. Use `fetchPypi` when there's a clear technical reason to do so.
* Packages from sources such as GitHub and GitLab that do not exist on PyPI
  should not use a name that is already used on PyPI. When possible, they should
  use the package repository name prefixed with the owner (e.g. organization) name