Merge pull request #591 from PyO3/examples-debug

Compile examples in debug mode
This commit is contained in:
Yuji Kanagawa 2019-09-07 15:56:24 +09:00 committed by GitHub
commit 7745622b43
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 15 deletions

View File

@ -70,6 +70,12 @@ def get_py_version_cfgs():
return out_cfg
def make_rust_extension(module_name):
return RustExtension(
module_name, "Cargo.toml", rustc_flags=get_py_version_cfgs(), debug=True
)
install_requires = []
tests_require = install_requires + ["pytest", "pytest-benchmark"]
@ -87,20 +93,10 @@ setup(
],
packages=["rustapi_module"],
rust_extensions=[
RustExtension(
"rustapi_module.othermod", "Cargo.toml", rustc_flags=get_py_version_cfgs()
),
RustExtension(
"rustapi_module.datetime", "Cargo.toml", rustc_flags=get_py_version_cfgs()
),
RustExtension(
"rustapi_module.subclassing",
"Cargo.toml",
rustc_flags=get_py_version_cfgs(),
),
RustExtension(
"rustapi_module.test_dict", "Cargo.toml", rustc_flags=get_py_version_cfgs()
),
make_rust_extension("rustapi_module.othermod"),
make_rust_extension("rustapi_module.datetime"),
make_rust_extension("rustapi_module.subclassing"),
make_rust_extension("rustapi_module.test_dict"),
],
install_requires=install_requires,
tests_require=tests_require,

View File

@ -82,7 +82,7 @@ setup(
"Operating System :: MacOS :: MacOS X",
],
packages=["word_count"],
rust_extensions=[RustExtension("word_count.word_count", "Cargo.toml")],
rust_extensions=[RustExtension("word_count.word_count", "Cargo.toml", debug=True)],
install_requires=install_requires,
tests_require=tests_require,
setup_requires=setup_requires,