From 8ab9885c9955ce1188ac6885920cdefdccb5b2f5 Mon Sep 17 00:00:00 2001 From: Alexandre Badez Date: Fri, 9 Feb 2018 22:12:32 +0100 Subject: [PATCH] Handle local path properly. --- pipenv_to_requirements/__init__.py | 3 ++- pipenv_to_requirements/vectors/Pipfile.editable | 4 ++-- .../vectors/Pipfile.editable.requirements-dev.txt | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/pipenv_to_requirements/__init__.py b/pipenv_to_requirements/__init__.py index 6d93cf3..21a9431 100644 --- a/pipenv_to_requirements/__init__.py +++ b/pipenv_to_requirements/__init__.py @@ -37,6 +37,7 @@ 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 != "*": @@ -44,7 +45,7 @@ def clean_version(pkg_name, pkg_info): 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: diff --git a/pipenv_to_requirements/vectors/Pipfile.editable b/pipenv_to_requirements/vectors/Pipfile.editable index 6b535b0..352fb93 100644 --- a/pipenv_to_requirements/vectors/Pipfile.editable +++ b/pipenv_to_requirements/vectors/Pipfile.editable @@ -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} \ No newline at end of file +bla = {git = "https://github.com/fake/bla.git", editable=true} diff --git a/pipenv_to_requirements/vectors/Pipfile.editable.requirements-dev.txt b/pipenv_to_requirements/vectors/Pipfile.editable.requirements-dev.txt index 0f864c7..0f70404 100644 --- a/pipenv_to_requirements/vectors/Pipfile.editable.requirements-dev.txt +++ b/pipenv_to_requirements/vectors/Pipfile.editable.requirements-dev.txt @@ -1,4 +1,5 @@ -e . +-e ../other_e1839a8/ cryptography>=1.4 flake8>=3.4 pycodestyle>=2.0