Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
setuptools
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jérome Perrin
setuptools
Commits
92ca9eab
Commit
92ca9eab
authored
Apr 21, 2020
by
mergify[bot]
Committed by
GitHub
Apr 21, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2040 from hugovk/deprecate-bdist_wininst
Deprecate bdist_wininst
parents
53c284b3
8487f1ae
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
0 deletions
+33
-0
changelog.d/2040.change.rst
changelog.d/2040.change.rst
+1
-0
setuptools/command/bdist_wininst.py
setuptools/command/bdist_wininst.py
+9
-0
setuptools/tests/test_bdist_deprecations.py
setuptools/tests/test_bdist_deprecations.py
+23
-0
No files found.
changelog.d/2040.change.rst
0 → 100644
View file @
92ca9eab
Deprecated the ``bdist_wininst`` command. Binary packages should be built as wheels instead.
setuptools/command/bdist_wininst.py
View file @
92ca9eab
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
)
...
...
setuptools/tests/test_bdist_deprecations.py
0 → 100644
View file @
92ca9eab
"""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
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment