Skip to content

Commit

Permalink
Initial attempts to clone from the local git repo rather than the rem…
Browse files Browse the repository at this point in the history
…ote. Doesn't work due to pypa/pip#10098.
  • Loading branch information
jaraco committed Jun 25, 2021
1 parent cc46258 commit fdc106a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pytest_perf/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import re
import subprocess
import contextlib
import pathlib

import pip_run
import tempora
Expand Down Expand Up @@ -93,10 +94,9 @@ def eval(self, cmd, **kwargs):

def upstream_url(extras=''):
"""
This URL doesn't work because of pypa/pip@10098
>>> upstream_url()
'pytest-perf@git+https://github.com/jaraco/pytest-perf'
'pytest-perf@git+file://...pytest-perf@main'
"""
cmd = ['git', 'remote', 'get-url', 'origin']
origin = subprocess.check_output(cmd, **_text).strip()
base, sep, name = origin.rpartition('/')
return f'{name}{extras}@git+{origin}'
here = pathlib.Path.cwd()
return f'{here.stem}{extras}@git+file://{here}@main'

0 comments on commit fdc106a

Please sign in to comment.