llvm.org GIT mirror lnt / 3a25f4a
[LNT] Python 3 support: Set up (client) setup requirements Summary: Changes required to allow setup of a LNT client with Python 3. - Use `PyModule_Create` instead of `Py_InitModule` - Drop `argparse` and `wsgiref` install requirements - Require Python 2.7 or higher in `setup.py`; Python 2.7 is needed for some Python 3 support idioms Reviewers: cmatthews, thopre, kristof.beyls Reviewed By: cmatthews Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D67533 git-svn-id: https://llvm.org/svn/llvm-project/lnt/trunk@371943 91177308-0d34-0410-b5e6-96231b3b80d8 Hubert Tong a month ago
3 changed file(s) with 24 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
811811 "Import perf.data from a filename"},
812812 {NULL, NULL, 0, NULL}};
813813
814 PyMODINIT_FUNC initcPerf(void) { (void)Py_InitModule("cPerf", cPerfMethods); }
814 #if PY_MAJOR_VERSION >= 3
815 static PyModuleDef cPerfModuleDef = {PyModuleDef_HEAD_INIT,
816 "cPerf",
817 nullptr,
818 -1,
819 cPerfMethods,
820 nullptr,
821 nullptr,
822 nullptr,
823 nullptr};
824 #endif
825
826 PyMODINIT_FUNC initcPerf(void) {
827 #if PY_MAJOR_VERSION >= 3
828 return PyModule_Create(&cPerfModuleDef);
829 #else
830 (void)Py_InitModule("cPerf", cPerfMethods);
831 #endif
832 }
815833
816834 #else // STANDALONE
817835
66 MarkupSafe==0.23
77 SQLAlchemy==1.1.11
88 Werkzeug==0.12.2
9 argparse==1.3.0
109 itsdangerous==0.24
1110 python-dateutil==2.6.0
1211 python-gnupg==0.3.7
1312 pytz==2016.10
14 wsgiref==0.1.2
1513 WTForms==2.0.2
1614 Flask-WTF==0.12
1715 typing
77 from sys import platform as _platform
88 import sys
99 from setuptools import setup, find_packages, Extension
10
11 if sys.version_info < (2, 7):
12 raise RuntimeError("Python 2.7 or higher required.")
1013
1114 cflags = []
1215
123126 install_requires=reqs,
124127
125128 ext_modules=[cPerf],
129
130 python_requires='>=2.7',
126131 )