Commit 9bfc5fa5 authored by Hugo's avatar Hugo Committed by Paul Ganssle

Deprecate bdist_wininst

parent 53c284b3
import distutils.command.bdist_wininst as orig
import warnings
from setuptools import SetuptoolsDeprecationWarning
class bdist_wininst(orig.bdist_wininst):
......@@ -14,6 +17,12 @@ class bdist_wininst(orig.bdist_wininst):
return cmd
def run(self):
warnings.warn(
"bdist_wininst is deprecated and will be removed in a future "
"version. Use bdist_wheel (wheel packages) instead.",
SetuptoolsDeprecationWarning
)
self._is_running = True
try:
orig.bdist_wininst.run(self)
......
"""develop tests
"""
import mock
import pytest
from setuptools.dist import Distribution
from setuptools import SetuptoolsDeprecationWarning
@mock.patch("distutils.command.bdist_wininst.bdist_wininst")
def test_bdist_wininst_warning(distutils_cmd):
dist = Distribution(dict(
script_name='setup.py',
script_args=['bdist_wininst'],
name='foo',
py_modules=['hi'],
))
dist.parse_command_line()
with pytest.warns(SetuptoolsDeprecationWarning):
dist.run_commands()
distutils_cmd.run.assert_called_once()
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment