summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2017-09-06 21:58:04 -0400
committerGitHub <noreply@github.com>2017-09-06 21:58:04 -0400
commite5ccb8ed654beba6e22d90197097f446899f08bf (patch)
tree44a0522e5fb1b7725fc0c4540e1edb20daa5bda5
parent18c23373216a57bd0301a07601120aecd95906f4 (diff)
parentc99ba5e6d8cf24a5e62c538668ebc4ab0638067e (diff)
downloadpytest-runner-e5ccb8ed654beba6e22d90197097f446899f08bf.tar.gz
Merge pull request #32 from benoit-pierre/fix_dependency_links_support2.12.1
fix support for `dependency_links`
-rw-r--r--CHANGES.rst5
-rw-r--r--ptr.py5
-rw-r--r--tests/test_ptr.py14
3 files changed, 22 insertions, 2 deletions
diff --git a/CHANGES.rst b/CHANGES.rst
index 21132ef..aa5f5d3 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -1,3 +1,8 @@
+2.12.1
+~~~~~~
+
+* #32: Fix support for ``dependency_links``.
+
2.12
~~~~
diff --git a/ptr.py b/ptr.py
index ecba60c..56a5c00 100644
--- a/ptr.py
+++ b/ptr.py
@@ -173,7 +173,10 @@ class PyTest(orig.test):
dist = CustomizedDist()
for attr in 'allow_hosts index_url'.split():
setattr(dist, attr, getattr(self, attr))
- for attr in 'install_requires tests_require extras_require'.split():
+ for attr in (
+ 'dependency_links install_requires '
+ 'tests_require extras_require '
+ ).split():
setattr(dist, attr, getattr(self.distribution, attr))
installed_dists = self.install_dists(dist)
if self.dry_run:
diff --git a/tests/test_ptr.py b/tests/test_ptr.py
index aeb0f8d..521c59a 100644
--- a/tests/test_ptr.py
+++ b/tests/test_ptr.py
@@ -3,6 +3,7 @@ from __future__ import unicode_literals
import contextlib
import io
import os
+import shutil
import sys
import tarfile
import textwrap
@@ -101,6 +102,13 @@ def test_egg_fetcher(venv, setuptools_req, test_args):
</body></html>
'''
).format(dist_sdist=dist_sdist))
+ # Move barbazquux1 out of the index.
+ shutil.move(index_dir / 'barbazquux1', venv.workspace)
+ barbazquux1_link = (
+ 'file://' + str(venv.workspace.abspath())
+ + '/barbazquux1/barbazquux1-0.1.tar.gz'
+ + '#egg=barbazquux1-0.1'
+ )
# Prepare fake project.
project_dir = (venv.workspace / 'project-0.1').mkdir()
with open(project_dir / 'setup.py', 'w') as fp:
@@ -110,6 +118,9 @@ def test_egg_fetcher(venv, setuptools_req, test_args):
setup(
name='project',
version='0.1',
+ dependency_links = [
+ {barbazquux1_link!r},
+ ],
setup_requires=[
'pytest-runner',
],
@@ -126,7 +137,8 @@ def test_egg_fetcher(venv, setuptools_req, test_args):
'extra': 'barbazquux5',
}}
)
- ''').format(sys_platform=sys.platform))
+ ''').format(sys_platform=sys.platform,
+ barbazquux1_link=barbazquux1_link))
with open(project_dir / 'setup.cfg', 'w') as fp:
fp.write(DALS(
'''