remove python2
This commit is contained in:
1
ci.nix
1
ci.nix
@@ -20,7 +20,6 @@ in
|
|||||||
haskell = writeTest "Rolf" simples.haskell;
|
haskell = writeTest "Rolf" simples.haskell;
|
||||||
js = writeTest "function add(n,d){return n+d}" simples.js;
|
js = writeTest "function add(n,d){return n+d}" simples.js;
|
||||||
perl = writeTest "Howdy!" simples.perl;
|
perl = writeTest "Howdy!" simples.perl;
|
||||||
python2 = writeTest "['some', 'random', 'variables']" simples.python2;
|
|
||||||
python3 = writeTest "['some', 'random', 'variables']" simples.python3;
|
python3 = writeTest "['some', 'random', 'variables']" simples.python3;
|
||||||
sed = writeTest "hello world" simples.sed;
|
sed = writeTest "hello world" simples.sed;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,9 +24,6 @@ in {
|
|||||||
perl = pkgs.writePerl "hello-world" {} ''
|
perl = pkgs.writePerl "hello-world" {} ''
|
||||||
print "hello world\n";
|
print "hello world\n";
|
||||||
'';
|
'';
|
||||||
python2 = pkgs.writePython2 "hello-world" {} ''
|
|
||||||
print "hello world"
|
|
||||||
'';
|
|
||||||
python3 = pkgs.writePython3 "hello-world" {} ''
|
python3 = pkgs.writePython3 "hello-world" {} ''
|
||||||
print("hello world")
|
print("hello world")
|
||||||
'';
|
'';
|
||||||
|
|||||||
@@ -24,15 +24,6 @@ in {
|
|||||||
use boolean;
|
use boolean;
|
||||||
print "Howdy!\n" if true;
|
print "Howdy!\n" if true;
|
||||||
'';
|
'';
|
||||||
python2 = pkgs.writePython2 "simple.py" { deps = [ pkgs.python2Packages.pyyaml ]; } ''
|
|
||||||
import yaml
|
|
||||||
|
|
||||||
print yaml.load("""
|
|
||||||
- some
|
|
||||||
- random
|
|
||||||
- variables
|
|
||||||
""")
|
|
||||||
'';
|
|
||||||
python3 = pkgs.writePython3 "simple.py" { deps = [ pkgs.python3Packages.pyyaml ]; } ''
|
python3 = pkgs.writePython3 "simple.py" { deps = [ pkgs.python3Packages.pyyaml ]; } ''
|
||||||
import yaml
|
import yaml
|
||||||
|
|
||||||
|
|||||||
@@ -447,21 +447,6 @@ pkgs: oldpkgs: {
|
|||||||
writePerlBin = name:
|
writePerlBin = name:
|
||||||
pkgs.writePerl "/bin/${name}";
|
pkgs.writePerl "/bin/${name}";
|
||||||
|
|
||||||
writePython2 = name: { deps ? [], flakeIgnore ? [] }:
|
|
||||||
let
|
|
||||||
py = pkgs.python2.withPackages (ps: deps);
|
|
||||||
ignoreAttribute = optionalString (flakeIgnore != []) "--ignore ${concatMapStringsSep "," escapeShellArg flakeIgnore}";
|
|
||||||
in
|
|
||||||
pkgs.makeScriptWriter {
|
|
||||||
interpreter = "${py}/bin/python";
|
|
||||||
check = pkgs.writeDash "python2check.sh" ''
|
|
||||||
exec ${pkgs.python2Packages.flake8}/bin/flake8 --show-source ${ignoreAttribute} "$1"
|
|
||||||
'';
|
|
||||||
} name;
|
|
||||||
|
|
||||||
writePython2Bin = name:
|
|
||||||
pkgs.writePython2 "/bin/${name}";
|
|
||||||
|
|
||||||
writePython3 = name: { deps ? [], flakeIgnore ? [] }:
|
writePython3 = name: { deps ? [], flakeIgnore ? [] }:
|
||||||
let
|
let
|
||||||
py = pkgs.python3.withPackages (ps: deps);
|
py = pkgs.python3.withPackages (ps: deps);
|
||||||
|
|||||||
Reference in New Issue
Block a user