setuptools, ez_setup over http proxy

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • yoda

    #1

    setuptools, ez_setup over http proxy

    I've recently configured my network such that I use squid as a http
    proxy. I'd now like to be able to use setuptools and ez_setup via this
    proxy. Is this possible? If so, how do I do it?

    The most that the setuptools documentation says is
    (http://peak.telecommunity.com/DevCenter/setuptools):

    "....If you are behind an NTLM-based firewall that prevents Python
    programs from accessing the net directly, you may wish to first install
    and use the APS proxy server, which lets you get past such firewalls in
    the same way that your web browser(s) do....."

    ps. I'm not sure that this is the right forum for this question. If it
    isn't feel free to point me to the right place.

  • Phillip J. Eby

    #2
    Re: setuptools, ez_setup over http proxy

    yoda wrote:[color=blue]
    > I've recently configured my network such that I use squid as a http
    > proxy. I'd now like to be able to use setuptools and ez_setup via this
    > proxy. Is this possible? If so, how do I do it?[/color]

    The key thing is just that Python's urllib module needs to be able to
    retrieve web pages and download files. Try pulling up your Python
    interpreter and retrieving a page with urllib. If it works, you're
    good to go, and no need to bother with anything else.

    If it doesn't work, try Jay's suggestions for setting environment
    variables, or consult the urllib doc and/or code for more details on
    how urllib finds out what proxy to use.
    [color=blue]
    > The most that the setuptools documentation says is
    > (http://peak.telecommunity.com/DevCenter/setuptools):
    >
    > "....If you are behind an NTLM-based firewall that prevents Python
    > programs from accessing the net directly, you may wish to first install
    > and use the APS proxy server, which lets you get past such firewalls in
    > the same way that your web browser(s) do....."[/color]

    Yeah, I mention this because by far the most common cause of problems
    for Windows users is that they're behind one of those infernal
    NTLM-based firewalls and thus can't use urllib unaided.

    [color=blue]
    > ps. I'm not sure that this is the right forum for this question. If it
    > isn't feel free to point me to the right place.[/color]

    The distutils-sig mailing list is the best place to ensure you get an
    answer relatively quickly, since I don't subscribe to this list, just
    skim it from time to time.

    Comment

    • Phillip J. Eby

      #3
      Re: setuptools, ez_setup over http proxy

      yoda wrote:[color=blue]
      > I've recently configured my network such that I use squid as a http
      > proxy. I'd now like to be able to use setuptools and ez_setup via this
      > proxy. Is this possible? If so, how do I do it?[/color]

      The key thing is just that Python's urllib module needs to be able to
      retrieve web pages and download files. Try pulling up your Python
      interpreter and retrieving a page with urllib. If it works, you're
      good to go, and no need to bother with anything else.

      If it doesn't work, try Jay's suggestions for setting environment
      variables, or consult the urllib doc and/or code for more details on
      how urllib finds out what proxy to use.
      [color=blue]
      > The most that the setuptools documentation says is
      > (http://peak.telecommunity.com/DevCenter/setuptools):
      >
      > "....If you are behind an NTLM-based firewall that prevents Python
      > programs from accessing the net directly, you may wish to first install
      > and use the APS proxy server, which lets you get past such firewalls in
      > the same way that your web browser(s) do....."[/color]

      Yeah, I mention this because by far the most common cause of problems
      for Windows users is that they're behind one of those infernal
      NTLM-based firewalls and thus can't use urllib unaided.

      [color=blue]
      > ps. I'm not sure that this is the right forum for this question. If it
      > isn't feel free to point me to the right place.[/color]

      The distutils-sig mailing list is the best place to ensure you get an
      answer relatively quickly, since I don't subscribe to this list, just
      skim it from time to time.

      Comment

      • ray223@gmail.com

        #4
        Re: setuptools, ez_setup over http proxy


        yoda wrote:[color=blue]
        > I've recently configured my network such that I use squid as a http
        > proxy. I'd now like to be able to use setuptools and ez_setup via this
        > proxy. Is this possible? If so, how do I do it?
        >
        > The most that the setuptools documentation says is
        > (http://peak.telecommunity.com/DevCenter/setuptools):
        >
        > "....If you are behind an NTLM-based firewall that prevents Python
        > programs from accessing the net directly, you may wish to first install
        > and use the APS proxy server, which lets you get past such firewalls in
        > the same way that your web browser(s) do....."
        >
        > ps. I'm not sure that this is the right forum for this question. If it
        > isn't feel free to point me to the right place.[/color]

        Hi,

        This is really an urllib2 question ...

        setup an environment variable "HTTP_PROXY " that points to your proxy
        server, of the form:

        user:password@s erver:port

        urllib2 doco will probably have more details

        Ray Smith

        Comment

        • yoda

          #5
          Re: setuptools, ez_setup over http proxy

          Thanks guys,
          Incidentally, I had already tried setting the env variable $http_proxy
          but that didn't seem to work.

          That being said, I'm moving this discussion to the distutils-SIG
          mailing list while I carry out some tests.

          Thanks again.

          Comment

          • yoda

            #6
            Re: setuptools, ez_setup over http proxy

            It appears that it was my proxy config that was flakey. setup tools
            works like a charm. :$

            Comment

            Working...