Forum Discussion

Radomir_Dopiera's avatar
Radomir_Dopiera
Icon for Nimbostratus rankNimbostratus
Nov 23, 2011

pyControl on pypi.python.org

Hello,

 

 

we have just recently started to use pyControl in our application, and it works as advertised with no problems so far. We have added pycontrol as a dependency to our application, but that makes it rather difficult to install it, since pyControl is not published at pypi.python.org. Instead, anyone who wishes to install our application has to come to devcentral.f5.com, register an account, find a download page for the right version of pyControl, download it, unpack, fix the setup.py file to actually make it work, copy it to the destination server and install there. That's a lot of work for such a simple application. We considered bundling pyControl to avoid all this hassle and allow for automated installation of our application, but that would deprieve us of any updates and bugfixes. The best solution for us would be to fix the setup.py installtion script and register the package at the Python Package Index, so that it can be automatically downloaded by pip or easy_install. Obviously, this should be done by the original author, if possible, but we are ready to do it by ourselves if you are not interested in doing that.

 

 

 

Any thoughts on that?

 

  • I'm very interested in doing this, although I'll need to speak with my friends over at f5 again - I've brought this up before, and I'd like to revisit it again. Note that when I wrote pyControl I was an employee at f5, and I consider it to be f5 property. So I'll need to chat with a few folks over there about it.

     

     

    But there's another angle for me to consider. It's becoming pretty clear that my current professional and personal demands are pulling me out of orbit with pyControl, and it's become difficult to find time to write code, have someone test it for me (I don't have access to v11 so I have to rely on others), etc.

     

     

    Pushing it out to pypi may increase this challenge. To be sure, the code hasn't changed much at all, but I still need to think a little bit.

     

     

    --Matt
  • Oh, and what is the issue with the setup.py that you found? Can you send me your changes?

     

     

    --Matt
  • Whether it is the property of F5 or not should not matter, as it is released under the GPL license. Of course I understand that it wouldn't be very nice to just use that license without talking to them first.

    As for the setup.py, it doesn't install the pycontrol.py file at all when used with pip. It seems that the find_packages function doesn't do its job properly (possibly because pycontrol.py is a module, not a package). Instead of trying to figure out what is wrong, I just wrote my own setup.py:

    
    from setuptools import setup
    
    setup(
        name='pycontrol',
        description='Library for F5 iControl API',
        long_description="""pyControl is a Python-based library that integrates
                            with F5's BIG-IP iControl management API.""",
        version='2.0.1r86',
        license='GPL',
        url='http://devcentral.f5.com/Default.aspx?tabid=149',
        keywords='iControl F5 API',
        py_modules=['pycontrol'],
        install_requires=['distribute', 'suds>=0.3.9'],
        platforms='any',
        classifiers=[
            'Operating System :: OS Independent',
            'Programming Language :: Python',
        ],
    )
    
  • Any updates here? I would really like to see pycontrol in pypi. As the OP stated, I'm also happy to publish it myself if needed.

     

  • It's not on pypi, but I've recently put it up on github: https://github.com/mcauthorn/pycontrol. I'll probably merge the patch above into setup.py as well, so you should be able to install it via pip and pointing it to the github uri.

     

     

    --Matt

     

  • Mhite convinced me this is a great idea. Jestin: would you please head over to github, add the pypi stuff (I've not done this before) and issue a pull request? That way we can draft off of your experience. We'll send it up afterwards.

     

     

    Thanks!

     

     

    --Matt
  • Should be up on pypi very soon gang, stay tuned. Rearranging some stuff now to make it pypi / pip friendly. Adding @Radomir's setup.py as well.

     

     

    --Matt
  • Gang: It's up on pypi now, and works via normal "pip install pycontrol" into your favorite virtualenv :) Thanks to Mhite and Radomir for the nudge and the help.

     

    http://pypi.python.org/pypi/pycontrol