Skip to content

Commit c0612be

Browse files
committed
build pathUtils anyway
1 parent 2c2bfbe commit c0612be

1 file changed

Lines changed: 59 additions & 47 deletions

File tree

setup.py

Lines changed: 59 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -5,80 +5,92 @@
55
from scorep.instrumenter import has_c_instrumenter
66

77
if scorep.helper.get_scorep_version() < 5.0:
8-
raise RuntimeError(
9-
"Score-P version less than 5.0, plase use Score-P >= 5.0")
8+
raise RuntimeError("Score-P version less than 5.0, plase use Score-P >= 5.0")
109

1110
link_mode = scorep.helper.get_scorep_config("Link mode:")
1211
if not ("shared=yes" in link_mode):
1312
raise RuntimeError(
14-
"Score-P not build with \"--enable-shared\". Link mode is:\n{}".format(link_mode))
13+
'Score-P not build with "--enable-shared". Link mode is:\n{}'.format(link_mode)
14+
)
1515

1616
check_compiler = scorep.helper.get_scorep_config("C99 compiler used:")
1717
if "gcc" in check_compiler:
1818
gcc_plugin = scorep.helper.get_scorep_config("GCC plug-in support:")
1919
if not ("yes" in gcc_plugin):
20-
raise RuntimeError("Score-P uses GCC but is not build with GCC Compiler Plugin. "
21-
"GCC plug-in support is:\n{}".format(gcc_plugin))
20+
raise RuntimeError(
21+
"Score-P uses GCC but is not build with GCC Compiler Plugin. "
22+
"GCC plug-in support is:\n{}".format(gcc_plugin)
23+
)
2224

2325

2426
cmodules = []
2527
(include, _, _, _, _) = scorep.helper.generate_compile_deps([])
26-
src_folder = os.path.abspath('src')
28+
src_folder = os.path.abspath("src")
2729
include += [src_folder]
28-
sources = ['src/methods.cpp', 'src/scorep_bindings.cpp', 'src/scorepy/events.cpp']
29-
define_macros = [('PY_SSIZE_T_CLEAN', '1')]
30+
sources = [
31+
"src/methods.cpp",
32+
"src/scorep_bindings.cpp",
33+
"src/scorepy/events.cpp",
34+
"src/scorepy/pathUtils.cpp",
35+
]
36+
define_macros = [("PY_SSIZE_T_CLEAN", "1")]
3037
# We are using the UTF-8 string features from Python 3
3138
# The C Instrumenter functions are not available on PyPy
3239
if has_c_instrumenter():
33-
sources.extend([
34-
'src/classes.cpp',
35-
'src/scorepy/cInstrumenter.cpp',
36-
'src/scorepy/pythonHelpers.cpp',
37-
'src/scorepy/pathUtils.cpp',
38-
])
39-
define_macros.append(('SCOREPY_ENABLE_CINSTRUMENTER', '1'))
40+
sources.extend(
41+
[
42+
"src/classes.cpp",
43+
"src/scorepy/cInstrumenter.cpp",
44+
"src/scorepy/pythonHelpers.cpp",
45+
]
46+
)
47+
define_macros.append(("SCOREPY_ENABLE_CINSTRUMENTER", "1"))
4048
else:
41-
define_macros.append(('SCOREPY_ENABLE_CINSTRUMENTER', '0'))
49+
define_macros.append(("SCOREPY_ENABLE_CINSTRUMENTER", "0"))
4250

43-
cmodules.append(Extension('scorep._bindings',
44-
include_dirs=include,
45-
define_macros=define_macros,
46-
extra_compile_args=["-std=c++11"],
47-
sources=sources))
51+
cmodules.append(
52+
Extension(
53+
"scorep._bindings",
54+
include_dirs=include,
55+
define_macros=define_macros,
56+
extra_compile_args=["-std=c++11"],
57+
sources=sources,
58+
)
59+
)
4860

4961
setup(
50-
name='scorep',
62+
name="scorep",
5163
version=scorep._version.__version__,
52-
description='This is a Score-P tracing package for python',
53-
author='Andreas Gocht',
54-
author_email='andreas.gocht@tu-dresden.de',
55-
url='https://github.com/score-p/scorep_binding_python',
56-
long_description='''
64+
description="This is a Score-P tracing package for python",
65+
author="Andreas Gocht",
66+
author_email="andreas.gocht@tu-dresden.de",
67+
url="https://github.com/score-p/scorep_binding_python",
68+
long_description="""
5769
This package allows tracing of python code using Score-P.
5870
A working Score-P version is required.
5971
To enable tracing it uses LD_PRELOAD to load the Score-P runtime libraries.
6072
Besides this, it uses the traditional python-tracing infrastructure.
61-
''',
62-
packages=['scorep', 'scorep._instrumenters'],
73+
""",
74+
packages=["scorep", "scorep._instrumenters"],
6375
ext_modules=cmodules,
6476
classifiers=[
65-
'Development Status :: 4 - Beta',
66-
'Environment :: Console',
67-
'Intended Audience :: Developers',
68-
'Topic :: Software Development :: Testing',
69-
'Topic :: Software Development :: Quality Assurance',
70-
'Programming Language :: Python :: 2',
71-
'Programming Language :: Python :: 2.7',
72-
'Programming Language :: Python :: 3',
73-
'Programming Language :: Python :: 3.4',
74-
'Programming Language :: Python :: 3.5',
75-
'Programming Language :: Python :: 3.6',
76-
'Programming Language :: Python :: 3.7',
77-
'Programming Language :: Python :: 3.8',
78-
'Programming Language :: Python :: 3.9',
79-
'Programming Language :: Python :: Implementation :: CPython',
80-
'Programming Language :: Python :: Implementation :: PyPy',
81-
'Operating System :: POSIX',
82-
'Operating System :: Unix',
77+
"Development Status :: 4 - Beta",
78+
"Environment :: Console",
79+
"Intended Audience :: Developers",
80+
"Topic :: Software Development :: Testing",
81+
"Topic :: Software Development :: Quality Assurance",
82+
"Programming Language :: Python :: 2",
83+
"Programming Language :: Python :: 2.7",
84+
"Programming Language :: Python :: 3",
85+
"Programming Language :: Python :: 3.4",
86+
"Programming Language :: Python :: 3.5",
87+
"Programming Language :: Python :: 3.6",
88+
"Programming Language :: Python :: 3.7",
89+
"Programming Language :: Python :: 3.8",
90+
"Programming Language :: Python :: 3.9",
91+
"Programming Language :: Python :: Implementation :: CPython",
92+
"Programming Language :: Python :: Implementation :: PyPy",
93+
"Operating System :: POSIX",
94+
"Operating System :: Unix",
8395
],
8496
)

0 commit comments

Comments
 (0)