diff options
author | Kali Kaneko (leap communications) <kali@leap.se> | 2016-03-24 18:57:30 -0400 |
---|---|---|
committer | Kali Kaneko <kali@futeisha.org> | 2017-07-24 14:34:04 -0400 |
commit | 414346683eb57fa13b6b04308ccf033024021f39 (patch) | |
tree | 0ef9920f18976b38e05353074b298e7edbe4fa67 /web-ui | |
parent | 784f6c54544f397b8e9e8ef5abf6414280ad124e (diff) |
[feature] package web-ui as a distributable python module
in this way, we can generate wheels and pip-install it from pypi or
other sources. we intend to use this for easing the shipping of the
Pixelated UI in our packages/bundles.
a separate debian package can also be easily generated form this
artifact.
Diffstat (limited to 'web-ui')
-rw-r--r-- | web-ui/Makefile | 9 | ||||
-rw-r--r-- | web-ui/pixelated_www/__init__.py | 0 | ||||
-rw-r--r-- | web-ui/setup.py | 47 |
3 files changed, 56 insertions, 0 deletions
diff --git a/web-ui/Makefile b/web-ui/Makefile index 0bc9d5d4..3ee83eb4 100644 --- a/web-ui/Makefile +++ b/web-ui/Makefile @@ -31,6 +31,15 @@ install: cp -r dist/* $(DESTDIR)/usr/share/pixelated-user-agent +pydist-clean: clean + rm -rf build/ + + +pydist-wheel: + cp -r dist/* pixelated_www/ + python setup.py bdist_wheel + + all: clean compile install .PHONY: clean compile install all diff --git a/web-ui/pixelated_www/__init__.py b/web-ui/pixelated_www/__init__.py new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/web-ui/pixelated_www/__init__.py diff --git a/web-ui/setup.py b/web-ui/setup.py new file mode 100644 index 00000000..04c59be2 --- /dev/null +++ b/web-ui/setup.py @@ -0,0 +1,47 @@ +#!/usr/bin/env python +# +# Copyright (c) 2014 ThoughtWorks, Inc. +# +# Pixelated is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# Pixelated is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with Pixelated. If not, see <http://www.gnu.org/licenses/>. + +from setuptools import setup + +import datetime +import time + +now = datetime.datetime.now() +timestamp = time.strftime('%Y%m%d', now.timetuple()) + +setup(name='pixelated-www', + version='0.1.%s' % timestamp, + description='Pixelated User Agent UI', + author='Thoughtworks', + author_email='pixelated-team@thoughtworks.com', + url='http://pixelated-project.github.io', + packages=['pixelated_www'], + package_data={ + '': [ + '404.html', + 'index.html', + 'app.min.js', + 'sandbox.html', + 'sandbox.min.js', + 'bower_components/jquery-file-upload/css/*', + 'bower_components/font-awesome/css/*', + 'css/*', + 'fonts/*', + 'locales/en-us/*', + 'locales/pt/*', + 'locales/sv/*', + ]}) |