1
1
Fork 0
mirror of https://github.com/pypa/pip synced 2023-12-13 21:30:23 +01:00

Fix broken build on windows

Less brittle path handling for URL construction

As discussed in comments on SHA:  f73385a more work may need to be done.
This commit is contained in:
Paul Nasrat 2011-04-26 18:19:59 +01:00
parent fe79b4fd3e
commit 0787e2c455

View file

@ -1,7 +1,8 @@
import os.path
import textwrap
from pip.backwardcompat import urllib
from pip.req import Requirements
from tests.test_pip import reset_env, run_pip, write_file, pyversion, here
from tests.test_pip import reset_env, run_pip, write_file, pyversion, here, path_to_url
from tests.local_repos import local_checkout
from tests.path import Path
@ -29,7 +30,7 @@ def test_relative_requirements_file():
Test installing from a requirements file with a relative path with an egg= definition..
"""
url = 'file://' + str(urllib.quote(Path(here).abspath + '/packages/../packages/FSPkg') + '#egg=FSPkg').replace('\\', '/')
url = path_to_url(os.path.join(here, 'packages', '..', 'packages', 'FSPkg')) + '#egg=FSPkg'
env = reset_env()
write_file('file-egg-req.txt', textwrap.dedent("""\
%s