TritonDataCenter / python-manta

Python SDK for Manta (community maintained)
MIT License
25 stars 18 forks source link

pip installable and more modular #10

Closed deserat closed 11 years ago

deserat commented 11 years ago

I substituted setuptools for distutil:

This made it so setup.py could use the install_requires arg.

The install_requires arg made it lib/paramiko, lib/python2/httplib2, lib/python3/httplib2 didn't need to be there.

Getting rid of those made it so you don't have to maintain them in this repo.

I also pulled the "import manta" out of the setup script as it was only used to set the version. This enable install_requires to actually install the dependencies. Otherwise it would fail because the dependencies weren't installed.

You shouldn't have to care about python2 vs python3 as a matter of installation anymore...

pip install git+http://github.com/deserat/python-manta.git works now. easy_install . python setup.py install all work.

Those are by far the most common methods of installation in the python world.

If one isn't using SmartOS there is no need to pre-install pycrypto... it just gets installedt. If one is using SmartOS you still need to pkgin install py-crypto. cause well... you know.

I think this gives you the best of both worlds but if you hate it... just reject it. I'll only cry a little. :)

trentm commented 11 years ago

@deserat Thanks for this! I haven't had a chance to look closely at this yet. In general I'm not opposed at all to this, though I just want to test this out on my own. I'm currently on vacation and back next week, so hopefully I can look at this soon.

trentm commented 11 years ago

@deserat Thanks a lot for this! Cribbing from what you had here I've done much the same now and published "manta" version 2.0.1 to pypi: https://pypi.python.org/pypi/manta

Let me know if you hit any problems with this.

deserat commented 11 years ago

cool thank you. we'll test.