File: 2002_rename_py_plugins.patch

package info (click to toggle)
uwsgi 2.0.31-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,564 kB
  • sloc: ansic: 87,066; python: 7,004; cpp: 1,133; java: 708; perl: 678; sh: 585; ruby: 555; makefile: 148; xml: 130; cs: 121; objc: 37; php: 28; erlang: 20; javascript: 11
file content (56 lines) | stat: -rw-r--r-- 1,715 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
Description: Debian renames python related plugins for historical reasons. Rather
  than annoying users with a visible change, patch source to ensure all is ok
  with Debian names:
    python => python3 (as referred to in integration tests)
    pypy   => pypy3   (as referred to in integration tests and in plugin published
                       symbols)
Author: Alexandre Rossi <niol@zincube.net>
Forwarded: not-needed
Last-Update: 2024-09-28
--
--- a/plugins/pypy/pypy_setup.py
+++ b/plugins/pypy/pypy_setup.py
@@ -168,7 +168,7 @@
 };
 extern struct uwsgi_server uwsgi;
 
-extern struct uwsgi_plugin pypy_plugin;
+extern struct uwsgi_plugin pypy3_plugin;
 
 extern const char *uwsgi_pypy_version;
 
@@ -269,7 +269,7 @@
 %s
 
 extern struct uwsgi_server uwsgi;
-extern struct uwsgi_plugin pypy_plugin;
+extern struct uwsgi_plugin pypy3_plugin;
 %s
 ''' % ('\n'.join(uwsgi_defines), uwsgi_dot_h.decode(), hooks)
 
--- a/t/runner
+++ b/t/runner
@@ -145,12 +145,12 @@
         for mp in mps:
             self.assert_GET_body(mp, "")
 
-    @unittest.skipUnless(*plugins_available(["python"]))
+    @unittest.skipUnless(*plugins_available(["python3"]))
     def test_python3_helloworld(self):
         self.start_listen_server(
             [
                 "--plugin",
-                "python",
+                "python3",
                 "--wsgi-file",
                 os.path.join(TESTS_DIR, "python", "helloapp.py"),
             ]
@@ -158,7 +158,7 @@
 
         self.assert_GET_body("/", "Hello World")
 
-    @unittest.skipUnless(*plugins_available(["pypy"]))
+    @unittest.skipUnless(*plugins_available(["pypy3"]))
     def test_pypy3_helloworld(self):
         self.start_listen_server(
             [