Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(308)

#11880: add a {dist-info} category to distutils2

Can't Edit
Can't Publish+Mail
Start Review
Created:
1 year, 1 month ago by dholth
Modified:
11 months, 2 weeks ago
Reviewers:
merwok
CC:
tarek_ziade.org, eric.araujo, dholth, alexis, michael.mulich_gmail.com, davidbarnett2_gmail.com
Visibility:
Public.

Patch Set 1 #

Total comments: 7
Unified diffs Side-by-side diffs Delta from patch set Stats Patch
Lib/packaging/command/install_data.py View 3 chunks +17 lines, -5 lines 5 comments Download
Lib/packaging/command/install_distinfo.py View 1 chunk +5 lines, -0 lines 2 comments Download

Messages

Total messages: 2
eric.araujo
http://bugs.python.org/review/11880/diff/4951/Lib/packaging/command/install_data.py File Lib/packaging/command/install_data.py (right): http://bugs.python.org/review/11880/diff/4951/Lib/packaging/command/install_data.py#newcode6 Lib/packaging/command/install_data.py:6: from functools import partial A goal in the future ...
11 months, 2 weeks ago #1
dholth
11 months, 2 weeks ago #2
Thanks for taking a look at this.

http://bugs.python.org/review/11880/diff/4951/Lib/packaging/command/install_d...
File Lib/packaging/command/install_data.py (right):

http://bugs.python.org/review/11880/diff/4951/Lib/packaging/command/install_d...
Lib/packaging/command/install_data.py:6: from functools import partial
On 2012/07/03 06:48:02, eric.araujo wrote:
> A goal in the future is to build CPython extensions with distutils2, so
modules
> like functools can’t be dependencies.

I can't import from parts of the standard library? I just use this to curry a
function. I could reimplement partial here in 3 lines.

http://bugs.python.org/review/11880/diff/4951/Lib/packaging/command/install_d...
Lib/packaging/command/install_data.py:58: 
On 2012/07/03 06:48:02, eric.araujo wrote:
> This implementation looks complicated and fragile.

I don't think it is as bad as it looks. We create a function object to do the
copy (most of this was on line 44 in the old code), then if it's in the
dist-info directory we copy it later.

This dist-info category is oh-so-very-special because the code that builds the
dist-info directory deletes it before it runs, but after install_data runs, and
dist-info has to run absolutely last to be able to update RECORD with hashes of
all the files.

http://bugs.python.org/review/11880/diff/4951/Lib/packaging/command/install_d...
File Lib/packaging/command/install_distinfo.py (right):

http://bugs.python.org/review/11880/diff/4951/Lib/packaging/command/install_d...
Lib/packaging/command/install_distinfo.py:83:
install_data.extra_dist_info.pop()()
On 2012/07/03 06:48:02, eric.araujo wrote:
> I do not understand this code.

install_data.extra_dist_info is the list of closures we built before: functions
that copy one file into dist-info when called. We call them all here.
Sign in to reply to this message.

RSS Feeds Recent Issues | This issue
This is Rietveld cbc36f91f3f7