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
69c9a3aa
Commit
69c9a3aa
authored
Jan 25, 2018
by
Jason R. Coombs
Committed by
GitHub
Jan 25, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1262 from benoit-pierre/fix_1261
Fix dry-run handling
parents
618312be
4d38fb98
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
46 additions
and
1 deletion
+46
-1
setuptools/command/easy_install.py
setuptools/command/easy_install.py
+1
-1
setuptools/tests/test_easy_install.py
setuptools/tests/test_easy_install.py
+45
-0
No files found.
setuptools/command/easy_install.py
View file @
69c9a3aa
...
...
@@ -828,7 +828,7 @@ class easy_install(Command):
target
=
os
.
path
.
join
(
self
.
script_dir
,
script_name
)
self
.
add_output
(
target
)
if
not
self
.
dry_run
:
if
self
.
dry_run
:
return
mask
=
current_umask
()
...
...
setuptools/tests/test_easy_install.py
View file @
69c9a3aa
...
...
@@ -183,6 +183,51 @@ class TestEasyInstallTest:
cmd
.
ensure_finalized
()
cmd
.
easy_install
(
sdist_unicode
)
@
pytest
.
fixture
def
sdist_script
(
self
,
tmpdir
):
files
=
[
(
'setup.py'
,
DALS
(
"""
import setuptools
setuptools.setup(
name="setuptools-test-script",
version="1.0",
scripts=["mypkg_script"],
)
"""
),
),
(
u'mypkg_script'
,
DALS
(
"""
#/usr/bin/python
print('mypkg_script')
"""
),
),
]
sdist_name
=
'setuptools-test-script-1.0.zip'
sdist
=
str
(
tmpdir
/
sdist_name
)
make_sdist
(
sdist
,
files
)
return
sdist
@
pytest
.
mark
.
skipif
(
not
sys
.
platform
.
startswith
(
'linux'
),
reason
=
"Test can only be run on Linux"
)
def
test_script_install
(
self
,
sdist_script
,
tmpdir
,
monkeypatch
):
"""
Check scripts are installed.
"""
dist
=
Distribution
({
'script_args'
:
[
'easy_install'
]})
target
=
(
tmpdir
/
'target'
).
ensure_dir
()
cmd
=
ei
.
easy_install
(
dist
,
install_dir
=
str
(
target
),
args
=
[
'x'
],
)
monkeypatch
.
setitem
(
os
.
environ
,
'PYTHONPATH'
,
str
(
target
))
cmd
.
ensure_finalized
()
cmd
.
easy_install
(
sdist_script
)
assert
(
target
/
'mypkg_script'
).
exists
()
class
TestPTHFileWriter
:
def
test_add_from_cwd_site_sets_dirty
(
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