Skip to content
This repository was archived by the owner on Dec 4, 2023. It is now read-only.

Commit e5ccb8e

Browse files
authored
Merge pull request #32 from benoit-pierre/fix_dependency_links_support
fix support for `dependency_links`
2 parents 18c2337 + c99ba5e commit e5ccb8e

File tree

3 files changed

+22
-2
lines changed

3 files changed

+22
-2
lines changed

CHANGES.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
2.12.1
2+
~~~~~~
3+
4+
* #32: Fix support for ``dependency_links``.
5+
16
2.12
27
~~~~
38

ptr.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,10 @@ def _super_run(self):
173173
dist = CustomizedDist()
174174
for attr in 'allow_hosts index_url'.split():
175175
setattr(dist, attr, getattr(self, attr))
176-
for attr in 'install_requires tests_require extras_require'.split():
176+
for attr in (
177+
'dependency_links install_requires '
178+
'tests_require extras_require '
179+
).split():
177180
setattr(dist, attr, getattr(self.distribution, attr))
178181
installed_dists = self.install_dists(dist)
179182
if self.dry_run:

tests/test_ptr.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import contextlib
44
import io
55
import os
6+
import shutil
67
import sys
78
import tarfile
89
import textwrap
@@ -101,6 +102,13 @@ def test_egg_fetcher(venv, setuptools_req, test_args):
101102
</body></html>
102103
'''
103104
).format(dist_sdist=dist_sdist))
105+
# Move barbazquux1 out of the index.
106+
shutil.move(index_dir / 'barbazquux1', venv.workspace)
107+
barbazquux1_link = (
108+
'file://' + str(venv.workspace.abspath())
109+
+ '/barbazquux1/barbazquux1-0.1.tar.gz'
110+
+ '#egg=barbazquux1-0.1'
111+
)
104112
# Prepare fake project.
105113
project_dir = (venv.workspace / 'project-0.1').mkdir()
106114
with open(project_dir / 'setup.py', 'w') as fp:
@@ -110,6 +118,9 @@ def test_egg_fetcher(venv, setuptools_req, test_args):
110118
setup(
111119
name='project',
112120
version='0.1',
121+
dependency_links = [
122+
{barbazquux1_link!r},
123+
],
113124
setup_requires=[
114125
'pytest-runner',
115126
],
@@ -126,7 +137,8 @@ def test_egg_fetcher(venv, setuptools_req, test_args):
126137
'extra': 'barbazquux5',
127138
}}
128139
)
129-
''').format(sys_platform=sys.platform))
140+
''').format(sys_platform=sys.platform,
141+
barbazquux1_link=barbazquux1_link))
130142
with open(project_dir / 'setup.cfg', 'w') as fp:
131143
fp.write(DALS(
132144
'''

0 commit comments

Comments
 (0)