Repository: AnalogJ/lexicon

Issue:
unable to install transip dependencies or use transip plugin
Output: pip install dns-lexicon[transip]
```
Requirement already satisfied: dns-lexicon[transip] in ./lib/python2.7/site-packages
Requirement already satisfied: requests in ./lib/python2.7/site-packages (from dns-lexicon[transip])
Requirement already satisfied: future in ./lib/python2.7/site-packages (from dns-lexicon[transip])
Requirement already satisfied: tldextract in ./lib/python2.7/site-packages (from dns-lexicon[transip])
Collecting transip==0.1.0-dev; extra == "transip" (from dns-lexicon[transip])
  Could not find a version that satisfies the requirement transip==0.1.0-dev; extra == "transip" (from dns-lexicon[transip]) (from versions: 0.2)
No matching distribution found for transip==0.1.0-dev; extra == "transip" (from dns-lexicon[transip])
```

after manual installing the transip package i get the following error

```
Namespace(action='list', auth_api_key='../test-acme/private', auth_username='foobar', content='foo', delegated=None, domain='example.org', identifier=None, name='foo', priority=None, provider_name='transip', ttl=None, type='NS')
Traceback (most recent call last):
  File "./bin/lexicon", line 11, in <module>
    sys.exit(main())
  File "/home/muller/lexicon/local/lib/python2.7/site-packages/lexicon/__main__.py", line 56, in main
    client.execute()
  File "/home/muller/lexicon/local/lib/python2.7/site-packages/lexicon/client.py", line 36, in execute
    self.provider.authenticate()
  File "/home/muller/lexicon/local/lib/python2.7/site-packages/lexicon/providers/transip.py", line 43, in authenticate
    self.client.get_info(domain)
  File "/home/muller/lexicon/local/lib/python2.7/site-packages/transip/service/domain.py", line 26, in get_info
    cookie = self.build_cookie(mode=MODE_RO, method='getInfo', parameters=[domain_name])
  File "/home/muller/lexicon/local/lib/python2.7/site-packages/transip/client.py", line 111, in build_cookie
    timestamp=timestamp, nonce=nonce, additional=parameters))
  File "/home/muller/lexicon/local/lib/python2.7/site-packages/transip/client.py", line 51, in _sign
    privkey = rsa.PrivateKey.load_pkcs1(keydata)
  File "/home/muller/lexicon/local/lib/python2.7/site-packages/rsa/key.py", line 75, in load_pkcs1
    return method(keyfile)
  File "/home/muller/lexicon/local/lib/python2.7/site-packages/rsa/key.py", line 511, in _load_pkcs1_pem
    return cls._load_pkcs1_der(der)
  File "/home/muller/lexicon/local/lib/python2.7/site-packages/rsa/key.py", line 459, in _load_pkcs1_der
    as_ints = tuple(int(x) for x in priv[1:9])
  File "/home/muller/lexicon/local/lib/python2.7/site-packages/rsa/key.py", line 459, in <genexpr>
    as_ints = tuple(int(x) for x in priv[1:9])
TypeError: int() argument must be a string or a number, not 'Sequence'

```


Discussion:
oke, some more testing...
running `openssl rsa -in transip-api.key -out ./private` on the key makes it work
might need some documentation and/or fixing 
Now that https://github.com/benkonrath/transip-api/issues/18 is closed I should be able to specify the transip library directly. I'll work on a fix for that today. 

Resolving patch:
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -86,9 +86,8 @@
     # added to optional-requirements.txt as well.
     extras_require={
         'route53': ['boto3'],
-        'transip': ['transip==0.1.0-dev']
+        'transip': ['transip>=0.3.0']
     },
-    dependency_links = ['git+https://github.com/benkonrath/transip-api.git#egg=transip-0.1.0-dev'],
 
     # To provide executable scripts, use entry points in preference to the
     # "scripts" keyword. Entry points provide cross-platform support and allow


Test patch: