[feature] package web-ui as a distributable python module
authorKali Kaneko (leap communications) <kali@leap.se>
Thu, 24 Mar 2016 22:57:30 +0000 (18:57 -0400)
committerKali Kaneko <kali@futeisha.org>
Mon, 24 Jul 2017 18:34:04 +0000 (14:34 -0400)
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.

.gitignore
web-ui/Makefile
web-ui/pixelated_www/__init__.py [new file with mode: 0644]
web-ui/setup.py [new file with mode: 0644]

index 52a387d..392a831 100644 (file)
@@ -38,3 +38,6 @@ _trial_temp
 web-ui/coverage
 .nyc_output
 web-ui/npm-debug.log.*
+web-ui/pixelated_www/*
+web-ui/build/*
+!web-ui/pixelated_www/__init__.py
index 0bc9d5d..3ee83eb 100644 (file)
@@ -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 (file)
index 0000000..e69de29
diff --git a/web-ui/setup.py b/web-ui/setup.py
new file mode 100644 (file)
index 0000000..04c59be
--- /dev/null
@@ -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/*',
+      ]})