You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Metadata now only uses item access, and the names have changed: long_description is description, url is home_page, former description is summary, etc. (more in PEP-345). I don’t have Windows yet, so either we wait or we iterate I make a patch - you report failures - I make a patch etc.
I don’t have Windows yet, so either we wait or we iterate I make a patch - you report failures - I make a patch etc.
Actually I'm finding these failures on Ubuntu :-)
Although there are MBCS encoding issues which will also need to be fixed before you can build a pure-Python .exe installer on Linux (which is possible with distutils, so should work in packaging too), these failures occur before you get to that point. That last part can be fixed on Linux by doing (in bdist_wininst.create_exe):
I’ve patched most of bdist_wininst and started to work on a few tests which work under 2.7 and fail under 3.2 without the fixes so that I can assume I’ve not broken anything.
However, the mapping API of the Metadata class is quite unfriendly. For example, if I try to replace metadata.long_description with metadata['description'], no exception will be raised if the metadata does not contain a description, it will return 'UNKNOWN'. Code quickly becomes ugly. I will open another report to ask Tarek to allow me to revamp the mapping API of Metadata so that code can be easier to write and read.
(I’m also removing the dependency on another bug that’s not really a blocker.)
To clarify: the part about the tests applies to distutils. 3.x fixes will then be ported to packaging. Starting with successful tests in distutils 2.7 makes me feel more confident about editing distutils 3.x and packaging 3.3.
Activity
vsajip commentedon Oct 11, 2011
When you run
pysetup3 run bdist_wininst
in a project directory with a valid setup.cfg, it fails with
error: Invalid command install
after the build, build_py and build_scripts steps.
For info, pysetup3 run bdist_dumb runs without error.
merwok commentedon Oct 12, 2011
On line 118, replacing 'install' with 'install_dist' should fix it.
vsajip commentedon Oct 12, 2011
Sadly, it just defers the problem:
It appears that there is some confusion as to whether to use attribute or item access. The failing code above needs to be replaced with something like
merwok commentedon Oct 13, 2011
Metadata now only uses item access, and the names have changed: long_description is description, url is home_page, former description is summary, etc. (more in PEP-345). I don’t have Windows yet, so either we wait or we iterate I make a patch - you report failures - I make a patch etc.
vsajip commentedon Oct 13, 2011
Actually I'm finding these failures on Ubuntu :-)
Although there are MBCS encoding issues which will also need to be fixed before you can build a pure-Python .exe installer on Linux (which is possible with distutils, so should work in packaging too), these failures occur before you get to that point. That last part can be fixed on Linux by doing (in bdist_wininst.create_exe):
try:
cfgdata = cfgdata.encode("mbcs")
except LookupError:
cfgdata = cfgdata.encode("latin-1")
which is at least better than what we have now.
merwok commentedon Oct 14, 2011
I’ll apply your hack and fix the other issues.
merwok commentedon Oct 17, 2011
I’ve patched most of bdist_wininst and started to work on a few tests which work under 2.7 and fail under 3.2 without the fixes so that I can assume I’ve not broken anything.
However, the mapping API of the Metadata class is quite unfriendly. For example, if I try to replace metadata.long_description with metadata['description'], no exception will be raised if the metadata does not contain a description, it will return 'UNKNOWN'. Code quickly becomes ugly. I will open another report to ask Tarek to allow me to revamp the mapping API of Metadata so that code can be easier to write and read.
(I’m also removing the dependency on another bug that’s not really a blocker.)
merwok commentedon Oct 17, 2011
To clarify: the part about the tests applies to distutils. 3.x fixes will then be ported to packaging. Starting with successful tests in distutils 2.7 makes me feel more confident about editing distutils 3.x and packaging 3.3.