##// END OF EJS Templates
jupyter-rendering: add celery patch, to support dateutil change...
marcink -
r1489:d29f4cdc default
parent child Browse files
Show More
@@ -0,0 +1,12 b''
1 diff -rup celery-2.2.10-orig/setup.py celery-2.2.10/setup.py
2 --- celery-2.2.10-orig/setup.py 2017-02-25 15:30:34.000000000 +0100
3 +++ celery-2.2.10/setup.py 2017-02-25 15:30:34.000000000 +0100
4 @@ -48,7 +48,7 @@ try:
5 except ImportError:
6 install_requires.append("importlib")
7 install_requires.extend([
8 - "python-dateutil>=1.5.0,<2.0.0",
9 + "python-dateutil>=1.5.0,<2.2.0",
10 "anyjson>=0.3.1",
11 "kombu>=1.1.2,<2.0.0",
12 "pyparsing>=1.5.0,<2.0.0",
@@ -1,268 +1,276 b''
1 # Overrides for the generated python-packages.nix
1 # Overrides for the generated python-packages.nix
2 #
2 #
3 # This function is intended to be used as an extension to the generated file
3 # This function is intended to be used as an extension to the generated file
4 # python-packages.nix. The main objective is to add needed dependencies of C
4 # python-packages.nix. The main objective is to add needed dependencies of C
5 # libraries and tweak the build instructions where needed.
5 # libraries and tweak the build instructions where needed.
6
6
7 { pkgs, basePythonPackages }:
7 { pkgs, basePythonPackages }:
8
8
9 let
9 let
10 sed = "sed -i";
10 sed = "sed -i";
11 localLicenses = {
11 localLicenses = {
12 repoze = {
12 repoze = {
13 fullName = "Repoze License";
13 fullName = "Repoze License";
14 url = http://www.repoze.org/LICENSE.txt;
14 url = http://www.repoze.org/LICENSE.txt;
15 };
15 };
16 };
16 };
17
17
18 in
18 in
19
19
20 self: super: {
20 self: super: {
21
21
22 appenlight-client = super.appenlight-client.override (attrs: {
22 appenlight-client = super.appenlight-client.override (attrs: {
23 meta = {
23 meta = {
24 license = [ pkgs.lib.licenses.bsdOriginal ];
24 license = [ pkgs.lib.licenses.bsdOriginal ];
25 };
25 };
26 });
26 });
27
27
28 future = super.future.override (attrs: {
28 future = super.future.override (attrs: {
29 meta = {
29 meta = {
30 license = [ pkgs.lib.licenses.mit ];
30 license = [ pkgs.lib.licenses.mit ];
31 };
31 };
32 });
32 });
33
33
34 gnureadline = super.gnureadline.override (attrs: {
34 gnureadline = super.gnureadline.override (attrs: {
35 buildInputs = attrs.buildInputs ++ [
35 buildInputs = attrs.buildInputs ++ [
36 pkgs.ncurses
36 pkgs.ncurses
37 ];
37 ];
38 patchPhase = ''
38 patchPhase = ''
39 substituteInPlace setup.py --replace "/bin/bash" "${pkgs.bash}/bin/bash"
39 substituteInPlace setup.py --replace "/bin/bash" "${pkgs.bash}/bin/bash"
40 '';
40 '';
41 });
41 });
42
42
43 gunicorn = super.gunicorn.override (attrs: {
43 gunicorn = super.gunicorn.override (attrs: {
44 propagatedBuildInputs = attrs.propagatedBuildInputs ++ [
44 propagatedBuildInputs = attrs.propagatedBuildInputs ++ [
45 # johbo: futures is needed as long as we are on Python 2, otherwise
45 # johbo: futures is needed as long as we are on Python 2, otherwise
46 # gunicorn explodes if used with multiple threads per worker.
46 # gunicorn explodes if used with multiple threads per worker.
47 self.futures
47 self.futures
48 ];
48 ];
49 });
49 });
50
50
51 nbconvert = super.nbconvert.override (attrs: {
51 nbconvert = super.nbconvert.override (attrs: {
52 propagatedBuildInputs = attrs.propagatedBuildInputs ++ [
52 propagatedBuildInputs = attrs.propagatedBuildInputs ++ [
53 # marcink: plug in jupyter-client for notebook rendering
53 # marcink: plug in jupyter-client for notebook rendering
54 self.jupyter-client
54 self.jupyter-client
55 ];
55 ];
56 });
56 });
57
57
58 ipython = super.ipython.override (attrs: {
58 ipython = super.ipython.override (attrs: {
59 propagatedBuildInputs = attrs.propagatedBuildInputs ++ [
59 propagatedBuildInputs = attrs.propagatedBuildInputs ++ [
60 self.gnureadline
60 self.gnureadline
61 ];
61 ];
62 });
62 });
63
63
64 celery = super.celery.override (attrs: {
65 # The current version of kombu needs some patching to work with the
66 # other libs. Should be removed once we update celery and kombu.
67 patches = [
68 ./patch-celery-dateutil.diff
69 ];
70 });
71
64 kombu = super.kombu.override (attrs: {
72 kombu = super.kombu.override (attrs: {
65 # The current version of kombu needs some patching to work with the
73 # The current version of kombu needs some patching to work with the
66 # other libs. Should be removed once we update celery and kombu.
74 # other libs. Should be removed once we update celery and kombu.
67 patches = [
75 patches = [
68 ./patch-kombu-py-2-7-11.diff
76 ./patch-kombu-py-2-7-11.diff
69 ./patch-kombu-msgpack.diff
77 ./patch-kombu-msgpack.diff
70 ];
78 ];
71 });
79 });
72
80
73 lxml = super.lxml.override (attrs: {
81 lxml = super.lxml.override (attrs: {
74 # johbo: On 16.09 we need this to compile on darwin, otherwise compilation
82 # johbo: On 16.09 we need this to compile on darwin, otherwise compilation
75 # fails on Darwin.
83 # fails on Darwin.
76 hardeningDisable = if pkgs.stdenv.isDarwin then [ "format" ] else null;
84 hardeningDisable = if pkgs.stdenv.isDarwin then [ "format" ] else null;
77 buildInputs = with self; [
85 buildInputs = with self; [
78 pkgs.libxml2
86 pkgs.libxml2
79 pkgs.libxslt
87 pkgs.libxslt
80 ];
88 ];
81 });
89 });
82
90
83 MySQL-python = super.MySQL-python.override (attrs: {
91 MySQL-python = super.MySQL-python.override (attrs: {
84 buildInputs = attrs.buildInputs ++ [
92 buildInputs = attrs.buildInputs ++ [
85 pkgs.openssl
93 pkgs.openssl
86 ];
94 ];
87 propagatedBuildInputs = attrs.propagatedBuildInputs ++ [
95 propagatedBuildInputs = attrs.propagatedBuildInputs ++ [
88 pkgs.mysql.lib
96 pkgs.mysql.lib
89 pkgs.zlib
97 pkgs.zlib
90 ];
98 ];
91 });
99 });
92
100
93 psutil = super.psutil.override (attrs: {
101 psutil = super.psutil.override (attrs: {
94 buildInputs = attrs.buildInputs ++
102 buildInputs = attrs.buildInputs ++
95 pkgs.lib.optional pkgs.stdenv.isDarwin pkgs.darwin.IOKit;
103 pkgs.lib.optional pkgs.stdenv.isDarwin pkgs.darwin.IOKit;
96 });
104 });
97
105
98 psycopg2 = super.psycopg2.override (attrs: {
106 psycopg2 = super.psycopg2.override (attrs: {
99 buildInputs = attrs.buildInputs ++
107 buildInputs = attrs.buildInputs ++
100 pkgs.lib.optional pkgs.stdenv.isDarwin pkgs.openssl;
108 pkgs.lib.optional pkgs.stdenv.isDarwin pkgs.openssl;
101 propagatedBuildInputs = attrs.propagatedBuildInputs ++ [
109 propagatedBuildInputs = attrs.propagatedBuildInputs ++ [
102 pkgs.postgresql
110 pkgs.postgresql
103 ];
111 ];
104 meta = {
112 meta = {
105 license = pkgs.lib.licenses.lgpl3Plus;
113 license = pkgs.lib.licenses.lgpl3Plus;
106 };
114 };
107 });
115 });
108
116
109 py-gfm = super.py-gfm.override {
117 py-gfm = super.py-gfm.override {
110 name = "py-gfm-0.1.3.rhodecode-upstream1";
118 name = "py-gfm-0.1.3.rhodecode-upstream1";
111 };
119 };
112
120
113 pycurl = super.pycurl.override (attrs: {
121 pycurl = super.pycurl.override (attrs: {
114 propagatedBuildInputs = attrs.propagatedBuildInputs ++ [
122 propagatedBuildInputs = attrs.propagatedBuildInputs ++ [
115 pkgs.curl
123 pkgs.curl
116 pkgs.openssl
124 pkgs.openssl
117 ];
125 ];
118 preConfigure = ''
126 preConfigure = ''
119 substituteInPlace setup.py --replace '--static-libs' '--libs'
127 substituteInPlace setup.py --replace '--static-libs' '--libs'
120 export PYCURL_SSL_LIBRARY=openssl
128 export PYCURL_SSL_LIBRARY=openssl
121 '';
129 '';
122 meta = {
130 meta = {
123 # TODO: It is LGPL and MIT
131 # TODO: It is LGPL and MIT
124 license = pkgs.lib.licenses.mit;
132 license = pkgs.lib.licenses.mit;
125 };
133 };
126 });
134 });
127
135
128 Pylons = super.Pylons.override (attrs: {
136 Pylons = super.Pylons.override (attrs: {
129 name = "Pylons-1.0.2.rhodecode-patch1";
137 name = "Pylons-1.0.2.rhodecode-patch1";
130 });
138 });
131
139
132 pyramid = super.pyramid.override (attrs: {
140 pyramid = super.pyramid.override (attrs: {
133 postFixup = ''
141 postFixup = ''
134 wrapPythonPrograms
142 wrapPythonPrograms
135 # TODO: johbo: "wrapPython" adds this magic line which
143 # TODO: johbo: "wrapPython" adds this magic line which
136 # confuses pserve.
144 # confuses pserve.
137 ${sed} '/import sys; sys.argv/d' $out/bin/.pserve-wrapped
145 ${sed} '/import sys; sys.argv/d' $out/bin/.pserve-wrapped
138 '';
146 '';
139 meta = {
147 meta = {
140 license = localLicenses.repoze;
148 license = localLicenses.repoze;
141 };
149 };
142 });
150 });
143
151
144 pyramid-debugtoolbar = super.pyramid-debugtoolbar.override (attrs: {
152 pyramid-debugtoolbar = super.pyramid-debugtoolbar.override (attrs: {
145 meta = {
153 meta = {
146 license = [ pkgs.lib.licenses.bsdOriginal localLicenses.repoze ];
154 license = [ pkgs.lib.licenses.bsdOriginal localLicenses.repoze ];
147 };
155 };
148 });
156 });
149
157
150 pysqlite = super.pysqlite.override (attrs: {
158 pysqlite = super.pysqlite.override (attrs: {
151 propagatedBuildInputs = [
159 propagatedBuildInputs = [
152 pkgs.sqlite
160 pkgs.sqlite
153 ];
161 ];
154 meta = {
162 meta = {
155 license = [ pkgs.lib.licenses.zlib pkgs.lib.licenses.libpng ];
163 license = [ pkgs.lib.licenses.zlib pkgs.lib.licenses.libpng ];
156 };
164 };
157 });
165 });
158
166
159 pytest-runner = super.pytest-runner.override (attrs: {
167 pytest-runner = super.pytest-runner.override (attrs: {
160 propagatedBuildInputs = [
168 propagatedBuildInputs = [
161 self.setuptools-scm
169 self.setuptools-scm
162 ];
170 ];
163 });
171 });
164
172
165 python-ldap = super.python-ldap.override (attrs: {
173 python-ldap = super.python-ldap.override (attrs: {
166 propagatedBuildInputs = attrs.propagatedBuildInputs ++ [
174 propagatedBuildInputs = attrs.propagatedBuildInputs ++ [
167 pkgs.cyrus_sasl
175 pkgs.cyrus_sasl
168 pkgs.openldap
176 pkgs.openldap
169 pkgs.openssl
177 pkgs.openssl
170 ];
178 ];
171 # TODO: johbo: Remove the "or" once we drop 16.03 support.
179 # TODO: johbo: Remove the "or" once we drop 16.03 support.
172 NIX_CFLAGS_COMPILE = "-I${pkgs.cyrus_sasl.dev or pkgs.cyrus_sasl}/include/sasl";
180 NIX_CFLAGS_COMPILE = "-I${pkgs.cyrus_sasl.dev or pkgs.cyrus_sasl}/include/sasl";
173 });
181 });
174
182
175 python-pam = super.python-pam.override (attrs:
183 python-pam = super.python-pam.override (attrs:
176 let
184 let
177 includeLibPam = pkgs.stdenv.isLinux;
185 includeLibPam = pkgs.stdenv.isLinux;
178 in {
186 in {
179 # TODO: johbo: Move the option up into the default.nix, we should
187 # TODO: johbo: Move the option up into the default.nix, we should
180 # include python-pam only on supported platforms.
188 # include python-pam only on supported platforms.
181 propagatedBuildInputs = attrs.propagatedBuildInputs ++
189 propagatedBuildInputs = attrs.propagatedBuildInputs ++
182 pkgs.lib.optional includeLibPam [
190 pkgs.lib.optional includeLibPam [
183 pkgs.pam
191 pkgs.pam
184 ];
192 ];
185 # TODO: johbo: Check if this can be avoided, or transform into
193 # TODO: johbo: Check if this can be avoided, or transform into
186 # a real patch
194 # a real patch
187 patchPhase = pkgs.lib.optionals includeLibPam ''
195 patchPhase = pkgs.lib.optionals includeLibPam ''
188 substituteInPlace pam.py \
196 substituteInPlace pam.py \
189 --replace 'find_library("pam")' '"${pkgs.pam}/lib/libpam.so.0"'
197 --replace 'find_library("pam")' '"${pkgs.pam}/lib/libpam.so.0"'
190 '';
198 '';
191 });
199 });
192
200
193 URLObject = super.URLObject.override (attrs: {
201 URLObject = super.URLObject.override (attrs: {
194 meta = {
202 meta = {
195 license = {
203 license = {
196 spdxId = "Unlicense";
204 spdxId = "Unlicense";
197 fullName = "The Unlicense";
205 fullName = "The Unlicense";
198 url = http://unlicense.org/;
206 url = http://unlicense.org/;
199 };
207 };
200 };
208 };
201 });
209 });
202
210
203 amqplib = super.amqplib.override (attrs: {
211 amqplib = super.amqplib.override (attrs: {
204 meta = {
212 meta = {
205 license = pkgs.lib.licenses.lgpl3;
213 license = pkgs.lib.licenses.lgpl3;
206 };
214 };
207 });
215 });
208
216
209 docutils = super.docutils.override (attrs: {
217 docutils = super.docutils.override (attrs: {
210 meta = {
218 meta = {
211 license = pkgs.lib.licenses.bsd2;
219 license = pkgs.lib.licenses.bsd2;
212 };
220 };
213 });
221 });
214
222
215 colander = super.colander.override (attrs: {
223 colander = super.colander.override (attrs: {
216 meta = {
224 meta = {
217 license = localLicenses.repoze;
225 license = localLicenses.repoze;
218 };
226 };
219 });
227 });
220
228
221 pyramid-beaker = super.pyramid-beaker.override (attrs: {
229 pyramid-beaker = super.pyramid-beaker.override (attrs: {
222 meta = {
230 meta = {
223 license = localLicenses.repoze;
231 license = localLicenses.repoze;
224 };
232 };
225 });
233 });
226
234
227 pyramid-mako = super.pyramid-mako.override (attrs: {
235 pyramid-mako = super.pyramid-mako.override (attrs: {
228 meta = {
236 meta = {
229 license = localLicenses.repoze;
237 license = localLicenses.repoze;
230 };
238 };
231 });
239 });
232
240
233 repoze.lru = super.repoze.lru.override (attrs: {
241 repoze.lru = super.repoze.lru.override (attrs: {
234 meta = {
242 meta = {
235 license = localLicenses.repoze;
243 license = localLicenses.repoze;
236 };
244 };
237 });
245 });
238
246
239 recaptcha-client = super.recaptcha-client.override (attrs: {
247 recaptcha-client = super.recaptcha-client.override (attrs: {
240 meta = {
248 meta = {
241 # TODO: It is MIT/X11
249 # TODO: It is MIT/X11
242 license = pkgs.lib.licenses.mit;
250 license = pkgs.lib.licenses.mit;
243 };
251 };
244 });
252 });
245
253
246 python-editor = super.python-editor.override (attrs: {
254 python-editor = super.python-editor.override (attrs: {
247 meta = {
255 meta = {
248 license = pkgs.lib.licenses.asl20;
256 license = pkgs.lib.licenses.asl20;
249 };
257 };
250 });
258 });
251
259
252 translationstring = super.translationstring.override (attrs: {
260 translationstring = super.translationstring.override (attrs: {
253 meta = {
261 meta = {
254 license = localLicenses.repoze;
262 license = localLicenses.repoze;
255 };
263 };
256 });
264 });
257
265
258 venusian = super.venusian.override (attrs: {
266 venusian = super.venusian.override (attrs: {
259 meta = {
267 meta = {
260 license = localLicenses.repoze;
268 license = localLicenses.repoze;
261 };
269 };
262 });
270 });
263
271
264 # Avoid that setuptools is replaced, this leads to trouble
272 # Avoid that setuptools is replaced, this leads to trouble
265 # with buildPythonPackage.
273 # with buildPythonPackage.
266 setuptools = basePythonPackages.setuptools;
274 setuptools = basePythonPackages.setuptools;
267
275
268 }
276 }
General Comments 0
You need to be logged in to leave comments. Login now