Directories not included during install

Bug #1016085 reported by Stuart Stent
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
High
Gabriel Hurley

Bug Description

OS: CentOS release 6.2 (Final)
Python: 2.6.6
Source : https://github.com/openstack/horizon.git
Branch: Master
Last Commit in Log: 26dd86d3a7666dc0ecea3283db4f6190ecafddb7

running 'python setup.py install' does not include the /bin and /test directories (see attached for list of files installed)

This also affects the 'python setup.py bdist_rpm' command

Revision history for this message
Stuart Stent (stuart-stent) wrote :
Revision history for this message
Devin Carlen (devcamcar) wrote :

Does this affect the essex version as well? I would assume not but let me know where you're having this issue.

Changed in horizon:
status: New → Confirmed
importance: Undecided → High
milestone: none → folsom-2
Revision history for this message
Stuart Stent (stuart-stent) wrote :

The main issue is the fact that the /bin directory is not included ( which is I believe a very recent addition)

However, the /test folder is not included in the Essex release.

Revision history for this message
Tihomir Trifonov (ttrifonov) wrote :

/bin/ is already included : https://review.openstack.org/#/c/8769/1/MANIFEST.in

Which /test folder do you mean? There is openstack_dashboard/test/, which seems to be included in the attached list:

usr/lib/python2.6/site-packages/openstack_dashboard/test/__init__.py
usr/lib/python2.6/site-packages/openstack_dashboard/test/settings.py

Revision history for this message
Stuart Stent (stuart-stent) wrote :

apologies, yes test is being included. However, as you can see from the previously attached file (created after the lines were added to the manifest), /bin is not included from some reason. I agree I would expect it to given that it is explicitly listed in the manifest.

Changed in horizon:
assignee: nobody → Lin Hua Cheng (lin-hua-cheng)
Revision history for this message
Gabriel Hurley (gabriel-hurley) wrote :

That's very odd. The setup.py sdist command *does* include the /bin directory, while the bdist command does not.

After doing some research, it appears that sdist uses the MANIFEST.in file, while bdist uses the package_data attribute in setup.py (which we are bypassing by the "include_package_data=True" bit.

This should be fixable with some manual trial and error.

Revision history for this message
Lin Hua Cheng (lin-hua-cheng) wrote :

I am not sure if having the LESS files in the bin folder is correct.. In the other openstack project, the bin folder is typically used for storing scripts for managing the instance like restarting, running client api..

When django start, it expects that the bin folder must be in the same directory level as horizon and openstack-dashboard.

Related code:
File: openstack-dashboard/settings.py
Code: less_binary = os.path.join(os.path.dirname(__file__), '..', 'bin', 'less', 'lessc')

This means after deployment of the package, it should look like:
.. python2.7/dist-packages/horizon
.. python2.7/dist-packages/openstack-dashboard
.. python2.7/dist-packages/bin

Is that the expectation? Perhaps LESS should be move to horizon folder thoughts?

Revision history for this message
Lin Hua Cheng (lin-hua-cheng) wrote :

The include_package_data attribute tells setuptools to automatically include any data files it finds inside the package directories. Package directory is determined by the existence of __init__.py.

The bin folder is in the same directory level as horizon and openstack-dashboard. It is not in any python packages, that's why it is not getting picked-up.

Changed in horizon:
assignee: Lin Hua Cheng (lin-hua-cheng) → nobody
Changed in horizon:
status: Confirmed → In Progress
assignee: nobody → Gabriel Hurley (gabriel-hurley)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

Fix proposed to branch: master
Review: https://review.openstack.org/9309

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/9309
Committed: http://github.com/openstack/horizon/commit/df106572ccedb6f1fe578018dddad9cb3f3e1800
Submitter: Jenkins
Branch: master

commit df106572ccedb6f1fe578018dddad9cb3f3e1800
Author: Gabriel Hurley <email address hidden>
Date: Tue Jul 3 20:46:40 2012 -0700

    Includes LESS files in bdist packages.

    Incidentally cleans up some files that didn't exist in the
    MANIFEST.in file.

    Fixes bug 1016085 but now needs to be followed by a fix for
    bug 1020799 in the future.

    Change-Id: I8a53bb17f14afdad61513afa67de7134722c49e9

Changed in horizon:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in horizon:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in horizon:
milestone: folsom-2 → 2012.2
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.