Repository: AnalogJ/lexicon

Issue:
Misleading error message: ProviderNotAvailableError -  This provider (plesk) has required dependencies that are missing. Please install lexicon[plesk] first.
```
(venv) mypc:~/myprojects/dns-lexicon$ pip freeze
certifi==2019.9.11
cffi==1.13.2
chardet==3.0.4
cryptography==2.8
dns-lexicon==3.3.10
future==0.18.2
idna==2.8
pycparser==2.19
pyOpenSSL==19.0.0
PyYAML==5.1.2
requests==2.22.0
requests-file==1.4.3
six==1.13.0
tldextract==2.2.2
urllib3==1.25.7
(venv) mypc:~/myprojects/dns-lexicon$ python main.py 
Traceback (most recent call last):
  File "main.py", line 111, in <module>
    update_server_record(data[0], data[1])
  File "main.py", line 62, in update_server_record
    plesk_record = list_action(filter_name=server_name, filter_type='A')
  File "main.py", line 58, in list_action
    return lexicon.client.Client(config).execute()
  File "/home/joe/myprojects/dns-lexicon/venv/lib/python3.6/site-packages/lexicon/client.py", line 36, in __init__
    self._validate_config()
  File "/home/joe/myprojects/dns-lexicon/venv/lib/python3.6/site-packages/lexicon/client.py", line 105, in _validate_config
    'Please install lexicon[{0}] first.'.format(provider_name))
lexicon.client.ProviderNotAvailableError: This provider (plesk) has required dependencies that are missing. Please install lexicon[plesk] first.

```
Error is misleading because of this part: 
> Please install **lexicon[plesk]** first.

it should be 
> Please install **dns-lexicon[plesk]** first.






Discussion:
I have a similar problem. The error doesn't specify what the real problem is here. I installed lexicon with the system's packet manager (apt on Ubuntu) which contains the logic for the provider I need. Something is missing, I get it, but what exactly? I'm unwilling to just do a `dns-lexicon[something]` if I can install system packages. It should list what dependencies are actually missing (e.g. describe the actual problem) and not present half-baked solutions.

Resolving patch:
diff --git a/lexicon/client.py b/lexicon/client.py
--- a/lexicon/client.py
+++ b/lexicon/client.py
@@ -115,7 +115,7 @@ def _validate_config(self) -> None:
             if not available:
                 raise ProviderNotAvailableError(
                     f"This provider ({provider_name}) has required extra dependencies that are missing. "
-                    f"Please run `pip install lexicon[{provider_name}]` first before using it."
+                    f"Please run `pip install dns-lexicon[{provider_name}]` first before using it."
                 )
 
         if not self.config.resolve("lexicon:action"):
diff --git a/lexicon/discovery.py b/lexicon/discovery.py
--- a/lexicon/discovery.py
+++ b/lexicon/discovery.py
@@ -50,7 +50,7 @@ def _resolve_requirements(provider: str, distribution: Distribution) -> bool:
         raise ValueError("Error while trying finding requirements.")
 
     requirements = [
-        re.sub(r"^(.*)\s\(.*\)(?:;.*|)$", r"\1", requirement)
+        re.sub(r"^(.*)\s\(.*\)(?:\s*;.*|)$", r"\1", requirement)
         for requirement in requires
         if f'extra == "{provider}"' in requirement
     ]


Test patch: