From 8af8bcb66c1761c18f4e98ec4784053c280b527d Mon Sep 17 00:00:00 2001 From: jgirardet Date: Mon, 5 Feb 2018 21:40:50 +0100 Subject: [PATCH] add git support --- pipenv_to_requirements/__init__.py | 3 +++ pipenv_to_requirements/vectors/Pipfile.editable | 1 + .../vectors/Pipfile.editable.requirements.txt | 1 + 3 files changed, 5 insertions(+) diff --git a/pipenv_to_requirements/__init__.py b/pipenv_to_requirements/__init__.py index 500ea93..6d93cf3 100644 --- a/pipenv_to_requirements/__init__.py +++ b/pipenv_to_requirements/__init__.py @@ -36,10 +36,13 @@ def clean_version(pkg_name, pkg_info): editable = pkg_info.get("editable", False) markers = pkg_info.get("markers", "").strip() extras = pkg_info.get("extras", []) + git = pkg_info.get("git", "").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 ." if extras: diff --git a/pipenv_to_requirements/vectors/Pipfile.editable b/pipenv_to_requirements/vectors/Pipfile.editable index c0eb13f..6b535b0 100644 --- a/pipenv_to_requirements/vectors/Pipfile.editable +++ b/pipenv_to_requirements/vectors/Pipfile.editable @@ -21,3 +21,4 @@ tox = "*" [packages] pbr = ">=3.0" pipenv = "*" +bla = {git = "https://github.com/fake/bla.git", editable=true} \ No newline at end of file diff --git a/pipenv_to_requirements/vectors/Pipfile.editable.requirements.txt b/pipenv_to_requirements/vectors/Pipfile.editable.requirements.txt index ec5b389..35c6f09 100644 --- a/pipenv_to_requirements/vectors/Pipfile.editable.requirements.txt +++ b/pipenv_to_requirements/vectors/Pipfile.editable.requirements.txt @@ -1,2 +1,3 @@ pbr>=3.0 pipenv +-e git+https://github.com/fake/bla.git#egg=bla \ No newline at end of file