Opened 11 years ago

Closed 10 years ago

Last modified 10 years ago

#19252 closed Bug (fixed)

Install from wheel package

Reported by: Alex Morega <alex@…> Owned by: nobody
Component: Packaging Version: dev
Severity: Release blocker Keywords:
Cc: Florian Apolloner Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

On Mac OS, pip wheel builds a Django wheel which installs cleanly. On Linux, it builds a wheel which (correctly) marks data files as such, and they get installed outside the django package. This doesn't happen on Mac OS since setup.py tricks distutils into handling data files as purelib files.

This little patch extends the setup.py hack to kick in when building wheels regardless of platform: https://gist.github.com/4018017. The osx_install_data should probably be renamed though.

Change History (15)

comment:1 Changed 11 years ago by Jacob

Severity: NormalRelease blocker

comment:2 Changed 11 years ago by anonymous

Perhaps those files should always be purelib files?

comment:3 Changed 11 years ago by Claude Paroz

Triage Stage: UnreviewedAccepted
Version: 1.4master

comment:4 Changed 11 years ago by Jannis Leidel

Resolution: invalid
Status: newclosed

The wheel format isn't accepted yet (http://www.python.org/dev/peps/pep-0427/) and there is currently no such feature in pip. Closing as invalid as it's basically not a problem we should try to fix.

comment:5 Changed 11 years ago by anonymous

This bug is exactly the same thing that happens, and is currently compensated for, when building bdist_wininst installers. This should be a hint that data files are a problem.

Why not fix it for everyone by disusing the data files feature of distutils, regardless of sys.argv?

comment:6 Changed 11 years ago by Carl Meyer

Resolution: invalid
Severity: Release blockerNormal
Status: closednew

The wheel PEP is now accepted, and pip will soon have support AFAIK.

Regardless, comment 5 is correct that we jump through way too many hoops in our setup.py in order to try to trick distutils into handling data_files as if they were package_data, and that is the root cause of this bug. Instead we should just use package_data and solve the problem properly.

I don't believe this is a 1.5 release blocker, though, so re-setting the severity to Normal.

comment:7 Changed 11 years ago by Jacob

Severity: NormalRelease blocker

I'd like to start distributing Django as a wheel for 1.6, so I'm re-marking this as a release blocker. As we get closer to 1.6 we can revisit whether the ecosystem is "ready" and perhaps punt, but making this a blocker now means we won't just forget.

comment:8 Changed 11 years ago by Aymeric Augustin

Component: Core (Other)Packaging

comment:9 Changed 11 years ago by Florian Apolloner

FWIW our resolution of data-files is borked currently: https://github.com/django/django/blob/master/setup.py#L72

This results in: django/conf/project_template beeing data and django/conf/project_template/project_name beeing a package. As such a wheel install currently puts manage.py somehwere else and startproject doesn't collect all files…

So the whole setup.py needs a bit more rework.

comment:10 Changed 11 years ago by Florian Apolloner

Cc: Florian Apolloner added

comment:11 Changed 11 years ago by Florian Apolloner

Last edited 10 years ago by Florian Apolloner (previous) (diff)

comment:12 Changed 10 years ago by Florian Apolloner

Building wheels is possible via:

pip wheel .

(Assuming pip 1.4 and installed distribute and wheel). python setup.py bdist_wheel doesn't work since we don't use setuptools in setup.py, but that's fine.

Last edited 10 years ago by Florian Apolloner (previous) (diff)

comment:13 Changed 10 years ago by Jannis Leidel <jannis@…>

Resolution: fixed
Status: newclosed

In a5becad9094e5c5403b692b9a7b3a6ffaabf64a3:

Fixed #19252 -- Added support for wheel packages.

Signed-off-by: Jannis Leidel <jannis@…>

comment:14 Changed 10 years ago by Jannis Leidel <jannis@…>

In 4391718f26466f82f943e37368181d5c0520fa35:

[1.5.x] Fixed #19252 -- Added support for wheel packages.

Backport from master (a5becad9094e5c5403b692b9a7b3a6ffaabf64a3).

Signed-off-by: Jannis Leidel <jannis@…>

Note: See TracTickets for help on using tickets.
Back to Top