Merge pull request #44446 from rnhmjoj/python2->python3

Make python{2,3} version explicit
This commit is contained in:
Robert Schütz 2018-08-08 11:18:21 +02:00 committed by GitHub
commit 6342ab656c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 58 additions and 56 deletions

View File

@ -1,11 +1,11 @@
{ stdenv, fetchFromGitHub, pythonPackages, file, less { stdenv, fetchFromGitHub, python3Packages, file, less
, imagePreviewSupport ? true, w3m ? null}: , imagePreviewSupport ? true, w3m ? null}:
with stdenv.lib; with stdenv.lib;
assert imagePreviewSupport -> w3m != null; assert imagePreviewSupport -> w3m != null;
pythonPackages.buildPythonApplication rec { python3Packages.buildPythonApplication rec {
name = "ranger-${version}"; name = "ranger-${version}";
version = "1.9.1"; version = "1.9.1";
@ -16,7 +16,7 @@ pythonPackages.buildPythonApplication rec {
sha256= "1zhds37j1scxa9b183qbrjwxqldrdk581c5xiy81vg17sndb1kqj"; sha256= "1zhds37j1scxa9b183qbrjwxqldrdk581c5xiy81vg17sndb1kqj";
}; };
checkInputs = with pythonPackages; [ pytest ]; checkInputs = with python3Packages; [ pytest ];
propagatedBuildInputs = [ file ]; propagatedBuildInputs = [ file ];
checkPhase = '' checkPhase = ''

View File

@ -1,13 +1,11 @@
{ stdenv, fetchurl, buildPythonPackage, isPy3k }: { stdenv, fetchPypi, buildPythonPackage }:
buildPythonPackage rec { buildPythonPackage rec {
version = "3.0.4";
pname = "robotframework"; pname = "robotframework";
disabled = isPy3k; version = "3.0.4";
name = pname + "-" + version;
src = fetchurl { src = fetchPypi {
url = "mirror://pypi/r/robotframework/${name}.tar.gz"; inherit pname version;
sha256 = "ab94257cbd848dfca7148e092d233a12853cc7e840ce8231af9cbb5e7f51aa47"; sha256 = "ab94257cbd848dfca7148e092d233a12853cc7e840ce8231af9cbb5e7f51aa47";
}; };

View File

@ -1,4 +1,6 @@
{ stdenv, buildPythonPackage, fetchPypi, unittest2, robotframework, lxml }: { stdenv, buildPythonPackage, fetchPypi
, unittest2, lxml, robotframework
}:
buildPythonPackage rec { buildPythonPackage rec {
pname = "robotsuite"; pname = "robotsuite";
@ -12,6 +14,11 @@ buildPythonPackage rec {
buildInputs = [ unittest2 ]; buildInputs = [ unittest2 ];
propagatedBuildInputs = [ robotframework lxml ]; propagatedBuildInputs = [ robotframework lxml ];
postPatch = ''
substituteInPlace setup.py \
--replace robotframework-python3 robotframework
'';
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "Python unittest test suite for Robot Framework"; description = "Python unittest test suite for Robot Framework";
homepage = https://github.com/collective/robotsuite/; homepage = https://github.com/collective/robotsuite/;

View File

@ -1,6 +1,6 @@
{ lib { lib
, stdenv , stdenv
, fetchurl , fetchPypi
, fetchFromGitHub , fetchFromGitHub
, buildPythonPackage , buildPythonPackage
, geckodriver , geckodriver
@ -22,12 +22,11 @@ in
buildPythonPackage rec { buildPythonPackage rec {
pname = "selenium"; pname = "selenium";
version = "3.6.0"; version = "3.8.1";
name = pname + "-" + version;
src = fetchurl { src = fetchPypi {
url = "mirror://pypi/s/selenium/${name}.tar.gz"; inherit pname version;
sha256 = "15qpvz0bdwjvpcj11fm0rw6r5inr66sqw89ww50l025sbhf04qwm"; sha256 = "1lqm2md84g11g7lqi94xqb5lydm93vgmlznfhf27g6sy9ayjvgcs";
}; };
buildInputs = [xorg.libX11]; buildInputs = [xorg.libX11];

View File

@ -1,5 +1,5 @@
{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, { stdenv, fetchFromGitHub, autoreconfHook, pkgconfig,
python, boost, fuse, libtorrentRasterbar, curl }: python3, boost, fuse, libtorrentRasterbar, curl }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "btfs-${version}"; name = "btfs-${version}";
@ -20,7 +20,7 @@ stdenv.mkDerivation rec {
preInstall = '' preInstall = ''
substituteInPlace scripts/btplay \ substituteInPlace scripts/btplay \
--replace "/usr/bin/env python" "${python}/bin/python" --replace "/usr/bin/env python" "${python3.interpreter}"
''; '';
meta = with stdenv.lib; { meta = with stdenv.lib; {

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, python, pythonPackages }: { stdenv, fetchurl, python2 }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "mailman-${version}"; name = "mailman-${version}";
@ -9,7 +9,7 @@ stdenv.mkDerivation rec {
sha256 = "1r6sjapjmbav45xibjzc2a8y1xf4ikz09470ma1kw7iz174wn8z7"; sha256 = "1r6sjapjmbav45xibjzc2a8y1xf4ikz09470ma1kw7iz174wn8z7";
}; };
buildInputs = [ python pythonPackages.dnspython ]; buildInputs = [ python2 python2.pkgs.dnspython ];
patches = [ ./fix-var-prefix.patch ]; patches = [ ./fix-var-prefix.patch ];

View File

@ -1,6 +1,6 @@
{ stdenv, pythonPackages, fetchurl, fetchFromGitHub }: { stdenv, python2Packages, fetchurl, fetchFromGitHub }:
let let
matrix-angular-sdk = pythonPackages.buildPythonPackage rec { matrix-angular-sdk = python2Packages.buildPythonPackage rec {
name = "matrix-angular-sdk-${version}"; name = "matrix-angular-sdk-${version}";
version = "0.6.8"; version = "0.6.8";
@ -9,7 +9,7 @@ let
sha256 = "0gmx4y5kqqphnq3m7xk2vpzb0w2a4palicw7wfdr1q2schl9fhz2"; sha256 = "0gmx4y5kqqphnq3m7xk2vpzb0w2a4palicw7wfdr1q2schl9fhz2";
}; };
}; };
matrix-synapse-ldap3 = pythonPackages.buildPythonPackage rec { matrix-synapse-ldap3 = python2Packages.buildPythonPackage rec {
pname = "matrix-synapse-ldap3"; pname = "matrix-synapse-ldap3";
version = "0.1.3"; version = "0.1.3";
@ -20,11 +20,11 @@ let
sha256 = "0ss7ld3bpmqm8wcs64q1kb7vxlpmwk9lsgq0mh21a9izyfc7jb2l"; sha256 = "0ss7ld3bpmqm8wcs64q1kb7vxlpmwk9lsgq0mh21a9izyfc7jb2l";
}; };
propagatedBuildInputs = with pythonPackages; [ service-identity ldap3 twisted ]; propagatedBuildInputs = with python2Packages; [ service-identity ldap3 twisted ];
checkInputs = with pythonPackages; [ ldaptor mock ]; checkInputs = with python2Packages; [ ldaptor mock ];
}; };
in pythonPackages.buildPythonApplication rec { in python2Packages.buildPythonApplication rec {
name = "matrix-synapse-${version}"; name = "matrix-synapse-${version}";
version = "0.33.0"; version = "0.33.0";
@ -39,7 +39,7 @@ in pythonPackages.buildPythonApplication rec {
./matrix-synapse.patch ./matrix-synapse.patch
]; ];
propagatedBuildInputs = with pythonPackages; [ propagatedBuildInputs = with python2Packages; [
blist canonicaljson daemonize dateutil frozendict pillow pyasn1 blist canonicaljson daemonize dateutil frozendict pillow pyasn1
pydenticon pymacaroons-pynacl pynacl pyopenssl pysaml2 pytz requests pydenticon pymacaroons-pynacl pynacl pyopenssl pysaml2 pytz requests
signedjson systemd twisted ujson unpaddedbase64 pyyaml prometheus_client signedjson systemd twisted ujson unpaddedbase64 pyyaml prometheus_client
@ -51,7 +51,7 @@ in pythonPackages.buildPythonApplication rec {
# Checks fail because of Tox. # Checks fail because of Tox.
doCheck = false; doCheck = false;
buildInputs = with pythonPackages; [ buildInputs = with python2Packages; [
mock setuptoolsTrial mock setuptoolsTrial
]; ];

View File

@ -1,5 +1,5 @@
{ stdenv, fetchurl, pcre, libxslt, groff, ncurses, pkgconfig, readline, libedit { stdenv, fetchurl, pcre, libxslt, groff, ncurses, pkgconfig, readline, libedit
, python, pythonPackages, makeWrapper }: , python2, makeWrapper }:
let let
common = { version, sha256 }: common = { version, sha256 }:
@ -13,8 +13,8 @@ let
nativeBuildInputs = [ pkgconfig ]; nativeBuildInputs = [ pkgconfig ];
buildInputs = [ buildInputs = [
pcre libxslt groff ncurses readline python libedit pcre libxslt groff ncurses readline python2 libedit
pythonPackages.docutils makeWrapper python2.pkgs.docutils makeWrapper
]; ];
buildFlags = "localstatedir=/var/spool"; buildFlags = "localstatedir=/var/spool";

View File

@ -1,6 +1,6 @@
{ lib, pythonPackages, fetchFromGitHub }: { lib, python3Packages, fetchFromGitHub }:
with pythonPackages; with python3Packages;
buildPythonApplication rec { buildPythonApplication rec {
pname = "searx"; pname = "searx";
@ -32,10 +32,13 @@ buildPythonApplication rec {
pyasn1 pyasn1-modules ndg-httpsclient certifi pysocks pyasn1 pyasn1-modules ndg-httpsclient certifi pysocks
]; ];
checkInputs = [ splinter mock plone-testing robotsuite unittest2 ]; checkInputs = [
splinter mock plone-testing robotsuite unittest2 selenium
];
preCheck = '' preCheck = ''
rm tests/test_robot.py # A variable that is imported is commented out rm tests/test_robot.py # A variable that is imported is commented out
rm tests/unit/engines/pubmed.py
''; '';
meta = with lib; { meta = with lib; {

View File

@ -1,13 +1,11 @@
{ lib, python3Packages, fetchFromGitHub, glibcLocales }: { lib, python3Packages, fetchFromGitHub, glibcLocales }:
let python3Packages.buildPythonApplication rec {
pythonPackages = python3Packages; pname = "asciinema";
in pythonPackages.buildPythonApplication rec {
name = "asciinema-${version}";
version = "2.0.1"; version = "2.0.1";
buildInputs = with pythonPackages; [ nose ]; buildInputs = with python3Packages; [ nose ];
propagatedBuildInputs = with pythonPackages; [ requests ]; propagatedBuildInputs = with python3Packages; [ requests ];
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "asciinema"; owner = "asciinema";

View File

@ -1,10 +1,9 @@
{ stdenv, fetchFromGitHub, pythonPackages, { stdenv, fetchFromGitHub, python2Packages,
asciidoc, libxml2, libxslt, docbook_xsl }: asciidoc, libxml2, libxslt, docbook_xsl }:
pythonPackages.buildPythonApplication rec { python2Packages.buildPythonApplication rec {
version = "7.2.1"; version = "7.2.1";
name = "offlineimap-${version}"; pname = "offlineimap";
namePrefix = "";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "OfflineIMAP"; owner = "OfflineIMAP";
@ -21,7 +20,7 @@ pythonPackages.buildPythonApplication rec {
doCheck = false; doCheck = false;
nativeBuildInputs = [ asciidoc libxml2 libxslt docbook_xsl ]; nativeBuildInputs = [ asciidoc libxml2 libxslt docbook_xsl ];
propagatedBuildInputs = [ pythonPackages.six pythonPackages.kerberos ]; propagatedBuildInputs = with python2Packages; [ six kerberos ];
postInstall = '' postInstall = ''
make -C docs man make -C docs man

View File

@ -1,6 +1,6 @@
{ stdenv, fetchFromGitHub, pythonPackages }: { stdenv, fetchFromGitHub, python3Packages }:
pythonPackages.buildPythonApplication rec { python3Packages.buildPythonApplication rec {
name = "speedtest-cli-${version}"; name = "speedtest-cli-${version}";
version = "2.0.2"; version = "2.0.2";

View File

@ -1,6 +1,6 @@
{ lib, pythonPackages, fetchurl, git }: { lib, python3Packages, fetchurl, git }:
pythonPackages.buildPythonApplication rec { python3Packages.buildPythonApplication rec {
name = "nox-${version}"; name = "nox-${version}";
version = "0.0.6"; version = "0.0.6";
namePrefix = ""; namePrefix = "";
@ -12,9 +12,9 @@ pythonPackages.buildPythonApplication rec {
patches = [ ./nox-review-wip.patch ]; patches = [ ./nox-review-wip.patch ];
buildInputs = [ pythonPackages.pbr git ]; buildInputs = [ python3Packages.pbr git ];
propagatedBuildInputs = with pythonPackages; [ propagatedBuildInputs = with python3Packages; [
dogpile_cache dogpile_cache
click click
requests requests

View File

@ -4222,9 +4222,7 @@ with pkgs;
notify-osd = callPackage ../applications/misc/notify-osd { }; notify-osd = callPackage ../applications/misc/notify-osd { };
nox = callPackage ../tools/package-management/nox { nox = callPackage ../tools/package-management/nox { };
pythonPackages = python3Packages;
};
nq = callPackage ../tools/system/nq { }; nq = callPackage ../tools/system/nq { };
@ -19384,9 +19382,9 @@ with pkgs;
yoshimi = callPackage ../applications/audio/yoshimi { }; yoshimi = callPackage ../applications/audio/yoshimi { };
youtube-dl = with pythonPackages; toPythonApplication youtube-dl; youtube-dl = with python3Packages; toPythonApplication youtube-dl;
youtube-dl-light = with pythonPackages; toPythonApplication youtube-dl-light; youtube-dl-light = with python3Packages; toPythonApplication youtube-dl-light;
youtube-viewer = perlPackages.WWWYoutubeViewer; youtube-viewer = perlPackages.WWWYoutubeViewer;