Repository: ESSS/conda-devenv

Issue:
Incorrect rendering of pip dependencies with flags
Defining multiple dependencies in the `pip` section with flags such as  `--editable/-e`:

```
dependencies:
- pip:
  - --editable path/to/first/package
  - --editable path/to/second/package
name: pip_editable_test
```

generates this:

```
dependencies:
- pip:
  - --editable path/to/first/package,path/to/second/package
name: pip_editable_test
```

which causes `pip` to fail because of the comma. And even replacing the comma with a space produces an incorrect result because only the first dependency is installed as editable.

Discussion:
phausamann: @nicoddemus seems like 2.1.0 is missing from the changelog?

Patch:
diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index bc3e447..1cd5d4a 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -2,12 +2,20 @@
 CHANGELOG
 =========
 
+2.1.1 (2020-08-13)
+------------------
+
+* Correctly handle editable installs when using pip dependencies (`#113`_).
+
+.. _`#113`: https://github.com/ESSS/conda-devenv/issues/113
+
 2.1.0 (2020-06-26)
 ------------------
 
 * New ``get_env`` function to handle environment variables in Jinja contexts so it conveys
   better error messages in case of missing/invalid environment variables.
 
+
 2.0.0 (2020-06-08)
 ------------------
 
diff --git a/conda_devenv/devenv.py b/conda_devenv/devenv.py
index 621c0f8..36bd35d 100644
--- a/conda_devenv/devenv.py
+++ b/conda_devenv/devenv.py
@@ -252,10 +252,11 @@ def merge_dependencies_version_specifications(yaml_dict, key_to_merge, pip=False
                 )
             new_dict_dependencies.append(dep)
         elif isinstance(dep, str):
-            if pip and ("+" in dep or ":" in dep):
+            if pip and ("+" in dep or ":" in dep or dep.startswith("-")):
                 # Look for dependencies in the pip section that are
-                # managed by version control.  For example:
+                # managed by version control or contain flags.  For example:
                 #   hg+ssh://hg@bitbucket.org/mforbes/mmfutils-fork@0.4.12
+                #   --editable path/to/local/package
                 # Skip processing these and just pass them through
                 package_name = dep
                 package_version = ""


Test patch:
diff --git a/tests/test_merge.py b/tests/test_merge.py
index 3b8454c..e16ae15 100644
--- a/tests/test_merge.py
+++ b/tests/test_merge.py
@@ -133,12 +133,15 @@ def test_merge_dependencies_version_specifications_errors():
 
 
 def test_merge_dependencies_version_specifications_pip_dependencies():
-    """Regression test for issue #91 and #92."""
+    """Regression test for issue #91, #92 and #113."""
     merged_dict = {
         "dependencies": [
             "pip",
             {
                 "pip": [
+                    # issue #113
+                    "--editable path/to/first/package",
+                    "--editable path/to/second/package",
                     # issue #92
                     "ConfigAndParse ==0.15.2",
                     # issue #91