Index: lnt/testing/profile/cPerf.cpp =================================================================== --- lnt/testing/profile/cPerf.cpp +++ lnt/testing/profile/cPerf.cpp @@ -812,7 +812,25 @@ "Import perf.data from a filename"}, {NULL, NULL, 0, NULL}}; -PyMODINIT_FUNC initcPerf(void) { (void)Py_InitModule("cPerf", cPerfMethods); } +#if PY_MAJOR_VERSION >= 3 +static PyModuleDef cPerfModuleDef = {PyModuleDef_HEAD_INIT, + "cPerf", + nullptr, + -1, + cPerfMethods, + nullptr, + nullptr, + nullptr, + nullptr}; +#endif + +PyMODINIT_FUNC initcPerf(void) { +#if PY_MAJOR_VERSION >= 3 + return PyModule_Create(&cPerfModuleDef); +#else + (void)Py_InitModule("cPerf", cPerfMethods); +#endif +} #else // STANDALONE Index: requirements-py3.client.txt =================================================================== --- requirements-py3.client.txt +++ requirements-py3.client.txt @@ -7,12 +7,10 @@ MarkupSafe==0.23 SQLAlchemy==1.1.11 Werkzeug==0.12.2 -argparse==1.3.0 itsdangerous==0.24 python-dateutil==2.6.0 python-gnupg==0.3.7 pytz==2016.10 -wsgiref==0.1.2 WTForms==2.0.2 Flask-WTF==0.12 typing Index: requirements.client.txt =================================================================== --- requirements.client.txt +++ requirements.client.txt @@ -7,12 +7,12 @@ MarkupSafe==0.23 SQLAlchemy==1.1.11 Werkzeug==0.12.2 -argparse==1.3.0 +argparse==1.3.0;python_version<"3.0" itsdangerous==0.24 python-dateutil==2.6.0 python-gnupg==0.3.7 pytz==2016.10 -wsgiref==0.1.2 +wsgiref==0.1.2;python_version<"3.0" WTForms==2.0.2 Flask-WTF==0.12 typing Index: setup.py =================================================================== --- setup.py +++ setup.py @@ -30,7 +30,10 @@ sys.argv.remove("--server") req_file = "requirements.server.txt" else: - req_file = "requirements.client.txt" + if sys.version_info[0] > 2: + req_file = "requirements-py3.client.txt" + else: + req_file = "requirements.client.txt" try: install_reqs = parse_requirements(req_file, session=False) except TypeError: