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
48eeeee5
Commit
48eeeee5
authored
Dec 29, 2008
by
Tarek Ziadé
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed #4646 : distutils was choking on empty options arg in the setup function.
parent
99059691
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
1 deletion
+25
-1
dist.py
dist.py
+1
-1
tests/test_dist.py
tests/test_dist.py
+24
-0
No files found.
dist.py
View file @
48eeeee5
...
...
@@ -235,7 +235,7 @@ Common commands: (see '--help-commands' for more)
# command options will override any supplied redundantly
# through the general options dictionary.
options
=
attrs
.
get
(
'options'
)
if
options
:
if
options
is
not
None
:
del
attrs
[
'options'
]
for
(
command
,
cmd_options
)
in
options
.
items
():
opt_dict
=
self
.
get_option_dict
(
command
)
...
...
tests/test_dist.py
View file @
48eeeee5
...
...
@@ -8,6 +8,7 @@ import os
import
StringIO
import
sys
import
unittest
import
warnings
from
test.test_support
import
TESTFN
...
...
@@ -131,6 +132,29 @@ class DistributionTestCase(unittest.TestCase):
if
os
.
path
.
exists
(
my_file
):
os
.
remove
(
my_file
)
def
test_empty_options
(
self
):
# an empty options dictionary should not stay in the
# list of attributes
klass
=
distutils
.
dist
.
Distribution
# catching warnings
warns
=
[]
def
_warn
(
msg
):
warns
.
append
(
msg
)
old_warn
=
warnings
.
warn
warnings
.
warn
=
_warn
try
:
dist
=
klass
(
attrs
=
{
'author'
:
'xxx'
,
'name'
:
'xxx'
,
'version'
:
'xxx'
,
'url'
:
'xxxx'
,
'options'
:
{}})
finally
:
warnings
.
warn
=
old_warn
self
.
assertEquals
(
len
(
warns
),
0
)
class
MetadataTestCase
(
unittest
.
TestCase
):
def
test_simple_metadata
(
self
):
...
...
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