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
This commit is contained in:
parent
2c0a8f3220
commit
df106572cc
@ -1,7 +1,7 @@
|
|||||||
recursive-include bin *.js
|
recursive-include bin *.js
|
||||||
recursive-include doc *.py *.rst *.css *.js *.html *.conf *.jpg *.gif *.png *.css_t
|
recursive-include doc *.py *.rst *.css *.js *.html *.conf *.jpg *.gif *.png *.css_t
|
||||||
recursive-include horizon *.html *.css *.js *.csv *.template *.tmpl *.mo *.po
|
recursive-include horizon *.html *.css *.js *.csv *.template *.tmpl *.mo *.po
|
||||||
recursive-include openstack_dashboard *.html *.js *.css *.less *.csv *.template *.mo *.po *.example *.eot *.svg *.ttf *.woff *.png *.gif *.ico *.wsgi
|
recursive-include openstack_dashboard *.html *.js *.less *.mo *.po *.example *.eot *.svg *.ttf *.woff *.png *.ico *.wsgi
|
||||||
recursive-include tools *.py *.sh
|
recursive-include tools *.py *.sh
|
||||||
|
|
||||||
include AUTHORS
|
include AUTHORS
|
||||||
|
65
setup.py
65
setup.py
@ -20,23 +20,67 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import re
|
|
||||||
import setuptools
|
from distutils.core import setup
|
||||||
|
from distutils.command.install import INSTALL_SCHEMES
|
||||||
|
|
||||||
from horizon import version
|
from horizon import version
|
||||||
|
from horizon.openstack.common import setup as os_common_setup
|
||||||
|
|
||||||
from horizon.openstack.common import setup
|
|
||||||
|
|
||||||
requires = setup.parse_requirements()
|
requires = os_common_setup.parse_requirements()
|
||||||
depend_links = setup.parse_dependency_links()
|
depend_links = os_common_setup.parse_dependency_links()
|
||||||
tests_require = setup.parse_requirements(['tools/test-requires'])
|
tests_require = os_common_setup.parse_requirements(['tools/test-requires'])
|
||||||
|
|
||||||
ROOT = os.path.dirname(__file__)
|
ROOT = os.path.dirname(__file__)
|
||||||
|
target_dirs = ['horizon', 'openstack_dashboard', 'bin']
|
||||||
|
|
||||||
|
|
||||||
def read(fname):
|
def read(fname):
|
||||||
return open(os.path.join(ROOT, fname)).read()
|
return open(os.path.join(ROOT, fname)).read()
|
||||||
|
|
||||||
|
|
||||||
setuptools.setup(name="horizon",
|
def split(path, result=None):
|
||||||
|
"""
|
||||||
|
Split a path into components in a platform-neutral way.
|
||||||
|
"""
|
||||||
|
if result is None:
|
||||||
|
result = []
|
||||||
|
head, tail = os.path.split(path)
|
||||||
|
if head == '':
|
||||||
|
return [tail] + result
|
||||||
|
if head == path:
|
||||||
|
return result
|
||||||
|
return split(head, [tail] + result)
|
||||||
|
|
||||||
|
|
||||||
|
# Tell distutils not to put the data_files in platform-specific installation
|
||||||
|
# locations. See here for an explanation:
|
||||||
|
# https://groups.google.com/forum/#!topic/comp.lang.python/Nex7L-026uw
|
||||||
|
for scheme in INSTALL_SCHEMES.values():
|
||||||
|
scheme['data'] = scheme['purelib']
|
||||||
|
|
||||||
|
# Compile the list of packages available, because distutils doesn't have
|
||||||
|
# an easy way to do this.
|
||||||
|
packages, data_files = [], []
|
||||||
|
root_dir = os.path.dirname(__file__)
|
||||||
|
if root_dir != '':
|
||||||
|
os.chdir(root_dir)
|
||||||
|
|
||||||
|
for target_dir in target_dirs:
|
||||||
|
for dirpath, dirnames, filenames in os.walk(target_dir):
|
||||||
|
# Ignore dirnames that start with '.'
|
||||||
|
for i, dirname in enumerate(dirnames):
|
||||||
|
if dirname.startswith('.'):
|
||||||
|
del dirnames[i]
|
||||||
|
if '__init__.py' in filenames:
|
||||||
|
packages.append('.'.join(split(dirpath)))
|
||||||
|
elif filenames:
|
||||||
|
data_files.append([dirpath, [os.path.join(dirpath, f)
|
||||||
|
for f in filenames]])
|
||||||
|
|
||||||
|
|
||||||
|
setup(name="horizon",
|
||||||
version=version.canonical_version_string(),
|
version=version.canonical_version_string(),
|
||||||
url='https://github.com/openstack/horizon/',
|
url='https://github.com/openstack/horizon/',
|
||||||
license='Apache 2.0',
|
license='Apache 2.0',
|
||||||
@ -44,14 +88,15 @@ setuptools.setup(name="horizon",
|
|||||||
long_description=read('README.rst'),
|
long_description=read('README.rst'),
|
||||||
author='OpenStack',
|
author='OpenStack',
|
||||||
author_email='horizon@lists.launchpad.net',
|
author_email='horizon@lists.launchpad.net',
|
||||||
packages=setuptools.find_packages(),
|
packages=packages,
|
||||||
cmdclass=setup.get_cmdclass(),
|
data_files=data_files,
|
||||||
|
cmdclass=os_common_setup.get_cmdclass(),
|
||||||
include_package_data=True,
|
include_package_data=True,
|
||||||
install_requires=requires,
|
install_requires=requires,
|
||||||
tests_require=tests_require,
|
tests_require=tests_require,
|
||||||
dependency_links=depend_links,
|
dependency_links=depend_links,
|
||||||
zip_safe=False,
|
zip_safe=False,
|
||||||
classifiers=['Development Status :: 4 - Beta',
|
classifiers=['Development Status :: 5 - Production/Stable',
|
||||||
'Framework :: Django',
|
'Framework :: Django',
|
||||||
'Intended Audience :: Developers',
|
'Intended Audience :: Developers',
|
||||||
'License :: OSI Approved :: Apache Software License',
|
'License :: OSI Approved :: Apache Software License',
|
||||||
|
Loading…
Reference in New Issue
Block a user