Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #32 #33

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGES.txt
Expand Up @@ -4,6 +4,9 @@ Change History
1.6.4 (unreleased)
==================

- Make zc.buildout work behind a cntlm proxy
[ale-rt]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be a good idea to link to the bug (https://bugs.launchpad.net/zc.buildout/+bug/484735).

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a comment to the original report.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I meant specifically in the changelog. When people go to pypi.python.org and try to see what changed in version X.Y.Z, it's very nice to have a clickable URL where you can read more about the bug (why it happens, how it's fixed, does it affect me? etc.).


- remove `data_files` from `setup.py`, which was installing README.txt
in current directory during installation
[Domen Kožar]
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -12,7 +12,7 @@
#
##############################################################################
name = "zc.buildout"
version = "1.6.2"
version = "1.6.4-unreleased"

import os
from setuptools import setup
Expand Down
12 changes: 11 additions & 1 deletion src/zc/buildout/download.py
Expand Up @@ -25,6 +25,7 @@
import shutil
import tempfile
import urllib
import urllib2
import urlparse
import zc.buildout

Expand Down Expand Up @@ -177,7 +178,16 @@ def download(self, url, md5sum=None, path=None):

try:
try:
tmp_path, headers = urllib.urlretrieve(url, tmp_path)
# begin proxy patch
# Commenting the following line:
# tmp_path, headers = urllib.urlretrieve(url, tmp_path)
# to fix https://bugs.launchpad.net/zc.buildout/+bug/484735
tmp_sock = urllib2.urlopen(url)
tmp_file = open(tmp_path, 'w')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be open(tmp_path, 'wb'), or things might break on Windows.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, should I redo the pull request?
I am a git noob :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you push new commits to this branch, github will automatically update this pull request.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I did it :)

tmp_file.write(tmp_sock.read())
tmp_file.close()
# end proxy

if not check_md5sum(tmp_path, md5sum):
raise ChecksumError(
'MD5 checksum mismatch downloading %r' % url)
Expand Down