git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #45890 from lopsided98/buildbot-python3

buildbot: Python 3 support and other improvements

commitc26d6001eda50cec98e4d92e994b5538437d4da3 authorSilvan Mosberger <infinisil@icloud.com> dateFri 12 Oct 2018, 14:06 (8 years ago) parent2434a2e73c523a
25 files changed+661−465
nixos/doc/manual/release-notes/rl-1903.xml+9 nixos/modules/services/continuous-integration/buildbot/master.nix+49−18 nixos/modules/services/continuous-integration/buildbot/worker.nix+66−11 nixos/release.nix+1−1 nixos/tests/buildbot.nix+111−105 pkgs/development/python-modules/astroid/1.6.nix+39 pkgs/development/python-modules/astroid/default.nix+2−2 pkgs/development/python-modules/autobahn/default.nix+8−12 pkgs/development/python-modules/buildbot/default.nix+94 pkgs/development/tools/build-managers/buildbot/pkg.nix → pkgs/development/python-modules/buildbot/pkg.nix+4−7 pkgs/development/python-modules/buildbot/plugins.nix+103 pkgs/development/tools/build-managers/buildbot/skip_test_linux_distro.patch → pkgs/development/python-modules/buildbot/skip_test_linux_distro.patch pkgs/development/tools/build-managers/buildbot/worker.nix → pkgs/development/python-modules/buildbot/worker.nix+7−7 pkgs/development/python-modules/hyperlink/default.nix−6 pkgs/development/python-modules/pylint/1.9.nix+49 pkgs/development/python-modules/pylint/default.nix+15−11 pkgs/development/python-modules/sphinx-jinja/default.nix+27 pkgs/development/python-modules/sqlalchemy-migrate/default.nix+8−4 pkgs/development/python-modules/tempita/default.nix+21 pkgs/development/python-modules/trollius/default.nix+30−26 pkgs/development/tools/build-managers/buildbot/default.nix−95 pkgs/development/tools/build-managers/buildbot/plugins.nix−105 pkgs/top-level/aliases.nix+5 pkgs/top-level/all-packages.nix−15 pkgs/top-level/python-packages.nix+13−40
nixos/doc/manual/release-notes/rl-1903.xml+9
@@ -113,6 +113,15 @@
113113 (i.e. <literal>users.users.yourusername.extraGroups = ["video"];</literal>).
114114 </para>
115115 </listitem>
116+ <listitem>
117+ <para>
118+ Buildbot now supports Python 3 and its packages have been moved to
119+ <literal>pythonPackages</literal>. The options
120+ <option>services.buildbot-master.package</option> and
121+ <option>services.buildbot-worker.package</option> can be used to select
122+ the Python 2 or 3 version of the package.
123+ </para>
124+ </listitem>
116125 </itemizedlist>
117126 </section>
118127
nixos/modules/services/continuous-integration/buildbot/master.nix+49−18
@@ -6,8 +6,12 @@ with lib;
66
77let
88 cfg = config.services.buildbot-master;
9+
10+ python = cfg.package.pythonModule;
11+
912 escapeStr = s: escape ["'"] s;
10− masterCfg = if cfg.masterCfg == null then pkgs.writeText "master.cfg" ''
13+
14+ defaultMasterCfg = pkgs.writeText "master.cfg" ''
1115 from buildbot.plugins import *
1216 factory = util.BuildFactory()
1317 c = BuildmasterConfig = dict(
@@ -27,8 +31,28 @@ let
2731 factory.addStep(step)
2832
2933 ${cfg.extraConfig}
30− ''
31− else cfg.masterCfg;
34+ '';
35+
36+ tacFile = pkgs.writeText "buildbot-master.tac" ''
37+ import os
38+
39+ from twisted.application import service
40+ from buildbot.master import BuildMaster
41+
42+ basedir = '${cfg.buildbotDir}'
43+
44+ configfile = '${cfg.masterCfg}'
45+
46+ # Default umask for server
47+ umask = None
48+
49+ # note: this line is matched against to check that this is a buildmaster
50+ # directory; do not edit it.
51+ application = service.Application('buildmaster')
52+
53+ m = BuildMaster(basedir, configfile, umask)
54+ m.setServiceParent(application)
55+ '';
3256
3357in {
3458 options = {
@@ -66,9 +90,9 @@ in {
6690 };
6791
6892 masterCfg = mkOption {
69− type = types.nullOr types.path;
93+ type = types.path;
7094 description = "Optionally pass master.cfg path. Other options in this configuration will be ignored.";
71− default = null;
95+ default = defaultMasterCfg;
7296 example = "/etc/nixos/buildbot/master.cfg";
7397 };
7498
@@ -175,18 +199,25 @@ in {
175199
176200 package = mkOption {
177201 type = types.package;
178− default = pkgs.buildbot-full;
179− defaultText = "pkgs.buildbot-full";
202+ default = pkgs.pythonPackages.buildbot-full;
203+ defaultText = "pkgs.pythonPackages.buildbot-full";
180204 description = "Package to use for buildbot.";
181− example = literalExample "pkgs.buildbot-full";
205+ example = literalExample "pkgs.python3Packages.buildbot-full";
182206 };
183207
184208 packages = mkOption {
185− default = with pkgs; [ python27Packages.twisted git ];
209+ default = [ pkgs.git ];
186210 example = literalExample "[ pkgs.git ]";
187211 type = types.listOf types.package;
188212 description = "Packages to add to PATH for the buildbot process.";
189213 };
214+
215+ pythonPackages = mkOption {
216+ default = pythonPackages: with pythonPackages; [ ];
217+ defaultText = "pythonPackages: with pythonPackages; [ ]";
218+ description = "Packages to add the to the PYTHONPATH of the buildbot process.";
219+ example = literalExample "pythonPackages: with pythonPackages; [ requests ]";
220+ };
190221 };
191222 };
192223
@@ -210,14 +241,15 @@ in {
210241 description = "Buildbot Continuous Integration Server.";
211242 after = [ "network-online.target" ];
212243 wantedBy = [ "multi-user.target" ];
213− path = cfg.packages;
244+ path = cfg.packages ++ cfg.pythonPackages python.pkgs;
245+ environment.PYTHONPATH = "${python.withPackages (self: cfg.pythonPackages self ++ [ cfg.package ])}/${python.sitePackages}";
214246
215247 preStart = ''
216− env > envvars
217− mkdir -vp ${cfg.buildbotDir}
218− ln -sfv ${masterCfg} ${cfg.buildbotDir}/master.cfg
219− rm -fv $cfg.buildbotDir}/buildbot.tac
220− ${cfg.package}/bin/buildbot create-master ${cfg.buildbotDir}
248+ mkdir -vp "${cfg.buildbotDir}"
249+ # Link the tac file so buildbot command line tools recognize the directory
250+ ln -sf "${tacFile}" "${cfg.buildbotDir}/buildbot.tac"
251+ ${cfg.package}/bin/buildbot create-master --db "${cfg.dbUrl}" "${cfg.buildbotDir}"
252+ rm -f buildbot.tac.new master.cfg.sample
221253 '';
222254
223255 serviceConfig = {
@@ -225,12 +257,11 @@ in {
225257 User = cfg.user;
226258 Group = cfg.group;
227259 WorkingDirectory = cfg.home;
228− ExecStart = "${cfg.package}/bin/buildbot start --nodaemon ${cfg.buildbotDir}";
260+ # NOTE: call twistd directly with stdout logging for systemd
261+ ExecStart = "${python.pkgs.twisted}/bin/twistd -o --nodaemon --pidfile= --logfile - --python ${tacFile}";
229262 };
230−
231263 };
232264 };
233265
234266 meta.maintainers = with lib.maintainers; [ nand0p mic92 ];
235−
236267}
nixos/modules/services/continuous-integration/buildbot/worker.nix+66−11
@@ -7,6 +7,40 @@ with lib;
77let
88 cfg = config.services.buildbot-worker;
99
10+ python = cfg.package.pythonModule;
11+
12+ tacFile = pkgs.writeText "aur-buildbot-worker.tac" ''
13+ import os
14+ from io import open
15+
16+ from buildbot_worker.bot import Worker
17+ from twisted.application import service
18+
19+ basedir = '${cfg.buildbotDir}'
20+
21+ # note: this line is matched against to check that this is a worker
22+ # directory; do not edit it.
23+ application = service.Application('buildbot-worker')
24+
25+ master_url_split = '${cfg.masterUrl}'.split(':')
26+ buildmaster_host = master_url_split[0]
27+ port = int(master_url_split[1])
28+ workername = '${cfg.workerUser}'
29+
30+ with open('${cfg.workerPassFile}', 'r', encoding='utf-8') as passwd_file:
31+ passwd = passwd_file.read().strip('\r\n')
32+ keepalive = 600
33+ umask = None
34+ maxdelay = 300
35+ numcpus = None
36+ allow_shutdown = None
37+
38+ s = Worker(buildmaster_host, port, workername, passwd, basedir,
39+ keepalive, umask=umask, maxdelay=maxdelay,
40+ numcpus=numcpus, allow_shutdown=allow_shutdown)
41+ s.setServiceParent(application)
42+ '';
43+
1044in {
1145 options = {
1246 services.buildbot-worker = {
@@ -59,6 +93,23 @@ in {
5993 description = "Specifies the Buildbot Worker password.";
6094 };
6195
96+ workerPassFile = mkOption {
97+ type = types.path;
98+ description = "File used to store the Buildbot Worker password";
99+ };
100+
101+ hostMessage = mkOption {
102+ default = null;
103+ type = types.nullOr types.str;
104+ description = "Description of this worker";
105+ };
106+
107+ adminMessage = mkOption {
108+ default = null;
109+ type = types.nullOr types.str;
110+ description = "Name of the administrator of this worker";
111+ };
112+
62113 masterUrl = mkOption {
63114 default = "localhost:9989";
64115 type = types.str;
@@ -67,23 +118,24 @@ in {
67118
68119 package = mkOption {
69120 type = types.package;
70− default = pkgs.buildbot-worker;
71− defaultText = "pkgs.buildbot-worker";
121+ default = pkgs.pythonPackages.buildbot-worker;
122+ defaultText = "pkgs.pythonPackages.buildbot-worker";
72123 description = "Package to use for buildbot worker.";
73− example = literalExample "pkgs.buildbot-worker";
124+ example = literalExample "pkgs.python3Packages.buildbot-worker";
74125 };
75126
76127 packages = mkOption {
77− default = with pkgs; [ python27Packages.twisted git ];
128+ default = with pkgs; [ git ];
78129 example = literalExample "[ pkgs.git ]";
79130 type = types.listOf types.package;
80131 description = "Packages to add to PATH for the buildbot process.";
81132 };
82−
83133 };
84134 };
85135
86136 config = mkIf cfg.enable {
137+ services.buildbot-worker.workerPassFile = mkDefault (pkgs.writeText "buildbot-worker-password" cfg.workerPass);
138+
87139 users.groups = optional (cfg.group == "bbworker") {
88140 name = "bbworker";
89141 };
@@ -104,11 +156,16 @@ in {
104156 after = [ "network.target" "buildbot-master.service" ];
105157 wantedBy = [ "multi-user.target" ];
106158 path = cfg.packages;
159+ environment.PYTHONPATH = "${python.withPackages (p: [ cfg.package ])}/${python.sitePackages}";
107160
108161 preStart = ''
109− mkdir -vp ${cfg.buildbotDir}
110− rm -fv $cfg.buildbotDir}/buildbot.tac
111− ${cfg.package}/bin/buildbot-worker create-worker ${cfg.buildbotDir} ${cfg.masterUrl} ${cfg.workerUser} ${cfg.workerPass}
162+ mkdir -vp "${cfg.buildbotDir}/info"
163+ ${optionalString (cfg.hostMessage != null) ''
164+ ln -sf "${pkgs.writeText "buildbot-worker-host" cfg.hostMessage}" "${cfg.buildbotDir}/info/host"
165+ ''}
166+ ${optionalString (cfg.adminMessage != null) ''
167+ ln -sf "${pkgs.writeText "buildbot-worker-admin" cfg.adminMessage}" "${cfg.buildbotDir}/info/admin"
168+ ''}
112169 '';
113170
114171 serviceConfig = {
@@ -116,11 +173,9 @@ in {
116173 User = cfg.user;
117174 Group = cfg.group;
118175 WorkingDirectory = cfg.home;
119− Environment = "PYTHONPATH=${cfg.package}/lib/python2.7/site-packages:${pkgs.python27Packages.future}/lib/python2.7/site-packages";
120176
121177 # NOTE: call twistd directly with stdout logging for systemd
122− #ExecStart = "${cfg.package}/bin/buildbot-worker start --nodaemon ${cfg.buildbotDir}";
123− ExecStart = "${pkgs.python27Packages.twisted}/bin/twistd -n -l - -y ${cfg.buildbotDir}/buildbot.tac";
178+ ExecStart = "${python.pkgs.twisted}/bin/twistd --nodaemon --pidfile= --logfile - --python ${tacFile}";
124179 };
125180
126181 };
nixos/release.nix+1−1
@@ -257,7 +257,7 @@ in rec {
257257 tests.boot = callSubTests tests/boot.nix {};
258258 tests.boot-stage1 = callTest tests/boot-stage1.nix {};
259259 tests.borgbackup = callTest tests/borgbackup.nix {};
260− tests.buildbot = callTest tests/buildbot.nix {};
260+ tests.buildbot = callSubTests tests/buildbot.nix {};
261261 tests.cadvisor = callTestOnMatchingSystems ["x86_64-linux"] tests/cadvisor.nix {};
262262 tests.ceph = callTestOnMatchingSystems ["x86_64-linux"] tests/ceph.nix {};
263263 tests.certmgr = callSubTests tests/certmgr.nix {};
nixos/tests/buildbot.nix+111−105
@@ -1,111 +1,117 @@
1−# Test ensures buildbot master comes up correctly and workers can connect
2−
3−import ./make-test.nix ({ pkgs, ... } : {
4− name = "buildbot";
5−
6− nodes = {
7− bbmaster = { pkgs, ... }: {
8− services.buildbot-master = {
9− enable = true;
10− package = pkgs.buildbot-full;
11−
12− # NOTE: use fake repo due to no internet in hydra ci
13− factorySteps = [
14− "steps.Git(repourl='git://gitrepo/fakerepo.git', mode='incremental')"
15− "steps.ShellCommand(command=['bash', 'fakerepo.sh'])"
16− ];
17− changeSource = [
18− "changes.GitPoller('git://gitrepo/fakerepo.git', workdir='gitpoller-workdir', branch='master', pollinterval=300)"
19− ];
1+{ system ? builtins.currentSystem }:
2+
3+with import ../lib/testing.nix { inherit system; };
4+
5+let
6+ # Test ensures buildbot master comes up correctly and workers can connect
7+ mkBuildbotTest = python: makeTest {
8+ name = "buildbot";
9+
10+ nodes = {
11+ bbmaster = { pkgs, ... }: {
12+ services.buildbot-master = {
13+ enable = true;
14+ package = python.pkgs.buildbot-full;
15+
16+ # NOTE: use fake repo due to no internet in hydra ci
17+ factorySteps = [
18+ "steps.Git(repourl='git://gitrepo/fakerepo.git', mode='incremental')"
19+ "steps.ShellCommand(command=['bash', 'fakerepo.sh'])"
20+ ];
21+ changeSource = [
22+ "changes.GitPoller('git://gitrepo/fakerepo.git', workdir='gitpoller-workdir', branch='master', pollinterval=300)"
23+ ];
24+ };
25+ networking.firewall.allowedTCPPorts = [ 8010 8011 9989 ];
26+ environment.systemPackages = with pkgs; [ git python.pkgs.buildbot-full ];
2027 };
21− networking.firewall.allowedTCPPorts = [ 8010 8011 9989 ];
22− environment.systemPackages = with pkgs; [ git buildbot-full ];
23− };
2428
25− bbworker = { pkgs, ... }: {
26− services.buildbot-worker = {
27− enable = true;
28− masterUrl = "bbmaster:9989";
29+ bbworker = { pkgs, ... }: {
30+ services.buildbot-worker = {
31+ enable = true;
32+ masterUrl = "bbmaster:9989";
33+ };
34+ environment.systemPackages = with pkgs; [ git python.pkgs.buildbot-worker ];
2935 };
30− environment.systemPackages = with pkgs; [ git buildbot-worker ];
31− };
3236
33− gitrepo = { pkgs, ... }: {
34− services.openssh.enable = true;
35− networking.firewall.allowedTCPPorts = [ 22 9418 ];
36− environment.systemPackages = with pkgs; [ git ];
37+ gitrepo = { pkgs, ... }: {
38+ services.openssh.enable = true;
39+ networking.firewall.allowedTCPPorts = [ 22 9418 ];
40+ environment.systemPackages = with pkgs; [ git ];
41+ };
3742 };
38− };
3943
40− testScript = ''
41− #Start up and populate fake repo
42− $gitrepo->waitForUnit("multi-user.target");
43− print($gitrepo->execute(" \
44− git config --global user.name 'Nobody Fakeuser' && \
45− git config --global user.email 'nobody\@fakerepo.com' && \
46− rm -rvf /srv/repos/fakerepo.git /tmp/fakerepo && \
47− mkdir -pv /srv/repos/fakerepo ~/.ssh && \
48− ssh-keyscan -H gitrepo > ~/.ssh/known_hosts && \
49− cat ~/.ssh/known_hosts && \
50− cd /srv/repos/fakerepo && \
51− git init && \
52− echo -e '#!/bin/sh\necho fakerepo' > fakerepo.sh && \
53− cat fakerepo.sh && \
54− touch .git/git-daemon-export-ok && \
55− git add fakerepo.sh .git/git-daemon-export-ok && \
56− git commit -m fakerepo && \
57− git daemon --verbose --export-all --base-path=/srv/repos --reuseaddr & \
58− "));
59−
60− # Test gitrepo
61− $bbmaster->waitForUnit("network-online.target");
62− #$bbmaster->execute("nc -z gitrepo 9418");
63− print($bbmaster->execute(" \
64− rm -rfv /tmp/fakerepo && \
65− git clone git://gitrepo/fakerepo /tmp/fakerepo && \
66− pwd && \
67− ls -la && \
68− ls -la /tmp/fakerepo \
69− "));
70−
71− # Test start master and connect worker
72− $bbmaster->waitForUnit("buildbot-master.service");
73− $bbmaster->waitUntilSucceeds("curl -s --head http://bbmaster:8010") =~ /200 OK/;
74− $bbworker->waitForUnit("network-online.target");
75− $bbworker->execute("nc -z bbmaster 8010");
76− $bbworker->execute("nc -z bbmaster 9989");
77− $bbworker->waitForUnit("buildbot-worker.service");
78− print($bbworker->execute("ls -la /home/bbworker/worker"));
79−
80−
81− # Test stop buildbot master and worker
82− print($bbmaster->execute(" \
83− systemctl -l --no-pager status buildbot-master && \
84− systemctl stop buildbot-master \
85− "));
86− $bbworker->fail("nc -z bbmaster 8010");
87− $bbworker->fail("nc -z bbmaster 9989");
88− print($bbworker->execute(" \
89− systemctl -l --no-pager status buildbot-worker && \
90− systemctl stop buildbot-worker && \
91− ls -la /home/bbworker/worker \
92− "));
93−
94−
95− # Test buildbot daemon mode
96− # NOTE: daemon mode tests disabled due to broken PYTHONPATH child inheritence
97− #
98− #$bbmaster->execute("buildbot create-master /tmp");
99− #$bbmaster->execute("mv -fv /tmp/master.cfg.sample /tmp/master.cfg");
100− #$bbmaster->execute("sed -i 's/8010/8011/' /tmp/master.cfg");
101− #$bbmaster->execute("buildbot start /tmp");
102− #$bbworker->execute("nc -z bbmaster 8011");
103− #$bbworker->waitUntilSucceeds("curl -s --head http://bbmaster:8011") =~ /200 OK/;
104− #$bbmaster->execute("buildbot stop /tmp");
105− #$bbworker->fail("nc -z bbmaster 8011");
106−
107− '';
108−
109− meta.maintainers = with pkgs.stdenv.lib.maintainers; [ nand0p ];
110−
111−})
44+ testScript = ''
45+ #Start up and populate fake repo
46+ $gitrepo->waitForUnit("multi-user.target");
47+ print($gitrepo->execute(" \
48+ git config --global user.name 'Nobody Fakeuser' && \
49+ git config --global user.email 'nobody\@fakerepo.com' && \
50+ rm -rvf /srv/repos/fakerepo.git /tmp/fakerepo && \
51+ mkdir -pv /srv/repos/fakerepo ~/.ssh && \
52+ ssh-keyscan -H gitrepo > ~/.ssh/known_hosts && \
53+ cat ~/.ssh/known_hosts && \
54+ cd /srv/repos/fakerepo && \
55+ git init && \
56+ echo -e '#!/bin/sh\necho fakerepo' > fakerepo.sh && \
57+ cat fakerepo.sh && \
58+ touch .git/git-daemon-export-ok && \
59+ git add fakerepo.sh .git/git-daemon-export-ok && \
60+ git commit -m fakerepo && \
61+ git daemon --verbose --export-all --base-path=/srv/repos --reuseaddr & \
62+ "));
63+
64+ # Test gitrepo
65+ $bbmaster->waitForUnit("network-online.target");
66+ #$bbmaster->execute("nc -z gitrepo 9418");
67+ print($bbmaster->execute(" \
68+ rm -rfv /tmp/fakerepo && \
69+ git clone git://gitrepo/fakerepo /tmp/fakerepo && \
70+ pwd && \
71+ ls -la && \
72+ ls -la /tmp/fakerepo \
73+ "));
74+
75+ # Test start master and connect worker
76+ $bbmaster->waitForUnit("buildbot-master.service");
77+ $bbmaster->waitUntilSucceeds("curl -s --head http://bbmaster:8010") =~ /200 OK/;
78+ $bbworker->waitForUnit("network-online.target");
79+ $bbworker->execute("nc -z bbmaster 8010");
80+ $bbworker->execute("nc -z bbmaster 9989");
81+ $bbworker->waitForUnit("buildbot-worker.service");
82+ print($bbworker->execute("ls -la /home/bbworker/worker"));
83+
84+
85+ # Test stop buildbot master and worker
86+ print($bbmaster->execute(" \
87+ systemctl -l --no-pager status buildbot-master && \
88+ systemctl stop buildbot-master \
89+ "));
90+ $bbworker->fail("nc -z bbmaster 8010");
91+ $bbworker->fail("nc -z bbmaster 9989");
92+ print($bbworker->execute(" \
93+ systemctl -l --no-pager status buildbot-worker && \
94+ systemctl stop buildbot-worker && \
95+ ls -la /home/bbworker/worker \
96+ "));
97+
98+
99+ # Test buildbot daemon mode
100+ $bbmaster->execute("buildbot create-master /tmp");
101+ $bbmaster->execute("mv -fv /tmp/master.cfg.sample /tmp/master.cfg");
102+ $bbmaster->execute("sed -i 's/8010/8011/' /tmp/master.cfg");
103+ $bbmaster->execute("buildbot start /tmp");
104+ $bbworker->execute("nc -z bbmaster 8011");
105+ $bbworker->waitUntilSucceeds("curl -s --head http://bbmaster:8011") =~ /200 OK/;
106+ $bbmaster->execute("buildbot stop /tmp");
107+ $bbworker->fail("nc -z bbmaster 8011");
108+
109+ '';
110+
111+ meta.maintainers = with pkgs.stdenv.lib.maintainers; [ nand0p ];
112+
113+ };
114+in {
115+ python2 = mkBuildbotTest pkgs.python2;
116+ python3 = mkBuildbotTest pkgs.python3;
117+}
pkgs/development/python-modules/astroid/1.6.nixnew file+39
@@ -0,0 +1,39 @@
1+{ lib, fetchPypi, buildPythonPackage, pythonOlder, isPyPy
2+, lazy-object-proxy, six, wrapt, enum34, singledispatch, backports_functools_lru_cache
3+, pytest
4+}:
5+
6+buildPythonPackage rec {
7+ pname = "astroid";
8+ version = "1.6.5";
9+
10+ src = fetchPypi {
11+ inherit pname version;
12+ sha256 = "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw";
13+ };
14+
15+ # From astroid/__pkginfo__.py
16+ propagatedBuildInputs = [
17+ lazy-object-proxy
18+ six
19+ wrapt
20+ enum34
21+ singledispatch
22+ backports_functools_lru_cache
23+ ];
24+
25+ checkInputs = [ pytest ];
26+
27+ checkPhase = ''
28+ # test_builtin_help is broken
29+ pytest -k "not test_builtin_help" astroid
30+ '';
31+
32+ meta = with lib; {
33+ description = "An abstract syntax tree for Python with inference support";
34+ homepage = https://github.com/PyCQA/astroid;
35+ license = licenses.lgpl2;
36+ platforms = platforms.all;
37+ maintainers = with maintainers; [ nand0p ];
38+ };
39+}
pkgs/development/python-modules/astroid/default.nix+2−2
@@ -22,8 +22,8 @@ buildPythonPackage rec {
2222 checkInputs = [ pytestrunner pytest ];
2323
2424 meta = with lib; {
25− description = "A abstract syntax tree for Python with inference support";
26− homepage = https://bitbucket.org/logilab/astroid;
25+ description = "An abstract syntax tree for Python with inference support";
26+ homepage = https://github.com/PyCQA/astroid;
2727 license = licenses.lgpl2;
2828 platforms = platforms.all;
2929 maintainers = with maintainers; [ nand0p ];
pkgs/development/python-modules/autobahn/default.nix+8−12
@@ -1,7 +1,6 @@
1−{ stdenv, buildPythonPackage, fetchPypi, isPy3k, isPy33,
2− unittest2, mock, pytest, trollius, asyncio,
3− pytest-asyncio, futures, cffi,
4− six, twisted, txaio, zope_interface
1+{ lib, buildPythonPackage, fetchPypi, isPy3k, isPy33,
2+ six, txaio, twisted, zope_interface, cffi, asyncio, trollius, futures,
3+ mock, pytest
54}:
65buildPythonPackage rec {
76 pname = "autobahn";
@@ -12,21 +11,18 @@ buildPythonPackage rec {
1211 sha256 = "b69858e0be4bff8437b0bd82a0db1cbef7405e16bd9354ba587c043d6d5e1ad9";
1312 };
1413
15− # Upstream claim python2 support, but tests require pytest-asyncio which
16− # is pythn3 only. Therefore, tests are skipped for python2.
17− doCheck = isPy3k;
18− checkInputs = stdenv.lib.optionals isPy3k [ unittest2 mock pytest pytest-asyncio ];
19− propagatedBuildInputs = [ cffi six twisted zope_interface txaio ] ++
20− (stdenv.lib.optional isPy33 asyncio) ++
21− (stdenv.lib.optionals (!isPy3k) [ trollius futures ]);
14+ propagatedBuildInputs = [ six txaio twisted zope_interface cffi ] ++
15+ (lib.optional isPy33 asyncio) ++
16+ (lib.optionals (!isPy3k) [ trollius futures ]);
2217
18+ checkInputs = [ mock pytest ];
2319 checkPhase = ''
2420 runHook preCheck
2521 USE_TWISTED=true py.test $out
2622 runHook postCheck
2723 '';
2824
29− meta = with stdenv.lib; {
25+ meta = with lib; {
3026 description = "WebSocket and WAMP in Python for Twisted and asyncio.";
3127 homepage = "https://crossbar.io/autobahn";
3228 license = licenses.mit;
pkgs/development/python-modules/buildbot/default.nixnew file+94
@@ -0,0 +1,94 @@
1+{ stdenv, lib, buildPythonPackage, fetchPypi, makeWrapper, isPy3k,
2+ python, twisted, jinja2, zope_interface, future, sqlalchemy,
3+ sqlalchemy_migrate, dateutil, txaio, autobahn, pyjwt, treq, txrequests,
4+ txgithub, pyjade, boto3, moto, mock, lz4, setuptoolsTrial, isort, pylint,
5+ flake8, buildbot-worker, buildbot-pkg, glibcLocales }:
6+
7+let
8+ withPlugins = plugins: buildPythonPackage {
9+ name = "${package.name}-with-plugins";
10+ phases = [ "installPhase" "fixupPhase" ];
11+ buildInputs = [ makeWrapper ];
12+ propagatedBuildInputs = plugins ++ package.propagatedBuildInputs;
13+
14+ installPhase = ''
15+ makeWrapper ${package}/bin/buildbot $out/bin/buildbot \
16+ --prefix PYTHONPATH : "${package}/${python.sitePackages}:$PYTHONPATH"
17+ ln -sfv ${package}/lib $out/lib
18+ '';
19+
20+ passthru = package.passthru // {
21+ withPlugins = morePlugins: withPlugins (morePlugins ++ plugins);
22+ };
23+ };
24+
25+ package = buildPythonPackage rec {
26+ pname = "buildbot";
27+ version = "1.4.0";
28+
29+ src = fetchPypi {
30+ inherit pname version;
31+ sha256 = "0dfa926nh642i3bnpzlz0q347zicyx6wswjfqbniri59ya64fncx";
32+ };
33+
34+ propagatedBuildInputs = [
35+ # core
36+ twisted
37+ jinja2
38+ zope_interface
39+ future
40+ sqlalchemy
41+ sqlalchemy_migrate
42+ dateutil
43+ txaio
44+ autobahn
45+ pyjwt
46+
47+ # tls
48+ twisted.extras.tls
49+ ];
50+
51+ checkInputs = [
52+ treq
53+ txrequests
54+ pyjade
55+ boto3
56+ moto
57+ mock
58+ lz4
59+ setuptoolsTrial
60+ isort
61+ pylint
62+ flake8
63+ buildbot-worker
64+ buildbot-pkg
65+ glibcLocales
66+ ];
67+
68+ patches = [
69+ # This patch disables the test that tries to read /etc/os-release which
70+ # is not accessible in sandboxed builds.
71+ ./skip_test_linux_distro.patch
72+ ];
73+
74+ LC_ALL = "en_US.UTF-8";
75+
76+ # TimeoutErrors on slow machines -> aarch64
77+ doCheck = !stdenv.isAarch64;
78+
79+ postPatch = ''
80+ substituteInPlace buildbot/scripts/logwatcher.py --replace '/usr/bin/tail' "$(type -P tail)"
81+ '';
82+
83+ passthru = {
84+ inherit withPlugins;
85+ };
86+
87+ meta = with lib; {
88+ homepage = http://buildbot.net/;
89+ description = "Buildbot is an open-source continuous integration framework for automating software build, test, and release processes";
90+ maintainers = with maintainers; [ nand0p ryansydnor ];
91+ license = licenses.gpl2;
92+ };
93+ };
94+in package
pkgs/development/tools/build-managers/buildbot/pkg.nix → pkgs/development/python-modules/buildbot/pkg.nixrenamed+4−7
@@ -1,24 +1,21 @@
1−{ stdenv, buildPythonPackage, fetchPypi, setuptools }:
1+{ lib, buildPythonPackage, fetchPypi, setuptools }:
22
33buildPythonPackage rec {
4− name = "${pname}-${version}";
54 pname = "buildbot-pkg";
6− version = "1.2.0";
5+ version = "1.4.0";
76
87 src = fetchPypi {
98 inherit pname version;
10− sha256 = "70f429311c5812ffd334f023f4f50b904be5c672c8674ee6d28a11a7c096f18a";
9+ sha256 = "06f4jvczbg9km0gfmcd1ljplf5w8za27i9ap9jnyqgh3j77smd7a";
1110 };
1211
13− propagatedBuildInputs = [ setuptools ];
14−
1512 postPatch = ''
1613 # Their listdir function filters out `node_modules` folders.
1714 # Do we have to care about that with Nix...?
1815 substituteInPlace buildbot_pkg.py --replace "os.listdir = listdir" ""
1916 '';
2017
21− meta = with stdenv.lib; {
18+ meta = with lib; {
2219 homepage = http://buildbot.net/;
2320 description = "Buildbot Packaging Helper";
2421 maintainers = with maintainers; [ nand0p ryansydnor ];
pkgs/development/python-modules/buildbot/plugins.nixnew file+103
@@ -0,0 +1,103 @@
1+{ lib, buildPythonPackage, fetchPypi, buildbot, buildbot-pkg }:
2+
3+{
4+ www = buildPythonPackage rec {
5+ pname = "buildbot_www";
6+ inherit (buildbot-pkg) version;
7+
8+ # NOTE: wheel is used due to buildbot circular dependency
9+ format = "wheel";
10+
11+ src = fetchPypi {
12+ inherit pname version format;
13+ sha256 = "1m5dsp1gn9m5vfh5hnqp8g6hmhw1f1ydnassd33nhk521f2akz0v";
14+ };
15+
16+ meta = with lib; {
17+ homepage = http://buildbot.net/;
18+ description = "Buildbot UI";
19+ maintainers = with maintainers; [ nand0p ryansydnor ];
20+ license = licenses.gpl2;
21+ };
22+ };
23+
24+ console-view = buildPythonPackage rec {
25+ pname = "buildbot-console-view";
26+ inherit (buildbot-pkg) version;
27+
28+ src = fetchPypi {
29+ inherit pname version;
30+ sha256 = "0vblaxmihgb4w9aa5q0wcgvxs7qzajql8s22w0pl9qs494g05s9r";
31+ };
32+
33+ propagatedBuildInputs = [ buildbot-pkg ];
34+ checkInputs = [ buildbot ];
35+
36+ meta = with lib; {
37+ homepage = http://buildbot.net/;
38+ description = "Buildbot Console View Plugin";
39+ maintainers = with maintainers; [ nand0p ryansydnor ];
40+ license = licenses.gpl2;
41+ };
42+ };
43+
44+ waterfall-view = buildPythonPackage rec {
45+ pname = "buildbot-waterfall-view";
46+ inherit (buildbot-pkg) version;
47+
48+ src = fetchPypi {
49+ inherit pname version;
50+ sha256 = "18v1a6dapwjc2s9hi0cv3ry3s048w84md908zwaa3033gz3zwzy7";
51+ };
52+
53+ propagatedBuildInputs = [ buildbot-pkg ];
54+ checkInputs = [ buildbot ];
55+
56+ meta = with lib; {
57+ homepage = http://buildbot.net/;
58+ description = "Buildbot Waterfall View Plugin";
59+ maintainers = with maintainers; [ nand0p ryansydnor ];
60+ license = licenses.gpl2;
61+ };
62+ };
63+
64+ grid-view = buildPythonPackage rec {
65+ pname = "buildbot-grid-view";
66+ inherit (buildbot-pkg) version;
67+
68+ src = fetchPypi {
69+ inherit pname version;
70+ sha256 = "0iawsy892v6rn88hsgiiwaf689jqzhnb2wbxh6zkz3c0hvq4g0qd";
71+ };
72+
73+ propagatedBuildInputs = [ buildbot-pkg ];
74+ checkInputs = [ buildbot ];
75+
76+ meta = with lib; {
77+ homepage = http://buildbot.net/;
78+ description = "Buildbot Grid View Plugin";
79+ maintainers = with maintainers; [ nand0p ];
80+ license = licenses.gpl2;
81+ };
82+ };
83+
84+ wsgi-dashboards = buildPythonPackage rec {
85+ pname = "buildbot-wsgi-dashboards";
86+ inherit (buildbot-pkg) version;
87+
88+ src = fetchPypi {
89+ inherit pname version;
90+ sha256 = "00cpjna3bffh1qbq6a3sqffd1g7qhbrmn9gpzxf9k38jam6jgfpz";
91+ };
92+
93+ propagatedBuildInputs = [ buildbot-pkg ];
94+ checkInputs = [ buildbot ];
95+
96+ meta = with lib; {
97+ homepage = http://buildbot.net/;
98+ description = "Buildbot WSGI dashboards Plugin";
99+ maintainers = with maintainers; [ ];
100+ license = licenses.gpl2;
101+ };
102+ };
103+}
pkgs/development/tools/build-managers/buildbot/skip_test_linux_distro.patch → pkgs/development/python-modules/buildbot/skip_test_linux_distro.patchrenamed

The content is the same.

pkgs/development/tools/build-managers/buildbot/worker.nix → pkgs/development/python-modules/buildbot/worker.nixrenamed+7−7
@@ -1,23 +1,23 @@
1−{ stdenv, pythonPackages }:
1+{ lib, buildPythonPackage, fetchPypi, python, setuptoolsTrial, mock, twisted, future }:
22
3−pythonPackages.buildPythonApplication (rec {
4− name = "${pname}-${version}";
3+buildPythonPackage (rec {
54 pname = "buildbot-worker";
65 version = "1.4.0";
76
8− src = pythonPackages.fetchPypi {
7+ src = fetchPypi {
98 inherit pname version;
109 sha256 = "12zvf4c39b6s4g1f2w407q8kkw602m88rc1ggi4w9pkw3bwbxrgy";
1110 };
1211
13− buildInputs = with pythonPackages; [ setuptoolsTrial mock ];
14− propagatedBuildInputs = with pythonPackages; [ twisted future ];
12+ propagatedBuildInputs = [ twisted future ];
13+
14+ checkInputs = [ setuptoolsTrial mock ];
1515
1616 postPatch = ''
1717 substituteInPlace buildbot_worker/scripts/logwatcher.py --replace '/usr/bin/tail' "$(type -P tail)"
1818 '';
1919
20− meta = with stdenv.lib; {
20+ meta = with lib; {
2121 homepage = http://buildbot.net/;
2222 description = "Buildbot Worker Daemon";
2323 maintainers = with maintainers; [ nand0p ryansydnor ];
pkgs/development/python-modules/hyperlink/default.nix−6
@@ -11,12 +11,6 @@ buildPythonPackage rec {
1111
1212 propagatedBuildInputs = [ idna ];
1313
14− checkInputs = [ pytest ];
15−
16− checkPhase = ''
17− py.test $out
18− '';
19−
2014 meta = with stdenv.lib; {
2115 description = "A featureful, correct URL for Python";
2216 license = licenses.mit;
pkgs/development/python-modules/pylint/1.9.nixnew file+49
@@ -0,0 +1,49 @@
1+{ stdenv, lib, buildPythonPackage, fetchPypi, python, astroid, six, isort,
2+ mccabe, configparser, backports_functools_lru_cache, singledispatch,
3+ pytest, pytestrunner, pyenchant }:
4+
5+buildPythonPackage rec {
6+ pname = "pylint";
7+ version = "1.9.2";
8+
9+ src = fetchPypi {
10+ inherit pname version;
11+ sha256 = "1cxr1j037hsm4spmvl64v2j2rdq72pc2z0gnn3iggd4np6y21wpz";
12+ };
13+
14+ checkInputs = [ pytest pytestrunner pyenchant ];
15+
16+ propagatedBuildInputs = [ astroid six isort mccabe configparser backports_functools_lru_cache singledispatch ];
17+
18+ postPatch = lib.optionalString stdenv.isDarwin ''
19+ # Remove broken darwin test
20+ rm -vf pylint/test/test_functional.py
21+ '';
22+
23+ checkPhase = ''
24+ pytest pylint/test -k "not ${lib.concatStringsSep " and not " (
25+ [ # Broken test
26+ "test_good_comprehension_checks"
27+ # See PyCQA/pylint#2535
28+ "test_libmodule" ] ++
29+ # Disable broken darwin tests
30+ lib.optionals stdenv.isDarwin [
31+ "test_parallel_execution"
32+ "test_py3k_jobs_option"
33+ ]
34+ )}"
35+ '';
36+
37+ postInstall = ''
38+ mkdir -p $out/share/emacs/site-lisp
39+ cp "elisp/"*.el $out/share/emacs/site-lisp/
40+ '';
41+
42+ meta = with lib; {
43+ homepage = https://github.com/PyCQA/pylint;
44+ description = "A bug and style checker for Python";
45+ platforms = platforms.all;
46+ license = licenses.gpl1Plus;
47+ maintainers = with maintainers; [ nand0p ];
48+ };
49+}
pkgs/development/python-modules/pylint/default.nix+15−11
@@ -1,5 +1,5 @@
1−{ stdenv, buildPythonPackage, fetchPypi, python, pythonOlder, astroid, isort,
2− pytest, pytestrunner, mccabe, pytest_xdist, pyenchant }:
1+{ stdenv, lib, buildPythonPackage, fetchPypi, python, pythonOlder, astroid,
2+ isort, mccabe, pytest, pytestrunner, pyenchant }:
33
44buildPythonPackage rec {
55 pname = "pylint";
@@ -12,21 +12,25 @@ buildPythonPackage rec {
1212 sha256 = "31142f764d2a7cd41df5196f9933b12b7ee55e73ef12204b648ad7e556c119fb";
1313 };
1414
15− checkInputs = [ pytest pytestrunner pytest_xdist pyenchant ];
15+ checkInputs = [ pytest pytestrunner pyenchant ];
1616
1717 propagatedBuildInputs = [ astroid isort mccabe ];
1818
19− postPatch = ''
19+ postPatch = lib.optionalString stdenv.isDarwin ''
2020 # Remove broken darwin test
2121 rm -vf pylint/test/test_functional.py
2222 '';
2323
2424 checkPhase = ''
25− cat pylint/test/test_self.py
26− # Disable broken darwin tests
27− pytest pylint/test -k "not test_parallel_execution \
28− and not test_py3k_jobs_option \
29− and not test_good_comprehension_checks"
25+ pytest pylint/test -k "not ${lib.concatStringsSep " and not " (
26+ # Broken test
27+ [ "test_good_comprehension_checks" ] ++
28+ # Disable broken darwin tests
29+ lib.optionals stdenv.isDarwin [
30+ "test_parallel_execution"
31+ "test_py3k_jobs_option"
32+ ]
33+ )}"
3034 '';
3135
3236 postInstall = ''
@@ -34,8 +38,8 @@ buildPythonPackage rec {
3438 cp "elisp/"*.el $out/share/emacs/site-lisp/
3539 '';
3640
37− meta = with stdenv.lib; {
38− homepage = https://www.logilab.org/project/pylint;
41+ meta = with lib; {
42+ homepage = https://github.com/PyCQA/pylint;
3943 description = "A bug and style checker for Python";
4044 platforms = platforms.all;
4145 license = licenses.gpl1Plus;
pkgs/development/python-modules/sphinx-jinja/default.nixnew file+27
@@ -0,0 +1,27 @@
1+{ lib, buildPythonPackage, fetchPypi, pbr, sphinx, sphinx-testing, nose, glibcLocales }:
2+
3+buildPythonPackage rec {
4+ pname = "sphinx-jinja";
5+ version = "1.1.0";
6+
7+ src = fetchPypi {
8+ inherit pname version;
9+ sha256 = "02pgp9pbn0zrs0lggrc74mv6cvlnlq8wib84ga6yjvq30gda9v8q";
10+ };
11+
12+ buildInputs = [ pbr ];
13+ propagatedBuildInputs = [ sphinx ];
14+
15+ checkInputs = [ sphinx-testing nose glibcLocales ];
16+
17+ checkPhase = ''
18+ # Zip (epub) does not support files with epoch timestamp
19+ LC_ALL="en_US.UTF-8" nosetests -e test_build_epub
20+ '';
21+
22+ meta = with lib; {
23+ description = "Sphinx extension to include jinja templates in documentation";
24+ maintainers = with maintainers; [ nand0p ];
25+ license = licenses.mit;
26+ };
27+}
pkgs/development/python-modules/sqlalchemy-migrate/default.nix+8−4
@@ -1,4 +1,4 @@
1−{ stdenv, buildPythonPackage, fetchPypi, python
1+{ stdenv, buildPythonPackage, fetchPypi, fetchpatch, python
22, unittest2, scripttest, pytz, pylint, mock
33, testtools, pbr, tempita, decorator, sqlalchemy
44, six, sqlparse, testrepository
@@ -12,6 +12,12 @@ buildPythonPackage rec {
1212 sha256 = "0ld2bihp9kmf57ykgzrfgxs4j9kxlw79sgdj9sfn47snw3izb2p6";
1313 };
1414
15+ # See: https://review.openstack.org/#/c/608382/
16+ patches = [ (fetchpatch {
17+ url = https://github.com/openstack/sqlalchemy-migrate/pull/18.patch;
18+ sha256 = "1qyfq2m7w7xqf0r9bc2x42qcra4r9k9l9g1jy5j0fvlb6bvvjj07";
19+ }) ];
20+
1521 checkInputs = [ unittest2 scripttest pytz mock testtools testrepository ];
1622 propagatedBuildInputs = [ pbr tempita decorator sqlalchemy six sqlparse ];
1723
@@ -32,10 +38,8 @@ buildPythonPackage rec {
3238 ${python.interpreter} setup.py test
3339 '';
3440
35− doCheck = true;
36−
3741 meta = with stdenv.lib; {
38− homepage = http://code.google.com/p/sqlalchemy-migrate/;
42+ homepage = https://github.com/openstack/sqlalchemy-migrate;
3943 description = "Schema migration tools for SQLAlchemy";
4044 license = licenses.asl20;
4145 maintainers = with maintainers; [ makefu ];
pkgs/development/python-modules/tempita/default.nixnew file+21
@@ -0,0 +1,21 @@
1+{ lib, buildPythonPackage, fetchFromGitHub, nose }:
2+
3+buildPythonPackage rec {
4+ version = "0.5.3-2016-09-28";
5+ name = "tempita-${version}";
6+
7+ src = fetchFromGitHub {
8+ owner = "gjhiggins";
9+ repo = "tempita";
10+ rev = "47414a7c6e46a9a9afe78f0bce2ea299fa84d10";
11+ sha256 = "0f33jjjs5rvp7ar2j6ggyfykcrsrn04jaqcq71qfvycf6b7nw3rn";
12+ };
13+
14+ buildInputs = [ nose ];
15+
16+ meta = {
17+ homepage = https://github.com/gjhiggins/tempita;
18+ description = "A very small text templating language";
19+ license = lib.licenses.mit;
20+ };
21+}
pkgs/development/python-modules/trollius/default.nix+30−26
@@ -1,45 +1,49 @@
1−{ lib, stdenv, buildPythonPackage, fetchPypi, isPy27, isPyPy, mock, futures }:
1+{ lib, stdenv, buildPythonPackage, fetchPypi, isPy3k, mock, unittest2, six, futures }:
2+
23buildPythonPackage rec {
34 pname = "trollius";
4− version = "1.0.4";
5+ version = "2.2";
56
67 src = fetchPypi {
78 inherit pname version;
8− sha256 = "0xny8y12x3wrflmyn6xi8a7n3m3ac80fgmgzphx5jbbaxkjcm148";
9+ sha256 = "093978388qvw5hyscbbj062dbdc2761xs9yzrq26mh63g689lnxk";
910 };
1011
11− checkInputs = [ mock ];
12+ checkInputs = [ mock ] ++ lib.optional (!isPy3k) unittest2;
1213
13− propagatedBuildInputs = lib.optionals (isPy27 || isPyPy) [ futures ];
14+ propagatedBuildInputs = [ six ] ++ lib.optional (!isPy3k) futures;
1415
1516 patches = [
1617 ./tests.patch
1718 ];
1819
19− # Some of the tests fail on darwin with `error: AF_UNIX path too long'
20− # because of the *long* path names for sockets
21− patchPhase = lib.optionalString stdenv.isDarwin ''
22− sed -i -e "s|test_create_ssl_unix_connection|skip_test_create_ssl_unix_connection|g" tests/test_events.py
23− sed -i -e "s|test_create_unix_connection|skip_test_create_unix_connection|g" tests/test_events.py
24− sed -i -e "s|test_create_unix_server_existing_path_nonsock|skip_test_create_unix_server_existing_path_nonsock|g" tests/test_unix_events.py
25− sed -i -e "s|test_create_unix_server_existing_path_sock|skip_test_create_unix_server_existing_path_sock|g" tests/test_unix_events.py
26− sed -i -e "s|test_create_unix_server_ssl_verified|skip_test_create_unix_server_ssl_verified|g" tests/test_events.py
27− sed -i -e "s|test_create_unix_server_ssl_verify_failed|skip_test_create_unix_server_ssl_verify_failed|g" tests/test_events.py
28− sed -i -e "s|test_create_unix_server_ssl|skip_test_create_unix_server_ssl|g" tests/test_events.py
29− sed -i -e "s|test_create_unix_server|skip_test_create_unix_server|g" tests/test_events.py
30− sed -i -e "s|test_open_unix_connection_error|skip_test_open_unix_connection_error|g" tests/test_streams.py
31− sed -i -e "s|test_open_unix_connection_no_loop_ssl|skip_test_open_unix_connection_no_loop_ssl|g" tests/test_streams.py
32− sed -i -e "s|test_open_unix_connection|skip_test_open_unix_connection|g" tests/test_streams.py
33− sed -i -e "s|test_pause_reading|skip_test_pause_reading|g" tests/test_subprocess.py
34− sed -i -e "s|test_read_pty_output|skip_test_read_pty_output|g" tests/test_events.py
35− sed -i -e "s|test_start_unix_server|skip_test_start_unix_server|g" tests/test_streams.py
36− sed -i -e "s|test_unix_sock_client_ops|skip_test_unix_sock_client_ops|g" tests/test_events.py
37− sed -i -e "s|test_write_pty|skip_test_write_pty|g" tests/test_events.py
20+ postPatch = ''
21+ # Overrides PYTHONPATH causing dependencies not to be found
22+ sed -i -e "s|test_env_var_debug|skip_test_env_var_debug|g" tests/test_tasks.py
23+ '' + lib.optionalString stdenv.isDarwin ''
24+ # Some of the tests fail on darwin with `error: AF_UNIX path too long'
25+ # because of the *long* path names for sockets
26+ sed -i -e "s|test_create_ssl_unix_connection|skip_test_create_ssl_unix_connection|g" tests/test_events.py
27+ sed -i -e "s|test_create_unix_connection|skip_test_create_unix_connection|g" tests/test_events.py
28+ sed -i -e "s|test_create_unix_server_existing_path_nonsock|skip_test_create_unix_server_existing_path_nonsock|g" tests/test_unix_events.py
29+ sed -i -e "s|test_create_unix_server_existing_path_sock|skip_test_create_unix_server_existing_path_sock|g" tests/test_unix_events.py
30+ sed -i -e "s|test_create_unix_server_ssl_verified|skip_test_create_unix_server_ssl_verified|g" tests/test_events.py
31+ sed -i -e "s|test_create_unix_server_ssl_verify_failed|skip_test_create_unix_server_ssl_verify_failed|g" tests/test_events.py
32+ sed -i -e "s|test_create_unix_server_ssl|skip_test_create_unix_server_ssl|g" tests/test_events.py
33+ sed -i -e "s|test_create_unix_server|skip_test_create_unix_server|g" tests/test_events.py
34+ sed -i -e "s|test_open_unix_connection_error|skip_test_open_unix_connection_error|g" tests/test_streams.py
35+ sed -i -e "s|test_open_unix_connection_no_loop_ssl|skip_test_open_unix_connection_no_loop_ssl|g" tests/test_streams.py
36+ sed -i -e "s|test_open_unix_connection|skip_test_open_unix_connection|g" tests/test_streams.py
37+ sed -i -e "s|test_pause_reading|skip_test_pause_reading|g" tests/test_subprocess.py
38+ sed -i -e "s|test_read_pty_output|skip_test_read_pty_output|g" tests/test_events.py
39+ sed -i -e "s|test_start_unix_server|skip_test_start_unix_server|g" tests/test_streams.py
40+ sed -i -e "s|test_unix_sock_client_ops|skip_test_unix_sock_client_ops|g" tests/test_events.py
41+ sed -i -e "s|test_write_pty|skip_test_write_pty|g" tests/test_events.py
3842 '';
3943
4044 meta = with stdenv.lib; {
41− description = "Port of the Tulip project (asyncio module, PEP 3156) on Python 2";
42− homepage = "https://bitbucket.org/enovance/trollius";
45+ description = "Port of the asyncio project to Python 2.7";
46+ homepage = https://github.com/vstinner/trollius;
4347 license = licenses.asl20;
4448 maintainers = with maintainers; [ garbas ];
4549 };
pkgs/development/tools/build-managers/buildbot/default.nixdeleted−95
@@ -1,95 +0,0 @@
1−{ stdenv, openssh, buildbot-worker, buildbot-pkg, pythonPackages, runCommand, makeWrapper }:
2−
3−let
4− withPlugins = plugins: runCommand "wrapped-${package.name}" {
5− buildInputs = [ makeWrapper ] ++ plugins;
6− propagatedBuildInputs = package.propagatedBuildInputs;
7− passthru.withPlugins = moarPlugins: withPlugins (moarPlugins ++ plugins);
8− } ''
9− makeWrapper ${package}/bin/buildbot $out/bin/buildbot \
10− --prefix PYTHONPATH : "${package}/lib/python2.7/site-packages:$PYTHONPATH"
11− ln -sfv ${package}/lib $out/lib
12− '';
13−
14− package = pythonPackages.buildPythonApplication rec {
15− name = "${pname}-${version}";
16− pname = "buildbot";
17− version = "1.2.0";
18−
19− src = pythonPackages.fetchPypi {
20− inherit pname version;
21− sha256 = "02gwmls8kgm6scy36hdy0bg645zs1pxlrgwkcn79wrl7cfmabcbv";
22− };
23−
24− buildInputs = with pythonPackages; [
25− lz4
26− txrequests
27− pyjade
28− boto3
29− moto
30− txgithub
31− mock
32− setuptoolsTrial
33− isort
34− pylint
35− astroid
36− pyflakes
37− openssh
38− buildbot-worker
39− buildbot-pkg
40− treq
41− ];
42−
43− propagatedBuildInputs = with pythonPackages; [
44− # core
45− twisted
46− jinja2
47− zope_interface
48− sqlalchemy
49− sqlalchemy_migrate
50− future
51− dateutil
52− txaio
53− autobahn
54− pyjwt
55− distro
56−
57− # tls
58− pyopenssl
59− service-identity
60− idna
61−
62− # docs
63− sphinx
64− sphinxcontrib-blockdiag
65− sphinxcontrib-spelling
66− pyenchant
67− docutils
68− ramlfications
69− sphinx-jinja
70−
71− ];
72−
73− patches = [
74− # This patch disables the test that tries to read /etc/os-release which
75− # is not accessible in sandboxed builds.
76− ./skip_test_linux_distro.patch
77− ];
78−
79− # TimeoutErrors on slow machines -> aarch64
80− doCheck = !stdenv.isAarch64;
81−
82− postPatch = ''
83− substituteInPlace buildbot/scripts/logwatcher.py --replace '/usr/bin/tail' "$(type -P tail)"
84− '';
85−
86− passthru = { inherit withPlugins; };
87−
88− meta = with stdenv.lib; {
89− homepage = http://buildbot.net/;
90− description = "Buildbot is an open-source continuous integration framework for automating software build, test, and release processes";
91− maintainers = with maintainers; [ nand0p ryansydnor ];
92− license = licenses.gpl2;
93− };
94− };
95−in package
pkgs/development/tools/build-managers/buildbot/plugins.nixdeleted−105
@@ -1,105 +0,0 @@
1−{ stdenv, pythonPackages, buildbot-pkg }:
2−
3−{
4− www = pythonPackages.buildPythonPackage rec {
5− name = "${pname}-${version}";
6− pname = "buildbot_www";
7− version = buildbot-pkg.version;
8−
9− # NOTE: wheel is used due to buildbot circular dependency
10− format = "wheel";
11−
12− src = pythonPackages.fetchPypi {
13− inherit pname version format;
14− sha256 = "001kxjcyn5sxiq7m1izy4djj7alw6qpgaid4f518s9xgm4a8hwcb";
15− };
16−
17− meta = with stdenv.lib; {
18− homepage = http://buildbot.net/;
19− description = "Buildbot UI";
20− maintainers = with maintainers; [ nand0p ryansydnor ];
21− license = licenses.gpl2;
22− };
23− };
24−
25− console-view = pythonPackages.buildPythonPackage rec {
26− name = "${pname}-${version}";
27− pname = "buildbot-console-view";
28− version = buildbot-pkg.version;
29−
30− src = pythonPackages.fetchPypi {
31− inherit pname version;
32− sha256 = "11p9l9r9rh8cq0ihzjcdxfbi55n7inbsz45zqq67rkvqn5nhj5b6";
33− };
34−
35− propagatedBuildInputs = with pythonPackages; [ buildbot-pkg ];
36−
37− meta = with stdenv.lib; {
38− homepage = http://buildbot.net/;
39− description = "Buildbot Console View Plugin";
40− maintainers = with maintainers; [ nand0p ryansydnor ];
41− license = licenses.gpl2;
42− };
43− };
44−
45− waterfall-view = pythonPackages.buildPythonPackage rec {
46− name = "${pname}-${version}";
47− pname = "buildbot-waterfall-view";
48− version = buildbot-pkg.version;
49−
50− src = pythonPackages.fetchPypi {
51− inherit pname version;
52− sha256 = "1yx63frfpbvwy4hfib1psyq5ad0wysyzfrla8d7lgbdaip021wzw";
53− };
54−
55− propagatedBuildInputs = with pythonPackages; [ buildbot-pkg ];
56−
57− meta = with stdenv.lib; {
58− homepage = http://buildbot.net/;
59− description = "Buildbot Waterfall View Plugin";
60− maintainers = with maintainers; [ nand0p ryansydnor ];
61− license = licenses.gpl2;
62− };
63− };
64−
65− grid-view = pythonPackages.buildPythonPackage rec {
66− name = "${pname}-${version}";
67− pname = "buildbot-grid-view";
68− version = buildbot-pkg.version;
69−
70− src = pythonPackages.fetchPypi {
71− inherit pname version;
72− sha256 = "06my75hli3w1skdkx1qz6zqw2wckanhrcvlqm4inylj9v9pcrgv6";
73− };
74−
75− propagatedBuildInputs = with pythonPackages; [ buildbot-pkg ];
76−
77− meta = with stdenv.lib; {
78− homepage = http://buildbot.net/;
79− description = "Buildbot Grid View Plugin";
80− maintainers = with maintainers; [ nand0p ];
81− license = licenses.gpl2;
82− };
83− };
84−
85− wsgi-dashboards = pythonPackages.buildPythonPackage rec {
86− name = "${pname}-${version}";
87− pname = "buildbot-wsgi-dashboards";
88− version = buildbot-pkg.version;
89−
90− src = pythonPackages.fetchPypi {
91− inherit pname version;
92− sha256 = "073gz44fa5k1p8k46k0ld9gg16j8zdj6sc297qfyqpiw28ybhc5s";
93− };
94−
95− propagatedBuildInputs = with pythonPackages; [ buildbot-pkg ];
96−
97− meta = with stdenv.lib; {
98− homepage = http://buildbot.net/;
99− description = "Buildbot WSGI dashboards Plugin";
100− maintainers = with maintainers; [ ];
101− license = licenses.gpl2;
102− };
103− };
104−
105−}
pkgs/top-level/aliases.nix+5
@@ -49,6 +49,11 @@ mapAliases ({
4949 bashCompletion = bash-completion; # Added 2016-09-28
5050 bridge_utils = bridge-utils; # added 2015-02-20
5151 btrfsProgs = btrfs-progs; # added 2016-01-03
52+ buildbot = pythonPackages.buildbot; # added 2018-10-11
53+ buildbot-full = pythonPackages.buildbot-full; # added 2018-10-11
54+ buildbot-pkg = pythonPackages.buildbot-pkg; # added 2018-10-11
55+ buildbot-ui = pythonPackages.buildbot-ui; # added 2018-10-11
56+ buildbot-worker = pythonPackages.buildbot-worker; # added 2018-10-11
5257 bundler_HEAD = bundler; # added 2015-11-15
5358 cantarell_fonts = cantarell-fonts; # added 2018-03-03
5459 checkbashism = checkbashisms; # added 2016-08-16
pkgs/top-level/all-packages.nix−15
@@ -8135,21 +8135,6 @@ with pkgs;
81358135
81368136 buck = callPackage ../development/tools/build-managers/buck { };
81378137
8138− buildbot = callPackage ../development/tools/build-managers/buildbot {
8139− pythonPackages = python2Packages;
8140− };
8141− buildbot-worker = callPackage ../development/tools/build-managers/buildbot/worker.nix {
8142− pythonPackages = python2Packages;
8143− };
8144− buildbot-pkg = callPackage ../development/tools/build-managers/buildbot/pkg.nix {
8145− inherit (python2Packages) buildPythonPackage fetchPypi setuptools;
8146− };
8147− buildbot-plugins = callPackages ../development/tools/build-managers/buildbot/plugins.nix {
8148− pythonPackages = python2Packages;
8149− };
8150− buildbot-ui = buildbot.withPlugins (with self.buildbot-plugins; [ www ]);
8151− buildbot-full = buildbot.withPlugins (with self.buildbot-plugins; [ www console-view waterfall-view grid-view wsgi-dashboards ]);
8152−
81538138 buildkite-agent = buildkite-agent2;
81548139 buildkite-agent2 = callPackage ../development/tools/continuous-integration/buildkite-agent/2.x.nix { };
81558140 buildkite-agent3 = callPackage ../development/tools/continuous-integration/buildkite-agent/3.x.nix { };
pkgs/top-level/python-packages.nix+13−40
@@ -738,7 +738,8 @@ in {
738738 # argparse is part of stdlib in 2.7 and 3.2+
739739 argparse = null;
740740
741− astroid = callPackage ../development/python-modules/astroid { };
741+ astroid = if isPy3k then callPackage ../development/python-modules/astroid { }
742+ else callPackage ../development/python-modules/astroid/1.6.nix { };
742743
743744 attrdict = callPackage ../development/python-modules/attrdict { };
744745
@@ -1420,6 +1421,13 @@ in {
14201421
14211422 bugzilla = callPackage ../development/python-modules/bugzilla { };
14221423
1424+ buildbot = callPackage ../development/python-modules/buildbot { };
1425+ buildbot-plugins = pkgs.recurseIntoAttrs (callPackage ../development/python-modules/buildbot/plugins.nix { });
1426+ buildbot-ui = self.buildbot.withPlugins (with self.buildbot-plugins; [ www ]);
1427+ buildbot-full = self.buildbot.withPlugins (with self.buildbot-plugins; [ www console-view waterfall-view grid-view wsgi-dashboards ]);
1428+ buildbot-worker = callPackage ../development/python-modules/buildbot/worker.nix { };
1429+ buildbot-pkg = callPackage ../development/python-modules/buildbot/pkg.nix { };
1430+
14231431 check-manifest = callPackage ../development/python-modules/check-manifest { };
14241432
14251433 devpi-common = callPackage ../development/python-modules/devpi-common { };
@@ -10226,7 +10234,8 @@ in {
1022610234
1022710235 pygpgme = callPackage ../development/python-modules/pygpgme { };
1022810236
10229− pylint = callPackage ../development/python-modules/pylint { };
10237+ pylint = if isPy3k then callPackage ../development/python-modules/pylint { }
10238+ else callPackage ../development/python-modules/pylint/1.9.nix { };
1023010239
1023110240 pyopencl = callPackage ../development/python-modules/pyopencl { };
1023210241
@@ -12977,26 +12986,7 @@ in {
1297712986 };
1297812987 });
1297912988
12980− sphinx-jinja = buildPythonPackage (rec {
12981− name = "${pname}-${version}";
12982− pname = "sphinx-jinja";
12983− version = "0.2.1";
12984− src = pkgs.fetchurl {
12985− url = "mirror://pypi/s/${pname}/${name}.tar.gz";
12986− sha256 = "1zsnhc573rvaww9qqyzs4f5h4hhvxklvppv14450vi5dk8rij81z";
12987− };
12988− buildInputs = with self; [ sphinx-testing pytest pbr];
12989− propagatedBuildInputs = with self; [ sphinx blockdiag ];
12990− checkPhase = ''
12991− py.test -k "not test_build_epub"
12992− '';
12993− disabled = isPy3k;
12994− meta = {
12995− description = "includes jinja templates in a documentation";
12996− maintainers = with maintainers; [ nand0p ];
12997− license = licenses.mit;
12998− };
12999− });
12989+ sphinx-jinja = callPackage ../development/python-modules/sphinx-jinja { };
1300012990
1300112991 sphinx_pypi_upload = buildPythonPackage (rec {
1300212992 name = "Sphinx-PyPI-upload-0.2.1";
@@ -13329,24 +13319,7 @@ in {
1332913319 };
1333013320 };
1333113321
13332− tempita = buildPythonPackage rec {
13333− version = "0.5.2";
13334− name = "tempita-${version}";
13335−
13336− src = pkgs.fetchurl {
13337− url = "mirror://pypi/T/Tempita/Tempita-${version}.tar.gz";
13338− sha256 = "cacecf0baa674d356641f1d406b8bff1d756d739c46b869a54de515d08e6fc9c";
13339− };
13340−
13341− disabled = isPy3k;
13342−
13343− buildInputs = with self; [ nose ];
13344−
13345− meta = {
13346− homepage = http://pythonpaste.org/tempita/;
13347− description = "A very small text templating language";
13348− };
13349− };
13322+ tempita = callPackage ../development/python-modules/tempita { };
1335013323
1335113324 terminado = callPackage ../development/python-modules/terminado { };
1335213325