Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
news
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Sartika Aritonang
news
Commits
475f5654
Commit
475f5654
authored
May 29, 2020
by
Sartika Aritonang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Upload New File
parent
d78703a9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
0 deletions
+44
-0
appdirs.py
stbi/Lib/site-packages/pip/_internal/utils/appdirs.py
+44
-0
No files found.
stbi/Lib/site-packages/pip/_internal/utils/appdirs.py
0 → 100644
View file @
475f5654
"""
This code wraps the vendored appdirs module to so the return values are
compatible for the current pip code base.
The intention is to rewrite current usages gradually, keeping the tests pass,
and eventually drop this after all usages are changed.
"""
from
__future__
import
absolute_import
import
os
from
pip._vendor
import
appdirs
as
_appdirs
from
pip._internal.utils.typing
import
MYPY_CHECK_RUNNING
if
MYPY_CHECK_RUNNING
:
from
typing
import
List
def
user_cache_dir
(
appname
):
# type: (str) -> str
return
_appdirs
.
user_cache_dir
(
appname
,
appauthor
=
False
)
def
user_config_dir
(
appname
,
roaming
=
True
):
# type: (str, bool) -> str
path
=
_appdirs
.
user_config_dir
(
appname
,
appauthor
=
False
,
roaming
=
roaming
)
if
_appdirs
.
system
==
"darwin"
and
not
os
.
path
.
isdir
(
path
):
path
=
os
.
path
.
expanduser
(
'~/.config/'
)
if
appname
:
path
=
os
.
path
.
join
(
path
,
appname
)
return
path
# for the discussion regarding site_config_dir locations
# see <https://github.com/pypa/pip/issues/1733>
def
site_config_dirs
(
appname
):
# type: (str) -> List[str]
dirval
=
_appdirs
.
site_config_dir
(
appname
,
appauthor
=
False
,
multipath
=
True
)
if
_appdirs
.
system
not
in
[
"win32"
,
"darwin"
]:
# always look in /etc directly as well
return
dirval
.
split
(
os
.
pathsep
)
+
[
'/etc'
]
return
[
dirval
]
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