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
36bcc35f
Commit
36bcc35f
authored
Oct 14, 2016
by
Jason R. Coombs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update sdist_add_defaults to match CPython db8bb1bd6ac5
parent
57b4b845
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
2 deletions
+21
-2
setuptools/command/py36compat.py
setuptools/command/py36compat.py
+21
-2
No files found.
setuptools/command/py36compat.py
View file @
36bcc35f
...
...
@@ -3,6 +3,8 @@ from glob import glob
from
distutils.util
import
convert_path
from
distutils.command
import
sdist
from
setuptools.extern.six.moves
import
filter
class
sdist_add_defaults
:
"""
...
...
@@ -32,6 +34,23 @@ class sdist_add_defaults:
self
.
_add_defaults_c_libs
()
self
.
_add_defaults_scripts
()
@
staticmethod
def
_cs_path_exists
(
fspath
):
"""
Case-sensitive path existence check
>>> sdist._cs_path_exists(__file__)
True
>>> sdist._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
)
def
_add_defaults_standards
(
self
):
standards
=
[
self
.
READMES
,
self
.
distribution
.
script_name
]
for
fn
in
standards
:
...
...
@@ -39,7 +58,7 @@ class sdist_add_defaults:
alts
=
fn
got_it
=
False
for
fn
in
alts
:
if
os
.
path
.
exists
(
fn
):
if
self
.
_cs_path_
exists
(
fn
):
got_it
=
True
self
.
filelist
.
append
(
fn
)
break
...
...
@@ -48,7 +67,7 @@ class sdist_add_defaults:
self
.
warn
(
"standard file not found: should have one of "
+
', '
.
join
(
alts
))
else
:
if
os
.
path
.
exists
(
fn
):
if
self
.
_cs_path_
exists
(
fn
):
self
.
filelist
.
append
(
fn
)
else
:
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