Suppress a UserWarning about unknown dist option
This commit is contained in:
parent
8912b43051
commit
14cdf3b03c
1 changed files with 12 additions and 0 deletions
12
setup.py
12
setup.py
|
@ -6,6 +6,8 @@ import os
|
|||
import os.path
|
||||
import re
|
||||
import sys
|
||||
import warnings
|
||||
|
||||
from collections import defaultdict
|
||||
from distutils.command.build_scripts import build_scripts as BuildScripts
|
||||
from distutils.command.sdist import sdist as SDist
|
||||
|
@ -291,7 +293,17 @@ static_setup_params = dict(
|
|||
def main():
|
||||
"""Invoke installation process using setuptools."""
|
||||
setup_params = dict(static_setup_params, **get_dynamic_setup_params())
|
||||
ignore_warning_regex = (
|
||||
r"Unknown distribution option: '(project_urls|python_requires)'"
|
||||
)
|
||||
warnings.filterwarnings(
|
||||
'ignore',
|
||||
message=ignore_warning_regex,
|
||||
category=UserWarning,
|
||||
module='distutils.dist',
|
||||
)
|
||||
setup(**setup_params)
|
||||
warnings.resetwarnings()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
|
Loading…
Reference in a new issue