Skip to content

Commit

Permalink
Python: remove modules and pythonFull
Browse files Browse the repository at this point in the history
  • Loading branch information
FRidh committed Oct 10, 2016
1 parent a2720a2 commit 104c50d
Show file tree
Hide file tree
Showing 22 changed files with 61 additions and 108 deletions.
1 change: 0 additions & 1 deletion nixos/modules/services/web-servers/apache-httpd/trac.nix
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ in
pkgs.setuptools
pkgs.pythonPackages.genshi
pkgs.pythonPackages.psycopg2
pkgs.python.modules.sqlite3
subversion
];
};
Expand Down
2 changes: 1 addition & 1 deletion pkgs/applications/misc/loxodo/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ py.buildPythonApplication rec {
sha256 = "1cg0dfcv57ps54f1a0ksib7hgkrbdi9q699w302xyyfyvjcb5dd2";
};

propagatedBuildInputs = with py; [ wxPython python.modules.readline ];
propagatedBuildInputs = with py; [ wxPython ];

postInstall = ''
mv $out/bin/loxodo.py $out/bin/loxodo
Expand Down
2 changes: 1 addition & 1 deletion pkgs/applications/misc/ranger/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ pythonPackages.buildPythonApplication rec {
sha256 = "0yaviybviwdvfg2a0pf2kk28g10k245499xmbpqlai7fv91f7xll";
};

propagatedBuildInputs = [ pythonPackages.python.modules.curses file ];
propagatedBuildInputs = [ file ];

preConfigure = ''
substituteInPlace ranger/ext/img_display.py \
Expand Down
6 changes: 3 additions & 3 deletions pkgs/applications/misc/roxterm/default.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{ stdenv, fetchurl, docbook_xsl, dbus_libs, dbus_glib, expat, gettext
, gsettings_desktop_schemas, gdk_pixbuf, gtk2, gtk3, hicolor_icon_theme
, imagemagick, itstool, librsvg, libtool, libxslt, lockfile, makeWrapper
, pkgconfig, pythonFull, pythonPackages, vte }:
, pkgconfig, python, pythonPackages, vte }:

# TODO: Still getting following warning.
# WARNING **: Error retrieving accessibility bus address: org.freedesktop.DBus.Error.ServiceUnknown: The name org.a11y.Bus was not provided by any .service files
Expand All @@ -19,7 +19,7 @@ in stdenv.mkDerivation rec {

buildInputs =
[ docbook_xsl expat imagemagick itstool librsvg libtool libxslt
makeWrapper pkgconfig pythonFull pythonPackages.lockfile ];
makeWrapper pkgconfig python pythonPackages.lockfile ];

propagatedBuildInputs =
[ dbus_libs dbus_glib gdk_pixbuf gettext gsettings_desktop_schemas gtk2 gtk3 hicolor_icon_theme vte ];
Expand All @@ -29,7 +29,7 @@ in stdenv.mkDerivation rec {
"-I${dbus_libs.lib}/lib/dbus-1.0/include" ];

# Fix up python path so the lockfile library is on it.
PYTHONPATH = stdenv.lib.makeSearchPathOutput "lib" pythonFull.sitePackages [
PYTHONPATH = stdenv.lib.makeSearchPathOutput "lib" python.sitePackages [
pythonPackages.curses pythonPackages.lockfile
];

Expand Down
1 change: 0 additions & 1 deletion pkgs/applications/misc/rtv/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ pythonPackages.buildPythonApplication rec {
six
praw
kitchen
python.modules.curses
praw
] ++ lib.optional (!pythonPackages.isPy3k) futures;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ pythonPackages.buildPythonApplication rec {

propagatedBuildInputs = with pythonPackages; [
makeWrapper pillow jinja2 spambayes pythonPackages.lxml
python.modules.readline pgpdump gnupg1orig
pgpdump gnupg1orig
];

postInstall = ''
Expand Down
3 changes: 0 additions & 3 deletions pkgs/applications/version-management/bazaar/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ pythonPackages.buildPythonApplication rec {
sha256 = "1cysix5k3wa6y7jjck3ckq3abls4gvz570s0v0hxv805nwki4i8d";
};

# Readline support is needed by bzrtools.
propagatedBuildInputs = [ pythonPackages.python.modules.readline ];

doCheck = false;

# Bazaar can't find the certificates alone
Expand Down
6 changes: 3 additions & 3 deletions pkgs/applications/video/kodi/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{ stdenv, lib, fetchurl, makeWrapper
, pkgconfig, cmake, gnumake, yasm, pythonFull
, pkgconfig, cmake, gnumake, yasm, python
, boost, avahi, libdvdcss, lame, autoreconfHook
, gettext, pcre-cpp, yajl, fribidi, which
, openssl, gperf, tinyxml2, taglib, libssh, swig, jre
Expand Down Expand Up @@ -54,7 +54,7 @@ in stdenv.mkDerivation rec {

buildInputs = [
makeWrapper libxml2 gnutls
pkgconfig cmake gnumake yasm pythonFull
pkgconfig cmake gnumake yasm python
boost libmicrohttpd autoreconfHook
gettext pcre-cpp yajl fribidi libva
openssl gperf tinyxml2 taglib libssh swig jre
Expand Down Expand Up @@ -107,7 +107,7 @@ in stdenv.mkDerivation rec {
postInstall = ''
for p in $(ls $out/bin/) ; do
wrapProgram $out/bin/$p \
--prefix PATH ":" "${pythonFull}/bin" \
--prefix PATH ":" "${python}/bin" \
--prefix PATH ":" "${glxinfo}/bin" \
--prefix PATH ":" "${xdpyinfo}/bin" \
--prefix LD_LIBRARY_PATH ":" "${lib.makeLibraryPath
Expand Down
6 changes: 3 additions & 3 deletions pkgs/development/compilers/edk2/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ stdenv, fetchgit, libuuid, pythonFull, iasl }:
{ stdenv, fetchgit, libuuid, python, iasl }:

let

Expand All @@ -18,7 +18,7 @@ edk2 = stdenv.mkDerivation {
sha256 = "0s9ywb8w7xzlnmm4kwzykxkrdaw53b7pky121cc9wjkllzqwyxrb";
};

buildInputs = [ libuuid pythonFull ];
buildInputs = [ libuuid python python.tkinter ];

makeFlags = "-C BaseTools";

Expand All @@ -40,7 +40,7 @@ edk2 = stdenv.mkDerivation {

passthru = {
setup = projectDscPath: attrs: {
buildInputs = [ pythonFull ] ++
buildInputs = [ python python.tkinter ] ++
stdenv.lib.optionals (attrs ? buildInputs) attrs.buildInputs;

configurePhase = ''
Expand Down
6 changes: 3 additions & 3 deletions pkgs/development/interpreters/python/pypy/2.7/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{ stdenv, fetchurl, zlib ? null, zlibSupport ? true, bzip2, pkgconfig, libffi
, sqlite, openssl, ncurses, pythonFull, expat, tcl, tk, xlibsWrapper, libX11
, sqlite, openssl, ncurses, python, expat, tcl, tk, xlibsWrapper, libX11
, makeWrapper, callPackage, self, pypyPackages, gdbm, db }:

assert zlibSupport -> zlib != null;
Expand Down Expand Up @@ -34,7 +34,7 @@ let
patch lib-python/2.7/test/test_pyexpat.py < '${expatch}'
'';

buildInputs = [ bzip2 openssl pkgconfig pythonFull libffi ncurses expat sqlite tk tcl xlibsWrapper libX11 makeWrapper gdbm db ]
buildInputs = [ bzip2 openssl pkgconfig python python.tkinter libffi ncurses expat sqlite tk tcl xlibsWrapper libX11 makeWrapper gdbm db ]
++ stdenv.lib.optional (stdenv ? cc && stdenv.cc.libc != null) stdenv.cc.libc
++ stdenv.lib.optional zlibSupport zlib;

Expand Down Expand Up @@ -62,7 +62,7 @@ let
'';

buildPhase = ''
${pythonFull.interpreter} rpython/bin/rpython --make-jobs="$NIX_BUILD_CORES" -Ojit --batch pypy/goal/targetpypystandalone.py --withmod-_minimal_curses --withmod-unicodedata --withmod-thread --withmod-bz2 --withmod-_multiprocessing
${python.interpreter} rpython/bin/rpython --make-jobs="$NIX_BUILD_CORES" -Ojit --batch pypy/goal/targetpypystandalone.py --withmod-_minimal_curses --withmod-unicodedata --withmod-thread --withmod-bz2 --withmod-_multiprocessing
'';

setupHook = ./setup-hook.sh;
Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/python-modules/matplotlib/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ buildPythonPackage rec {
]
++ stdenv.lib.optional enableGtk2 pygtk
++ stdenv.lib.optionals enableGtk3 [ cairo pycairo gtk3 gobjectIntrospection pygobject3 ]
++ stdenv.lib.optionals enableTk [ tcl tk tkinter libX11 ];
++ stdenv.lib.optionals enableTk [ python.tkinter tcl tk tkinter libX11 ];

patches =
[ ./basedirlist.patch ] ++
Expand Down
2 changes: 1 addition & 1 deletion pkgs/servers/matrix-synapse/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ in pythonPackages.buildPythonApplication rec {
blist canonicaljson daemonize dateutil frozendict pillow pybcrypt pyasn1
pydenticon pymacaroons-pynacl pynacl pyopenssl pysaml2 pytz requests2
service-identity signedjson systemd twisted ujson unpaddedbase64 pyyaml
matrix-angular-sdk bleach netaddr jinja2 psycopg2 python.modules.curses
matrix-angular-sdk bleach netaddr jinja2 psycopg2
ldap3 psutil msgpack
];

Expand Down
2 changes: 1 addition & 1 deletion pkgs/servers/sabnzbd/default.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{stdenv, fetchurl, python, par2cmdline, unzip, unrar, p7zip, makeWrapper}:

let
pythonEnv = python.withPackages(ps: with ps; [ pyopenssl python.modules.sqlite3 cheetah]);
pythonEnv = python.withPackages(ps: with ps; [ pyopenssl cheetah]);
path = stdenv.lib.makeBinPath [ par2cmdline unrar unzip p7zip ];
in stdenv.mkDerivation rec {
version = "1.1.0";
Expand Down
2 changes: 0 additions & 2 deletions pkgs/tools/audio/beets/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,6 @@ in pythonPackages.buildPythonApplication rec {
pythonPackages.pathlib
pythonPackages.pyyaml
pythonPackages.unidecode
pythonPackages.python.modules.sqlite3
pythonPackages.python.modules.readline
] ++ optional enableAcoustid pythonPackages.pyacoustid
++ optional (enableFetchart
|| enableEmbyupdate
Expand Down
4 changes: 2 additions & 2 deletions pkgs/tools/audio/mpdris2/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{ stdenv, fetchurl, autoreconfHook, intltool
, pythonPackages, pythonFull
, pythonPackages
}:

stdenv.mkDerivation rec {
Expand All @@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
};

buildInputs = [ intltool autoreconfHook pythonPackages.wrapPython ];
propagatedBuildInputs = with pythonPackages; [ pythonFull pygtk dbus-python ];
propagatedBuildInputs = with pythonPackages; [ python pygtk dbus-python ];
pythonPath = with pythonPackages; [ mpd pygtk dbus-python notify ];
postInstall = "wrapPythonPrograms";

Expand Down
1 change: 0 additions & 1 deletion pkgs/tools/filesystems/ceph/generic.nix
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ let
};

wrapArgs = "--set PYTHONPATH \"$(toPythonPath $lib)\""
+ " --prefix PYTHONPATH : \"$(toPythonPath ${python.modules.readline})\""
+ " --prefix PYTHONPATH : \"$(toPythonPath ${pythonPackages.flask})\""
+ " --set PATH \"$out/bin\"";
in
Expand Down
14 changes: 8 additions & 6 deletions pkgs/tools/misc/openopc/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{ stdenv, fetchurl, pythonFull }:
{ stdenv, fetchurl, python }:

stdenv.mkDerivation rec {
let
pythonEnv = python.withPackages(ps: [ps.pyro3]);
in stdenv.mkDerivation rec {
name = "openopc-${version}";
version = "1.2.0";

Expand All @@ -13,16 +15,16 @@ stdenv.mkDerivation rec {
installPhase = ''
mkdir -p "$out/bin"
mkdir -p "$out/share/doc/openopc"
mkdir -p "$out/${pythonFull.python.sitePackages}"
mkdir -p "$out/${pythonEnv.python.sitePackages}"
mkdir -p "$out/libexec/opc"
cp src/OpenOPC.py "$out/${pythonFull.python.sitePackages}"
cp src/OpenOPC.py "$out/${pythonEnv.python.sitePackages}"
cp src/opc.py "$out/libexec/opc/"
cat > "$out/bin/opc" << __EOF__
#!${stdenv.shell}
export PYTHONPATH="$out/${pythonFull.python.sitePackages}"
exec ${pythonFull}/bin/${pythonFull.python.executable} "$out/libexec/opc/opc.py" "\$@"
export PYTHONPATH="$out/${pythonEnv.python.sitePackages}"
exec ${pythonEnv}/bin/${pythonEnv.python.executable} "$out/libexec/opc/opc.py" "\$@"
__EOF__
chmod a+x "$out/bin/opc"
Expand Down
2 changes: 1 addition & 1 deletion pkgs/tools/misc/venus/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ stdenv.mkDerivation rec {
doCheck = true;
checkPhase = "python runtests.py";

buildInputs = [ python python.modules.bsddb libxslt
buildInputs = [ python libxslt
libxml2 pythonPackages.genshi pythonPackages.lxml makeWrapper ];

installPhase = ''
Expand Down
2 changes: 1 addition & 1 deletion pkgs/tools/security/fail2ban/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pythonPackages.buildPythonApplication {
sha256 = "1m8gqj35kwrn30rqwd488sgakaisz22xa5v9llvz6gwf4f7ps0a9";
};

propagatedBuildInputs = [ python.modules.sqlite3 gamin ]
propagatedBuildInputs = [ gamin ]
++ (stdenv.lib.optional stdenv.isLinux pythonPackages.systemd);

preConfigure = ''
Expand Down
25 changes: 3 additions & 22 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2153,7 +2153,7 @@ in
ihaskell = callPackage ../development/tools/haskell/ihaskell/wrapper.nix {
inherit (haskellPackages) ihaskell ghcWithPackages;

ipython = pythonFull.buildEnv.override {
ipython = python.buildEnv.override {
extraLibs = with pythonPackages; [ ipython ipykernel jupyter_client notebook ];
};

Expand Down Expand Up @@ -2978,11 +2978,7 @@ in

openobex = callPackage ../tools/bluetooth/openobex { };

openopc = callPackage ../tools/misc/openopc {
pythonFull = python27.buildEnv.override {
extraLibs = [ python27Packages.pyro3 ];
};
};
openopc = callPackage ../tools/misc/openopc { };

openresolv = callPackage ../tools/networking/openresolv { };

Expand Down Expand Up @@ -5535,17 +5531,6 @@ in
self = pypy27;
};

pythonFull = python2Full;
python2Full = python27Full;
python26Full = python26.override {
includeModules = true;
self = python26Full;
};
python27Full = python27.override {
includeModules = true;
self = python27Full;
};

python2nix = callPackage ../tools/package-management/python2nix { };

pythonDocs = recurseIntoAttrs (callPackage ../development/interpreters/python/cpython/docs {});
Expand Down Expand Up @@ -10542,11 +10527,7 @@ in

drbd = callPackage ../os-specific/linux/drbd { };

dstat = callPackage ../os-specific/linux/dstat {
# pythonFull includes the "curses" standard library module, for pretty
# dstat color output
python = pythonFull;
};
dstat = callPackage ../os-specific/linux/dstat { };

libossp_uuid = callPackage ../development/libraries/libossp-uuid { };

Expand Down
Loading

3 comments on commit 104c50d

@bjornfor
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@FRidh: Can we bring back pythonFull (and python<version>Full) as aliases to smooth upgrades?

@FRidh
Copy link
Member Author

@FRidh FRidh commented on 104c50d Oct 30, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added it back some time later, its there.

@bjornfor
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, thanks!

Please sign in to comment.