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
3b05fac4
Commit
3b05fac4
authored
Oct 14, 2016
by
Jason R. Coombs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add case-sensitive file comparison for detecting/adding standard default files.
parent
8ed698da
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
2 deletions
+20
-2
command/sdist.py
command/sdist.py
+20
-2
No files found.
command/sdist.py
View file @
3b05fac4
...
@@ -32,6 +32,24 @@ def show_formats():
...
@@ -32,6 +32,24 @@ def show_formats():
FancyGetopt
(
formats
).
print_help
(
FancyGetopt
(
formats
).
print_help
(
"List of available source distribution formats:"
)
"List of available source distribution formats:"
)
def
cs_path_exists
(
fspath
):
"""
Case-sensitive path existence check
>>> cs_path_exists(__file__)
True
>>> cs_path_exists(__file__.upper())
False
"""
if
not
os
.
path
.
exists
(
fspath
):
return
False
# make absolute so we always have a directory
abspath
=
os
.
path
.
abspath
(
fspath
)
directory
,
filename
=
os
.
path
.
split
(
abspath
)
return
filename
in
os
.
listdir
(
directory
)
class
sdist
(
Command
):
class
sdist
(
Command
):
description
=
"create a source distribution (tarball, zip file, etc.)"
description
=
"create a source distribution (tarball, zip file, etc.)"
...
@@ -235,7 +253,7 @@ class sdist(Command):
...
@@ -235,7 +253,7 @@ class sdist(Command):
alts
=
fn
alts
=
fn
got_it
=
False
got_it
=
False
for
fn
in
alts
:
for
fn
in
alts
:
if
os
.
path
.
exists
(
fn
):
if
cs_path_
exists
(
fn
):
got_it
=
True
got_it
=
True
self
.
filelist
.
append
(
fn
)
self
.
filelist
.
append
(
fn
)
break
break
...
@@ -244,7 +262,7 @@ class sdist(Command):
...
@@ -244,7 +262,7 @@ class sdist(Command):
self
.
warn
(
"standard file not found: should have one of "
+
self
.
warn
(
"standard file not found: should have one of "
+
', '
.
join
(
alts
))
', '
.
join
(
alts
))
else
:
else
:
if
os
.
path
.
exists
(
fn
):
if
cs_path_
exists
(
fn
):
self
.
filelist
.
append
(
fn
)
self
.
filelist
.
append
(
fn
)
else
:
else
:
self
.
warn
(
"standard file '%s' not found"
%
fn
)
self
.
warn
(
"standard file '%s' not found"
%
fn
)
...
...
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