tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
Doc: fix python override examples
Frederik Rietdijk
9 years ago
95021f06
c7bbe3dd
+19
-5
1 changed file
expand all
collapse all
unified
split
doc
languages-frameworks
python.md
+19
-5
doc/languages-frameworks/python.md
···
715
In the following example we change the name of the package `pandas` to `foo`.
716
```
717
newpkgs = pkgs.overridePackages(self: super: rec {
718
-
python35Packages = super.python35Packages.override {
719
-
self = python35Packages // { pandas = python35Packages.pandas.override{name="foo";};};
720
};
721
});
722
```
···
727
(let
728
729
newpkgs = pkgs.overridePackages(self: super: rec {
730
-
python35Packages = super.python35Packages.override {
731
-
self = python35Packages // { pandas = python35Packages.pandas.override{name="foo";};};
732
};
733
});
734
in newpkgs.python35.withPackages (ps: [ps.blaze])
···
743
744
newpkgs = pkgs.overridePackages(self: super: rec {
745
python35Packages = super.python35Packages.override {
746
-
self = python35Packages // { scipy = python35Packages.scipy_0_16;};
747
};
748
});
749
in newpkgs.python35.withPackages (ps: [ps.blaze])
750
).env
751
```
752
The requested package `blaze` depends upon `pandas` which itself depends on `scipy`.
0
0
0
0
0
0
0
0
0
0
0
0
0
0
753
754
### `python setup.py bdist_wheel` cannot create .whl
755
···
715
In the following example we change the name of the package `pandas` to `foo`.
716
```
717
newpkgs = pkgs.overridePackages(self: super: rec {
718
+
python35Packages = (super.python35Packages.override { self = python35Packages;})
719
+
// { pandas = super.python35Packages.pandas.override {name = "foo";};
720
};
721
});
722
```
···
727
(let
728
729
newpkgs = pkgs.overridePackages(self: super: rec {
730
+
python35Packages = (super.python35Packages.override { self = python35Packages;})
731
+
// { pandas = super.python35Packages.pandas.override {name = "foo";};
732
};
733
});
734
in newpkgs.python35.withPackages (ps: [ps.blaze])
···
743
744
newpkgs = pkgs.overridePackages(self: super: rec {
745
python35Packages = super.python35Packages.override {
746
+
self = python35Packages // { scipy = python35Packages.scipy_0_17;};
747
};
748
});
749
in newpkgs.python35.withPackages (ps: [ps.blaze])
750
).env
751
```
752
The requested package `blaze` depends upon `pandas` which itself depends on `scipy`.
753
+
754
+
A similar example but now using `django`
755
+
```
756
+
with import <nixpkgs> {};
757
+
758
+
(let
759
+
760
+
newpkgs = pkgs.overridePackages(self: super: rec {
761
+
python27Packages = (super.python27Packages.override {self = python27Packages;})
762
+
// { django = super.python27Packages.django_1_9; };
763
+
});
764
+
in newpkgs.python27.withPackages (ps: [ps.django_guardian ])
765
+
).env
766
+
```
767
768
### `python setup.py bdist_wheel` cannot create .whl
769