Skip to content

Commit

Permalink
editable: support 'subdir' field (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
danchr authored and gsemet committed Aug 24, 2018
1 parent 9412077 commit 1a5a7e0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pipenv_to_requirements/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ def clean_version(pkg_name, pkg_info):
editable = pkg_info.get("editable", False)
markers = pkg_info.get("markers", "").strip()
extras = pkg_info.get("extras", [])
subdir = pkg_info.get("subdirectory", [])
git = pkg_info.get("git", "").strip()
path = pkg_info.get("path", "").strip()
ref = pkg_info.get("ref", "").strip()
Expand All @@ -47,6 +48,8 @@ def clean_version(pkg_name, pkg_info):
elif git:
ref = "@" + ref if ref else ref
rstr = "-e git+" + git + ref + "#egg=" + pkg_name
if subdir:
rstr += '&subdirectory=' + subdir
else:
rstr = "-e " + path
if extras:
Expand Down

0 comments on commit 1a5a7e0

Please sign in to comment.