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
7dd1e4e6
Commit
7dd1e4e6
authored
Mar 17, 2018
by
Jason R. Coombs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extract common functionality into reusable functions
parent
929acc4e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
33 deletions
+24
-33
pavement.py
pavement.py
+17
-26
pkg_resources/_vendor/packaging/markers.py
pkg_resources/_vendor/packaging/markers.py
+3
-3
pkg_resources/_vendor/packaging/requirements.py
pkg_resources/_vendor/packaging/requirements.py
+4
-4
No files found.
pavement.py
View file @
7dd1e4e6
...
...
@@ -25,6 +25,18 @@ def rewrite_packaging(pkg_files, new_root):
file
.
write_text
(
text
)
def
clean
(
vendor
):
"""
Remove all files out of the vendor directory except the meta
data (as pip uninstall doesn't support -t).
"""
remove_all
(
path
for
path
in
vendor
.
glob
(
'*'
)
if
path
.
basename
()
!=
'vendored.txt'
)
def
install
(
vendor
):
clean
(
vendor
)
install_args
=
[
...
...
@@ -35,37 +47,16 @@ def install(vendor):
pip
.
main
(
install_args
)
remove_all
(
vendor
.
glob
(
'*.dist-info'
))
remove_all
(
vendor
.
glob
(
'*.egg-info'
))
(
vendor
/
'__init__.py'
).
write_text
(
''
)
def
update_pkg_resources
():
vendor
=
Path
(
'pkg_resources/_vendor'
)
# pip uninstall doesn't support -t, so do it manually
remove_all
(
vendor
.
glob
(
'packaging*'
))
remove_all
(
vendor
.
glob
(
'six*'
))
remove_all
(
vendor
.
glob
(
'pyparsing*'
))
remove_all
(
vendor
.
glob
(
'appdirs*'
))
install_args
=
[
'install'
,
'-r'
,
str
(
vendor
/
'vendored.txt'
),
'-t'
,
str
(
vendor
),
]
pip
.
main
(
install_args
)
rewrite_packaging
(
vendor
/
'packaging'
,
'pkg_resources.extern.'
)
remove_all
(
vendor
.
glob
(
'*.dist-info'
))
remove_all
(
vendor
.
glob
(
'*.egg-info'
))
install
(
vendor
)
rewrite_packaging
(
vendor
/
'packaging'
,
'pkg_resources.extern'
)
def
update_setuptools
():
vendor
=
Path
(
'setuptools/_vendor'
)
# pip uninstall doesn't support -t, so do it manually
remove_all
(
vendor
.
glob
(
'packaging*'
))
remove_all
(
vendor
.
glob
(
'six*'
))
remove_all
(
vendor
.
glob
(
'pyparsing*'
))
install_args
=
[
'install'
,
'-r'
,
str
(
vendor
/
'vendored.txt'
),
'-t'
,
str
(
vendor
),
]
pip
.
main
(
install_args
)
install
(
vendor
)
rewrite_packaging
(
vendor
/
'packaging'
,
'setuptools.extern'
)
remove_all
(
vendor
.
glob
(
'*.dist-info'
))
remove_all
(
vendor
.
glob
(
'*.egg-info'
))
pkg_resources/_vendor/packaging/markers.py
View file @
7dd1e4e6
...
...
@@ -8,9 +8,9 @@ import os
import
platform
import
sys
from
pkg_resources.extern.
.
pyparsing
import
ParseException
,
ParseResults
,
stringStart
,
stringEnd
from
pkg_resources.extern.
.
pyparsing
import
ZeroOrMore
,
Group
,
Forward
,
QuotedString
from
pkg_resources.extern.
.
pyparsing
import
Literal
as
L
# noqa
from
pkg_resources.extern.pyparsing
import
ParseException
,
ParseResults
,
stringStart
,
stringEnd
from
pkg_resources.extern.pyparsing
import
ZeroOrMore
,
Group
,
Forward
,
QuotedString
from
pkg_resources.extern.pyparsing
import
Literal
as
L
# noqa
from
._compat
import
string_types
from
.specifiers
import
Specifier
,
InvalidSpecifier
...
...
pkg_resources/_vendor/packaging/requirements.py
View file @
7dd1e4e6
...
...
@@ -6,10 +6,10 @@ from __future__ import absolute_import, division, print_function
import
string
import
re
from
pkg_resources.extern.
.
pyparsing
import
stringStart
,
stringEnd
,
originalTextFor
,
ParseException
from
pkg_resources.extern.
.
pyparsing
import
ZeroOrMore
,
Word
,
Optional
,
Regex
,
Combine
from
pkg_resources.extern.
.
pyparsing
import
Literal
as
L
# noqa
from
pkg_resources.extern.
.
six.moves.urllib
import
parse
as
urlparse
from
pkg_resources.extern.pyparsing
import
stringStart
,
stringEnd
,
originalTextFor
,
ParseException
from
pkg_resources.extern.pyparsing
import
ZeroOrMore
,
Word
,
Optional
,
Regex
,
Combine
from
pkg_resources.extern.pyparsing
import
Literal
as
L
# noqa
from
pkg_resources.extern.six.moves.urllib
import
parse
as
urlparse
from
.markers
import
MARKER_EXPR
,
Marker
from
.specifiers
import
LegacySpecifier
,
Specifier
,
SpecifierSet
...
...
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