Skip to content

Commit

Permalink
Handle local path properly.
Browse files Browse the repository at this point in the history
  • Loading branch information
Djabx authored and gsemet committed Feb 9, 2018
1 parent 75d1f17 commit 8ab9885
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion pipenv_to_requirements/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,15 @@ def clean_version(pkg_name, pkg_info):
markers = pkg_info.get("markers", "").strip()
extras = pkg_info.get("extras", [])
git = pkg_info.get("git", "").strip()
path = pkg_info.get("path", "").strip()
if not editable:
rstr = pkg_name
if version and version != "*":
rstr += version
elif git:
rstr = "-e git+" + git + "#egg=" + pkg_name
else:
rstr = "-e ."
rstr = "-e " + path
if extras:
rstr += "[{}]".format(', '.join([s.strip() for s in extras]))
if markers:
Expand Down
4 changes: 2 additions & 2 deletions pipenv_to_requirements/vectors/Pipfile.editable
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ pyyaml = ">=3.11"
reno = {extras = ["sphinx"]}
tox = "*"
"e1839a8" = {path = ".", editable = true}

"other_e1839a8" = {path = "../other_e1839a8/", editable = true}

[packages]
pbr = ">=3.0"
pipenv = "*"
bla = {git = "https://github.com/fake/bla.git", editable=true}
bla = {git = "https://github.com/fake/bla.git", editable=true}
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
-e .
-e ../other_e1839a8/
cryptography>=1.4
flake8>=3.4
pycodestyle>=2.0
Expand Down

0 comments on commit 8ab9885

Please sign in to comment.