Skip to content

Commit 052aa55

Browse files
committed
Unifies the project packaging into one set of modules.
There are no longer two separate projects living inside the horizon repository. There is a single project now with a single setup.py, single README, etc. The openstack-dashboard/dashboard django project is now named "openstack_dashboard" and lives as an example project in the topmost horizon directory. The "horizon/horizon" directory has been bumped up a level and now is directly on the path when the root horizon directory is on your python path. Javascript media which the horizon module directly relies upon now ships in the horizon/static dir rather than openstack-dashboard/dashboard/static. All the corresponding setup, installation, build, and env scripts have been updated accordingly. Implements blueprint unified-packaging. Change-Id: Ieed8e3c777432cd046c3e0298869a9428756ab62
1 parent fca0b64 commit 052aa55

File tree

452 files changed

+194
-2510
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

452 files changed

+194
-2510
lines changed

.gitignore

+2-4
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,8 @@ coverage.xml
88
pep8.txt
99
pylint.txt
1010
reports
11-
horizon/horizon.egg-info
12-
.horizon-venv
13-
openstack-dashboard/local/dashboard_openstack.sqlite3
14-
openstack-dashboard/local/local_settings.py
11+
horizon.egg-info
12+
openstack_dashboard/local/local_settings.py
1513
docs/build/
1614
docs/source/sourcecode
1715
.venv

horizon/Makefile Makefile

File renamed without changes.

README.rst

+47-28

docs/source/conf.py

+7-11
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,12 @@
1515
import os
1616

1717
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
18-
HORIZON_DIR = os.path.abspath(os.path.join(BASE_DIR, "..", "..", "horizon"))
19-
DASHBOARD_DIR = os.path.abspath(os.path.join(BASE_DIR, "..", "..", "openstack-dashboard"))
18+
ROOT = os.path.abspath(os.path.join(BASE_DIR, "..", ".."))
2019

21-
sys.path.insert(0, HORIZON_DIR)
22-
sys.path.insert(0, DASHBOARD_DIR)
20+
sys.path.insert(0, ROOT)
2321

2422
# This is required for ReadTheDocs.org, but isn't a bad idea anyway.
25-
os.environ['DJANGO_SETTINGS_MODULE'] = 'dashboard.settings'
23+
os.environ['DJANGO_SETTINGS_MODULE'] = 'openstack_dashboard.settings'
2624

2725
import horizon.version
2826

@@ -37,8 +35,6 @@ def find_autodoc_modules(module_name, sourcedir):
3735
for root, dirs, files in os.walk("."):
3836
for filename in files:
3937
if filename.endswith(".py"):
40-
# root = ./dashboard/test/unit
41-
# filename = base.py
4238
# remove the pieces of the root
4339
elements = root.split(os.path.sep)
4440
# replace the leading "." with the module name
@@ -53,10 +49,10 @@ def find_autodoc_modules(module_name, sourcedir):
5349
return modlist
5450

5551
RSTDIR = os.path.abspath(os.path.join(BASE_DIR, "sourcecode"))
56-
SRCS = {'horizon': HORIZON_DIR,
57-
'dashboard': DASHBOARD_DIR}
52+
SRCS = {'horizon': ROOT,
53+
'openstack_dashboard': ROOT}
5854

59-
EXCLUDED_MODULES = ('horizon.tests', 'dashboard.tests',)
55+
EXCLUDED_MODULES = ('horizon.tests', 'openstack_dashboard.tests',)
6056
CURRENT_SOURCES = {}
6157

6258
if not(os.path.exists(RSTDIR)):
@@ -118,7 +114,7 @@ def find_autodoc_modules(module_name, sourcedir):
118114
# Delete auto-generated .rst files for sources which no longer exist
119115
for directory, subdirs, files in list(os.walk(RSTDIR)):
120116
for old_file in files:
121-
if old_file not in CURRENT_SOURCES[directory]:
117+
if old_file not in CURRENT_SOURCES.get(directory, []):
122118
print "Removing outdated file for %s" % old_file
123119
os.remove(os.path.join(directory, old_file))
124120

horizon/LICENSE

-176
This file was deleted.

horizon/README

-30
This file was deleted.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)