[Python-modules-commits] r15822 - in packages/web2py/trunk/debian (18 files)

jredrejo at users.alioth.debian.org jredrejo at users.alioth.debian.org
Mon Feb 21 09:19:00 UTC 2011


    Date: Monday, February 21, 2011 @ 09:18:52
  Author: jredrejo
Revision: 15822

almost finishing the web2py packaging

Added:
  packages/web2py/trunk/debian/README.Debian
  packages/web2py/trunk/debian/patches/
  packages/web2py/trunk/debian/patches/avoid_upgrading
  packages/web2py/trunk/debian/patches/desktop_file
  packages/web2py/trunk/debian/patches/launcher
  packages/web2py/trunk/debian/patches/series
  packages/web2py/trunk/debian/patches/welcome_without_sessions
  packages/web2py/trunk/debian/python-gluon.dirs
  packages/web2py/trunk/debian/python-gluon.install
  packages/web2py/trunk/debian/python-web2py.dirs
  packages/web2py/trunk/debian/python-web2py.docs
  packages/web2py/trunk/debian/python-web2py.examples
  packages/web2py/trunk/debian/python-web2py.install
  packages/web2py/trunk/debian/rules
  packages/web2py/trunk/debian/web2py.1
Modified:
  packages/web2py/trunk/debian/control
  packages/web2py/trunk/debian/copyright
  packages/web2py/trunk/debian/python-web2py.menu

Added: packages/web2py/trunk/debian/README.Debian
===================================================================
--- packages/web2py/trunk/debian/README.Debian	                        (rev 0)
+++ packages/web2py/trunk/debian/README.Debian	2011-02-21 09:18:52 UTC (rev 15822)
@@ -0,0 +1,10 @@
+web2py for Debian
+-----------------
+
+The documentation directory contains examples:  
+/usr/share/doc/python-web2py/examples of configuration files to
+deploy Web2py applications when using different servers or environment.
+The Web2py documentation contains the recipes showing how to use these
+configuration files: http://web2py.com/book/default/chapter/11
+
+ -- José L. Redrejo Rodríguez <jredrejo at debian.org>  Sun, 30 Jan 2011 10:32:55 +0000

Modified: packages/web2py/trunk/debian/control
===================================================================
--- packages/web2py/trunk/debian/control	2011-02-21 07:56:04 UTC (rev 15821)
+++ packages/web2py/trunk/debian/control	2011-02-21 09:18:52 UTC (rev 15822)
@@ -1,9 +1,9 @@
-Source: python-web2py
+Source: web2py
 Section: python
 Priority: optional
 Maintainer: José L. Redrejo Rodríguez <jredrejo at debian.org>
 Uploaders: Debian Python Modules Team <python-modules-team at lists.alioth.debian.org>
-Build-Depends: debhelper (>= 7.0.50~), python-support, python (>= 2.5)
+Build-Depends: debhelper (>= 7.0.50~), python-support, python (>= 2.5), quilt
 Build-Depends-Indep: libjs-jquery, python-feedparser
 Standards-Version: 3.9.1
 Homepage: http://www.web2py.com
@@ -12,7 +12,7 @@
 
 Package: python-web2py
 Architecture: all
-Depends: ${misc:Depends}, ${python:Depends}, python-gluon
+Depends: ${misc:Depends}, ${python:Depends}, python-gluon, python-tk
 Recommends: libjs-jquery
 Description: High-level Python web development framework
  web2py is a free, open-source web framework for agile development of
@@ -27,7 +27,8 @@
  
 Package: python-gluon
 Architecture: all
-Depends: ${misc:Depends}, ${python:Depends}, python-feedparser
+Depends: ${misc:Depends}, ${python:Depends}
+Recommends: python-feedparser
 Suggests: memcached
 Description: High-level Python web development framework
  web2py is a free, open-source web framework for agile development of

Modified: packages/web2py/trunk/debian/copyright
===================================================================
--- packages/web2py/trunk/debian/copyright	2011-02-21 07:56:04 UTC (rev 15821)
+++ packages/web2py/trunk/debian/copyright	2011-02-21 09:18:52 UTC (rev 15822)
@@ -146,12 +146,12 @@
 File gluon/rocket.py
     Copyright (c) 2010 Timothy Farrell
     This file is part of the https://launchpad.net/rocket project
-    License: MIT
+    License MIT
     The complete text of this license is included below.
     
 Directory applications/admin/static/eamy/*:
     Copyright (c) 2007-2008 Petr Krontorád, April-Child.com
-    License: MIT
+    License MIT
     The complete text of this license is included below.
 
 Files applications/examples/static/js/calendar.js, 
@@ -182,7 +182,7 @@
         
 File applications/welcome/static/js/dd_belatedpng.js:
     Copyright (c)  Drew Dille <drew.diller at gmail.com>
-    License: MIT
+    License MIT
     The complete text of this license is included below.
     
 File applications/welcome/static/js/modernizr-1.6.min.js:
@@ -201,7 +201,7 @@
 Directory applications/admin/static/edit_area/plugins/zencoding/*:
     Copyright (c) 2010-2011 Sergey Chikuyonok <serge.che at gmail.com>
     http://code.google.com/p/zen-coding/
-    License: MIT
+    License MIT
     The complete text of this license is included below.
         
 Directory applications/admin/static/edit_area/*:

Added: packages/web2py/trunk/debian/patches/avoid_upgrading
===================================================================
--- packages/web2py/trunk/debian/patches/avoid_upgrading	                        (rev 0)
+++ packages/web2py/trunk/debian/patches/avoid_upgrading	2011-02-21 09:18:52 UTC (rev 15822)
@@ -0,0 +1,42 @@
+Index: web2py-1.92.1/applications/admin/controllers/default.py
+===================================================================
+--- web2py-1.92.1.orig/applications/admin/controllers/default.py	2011-02-20 18:15:48.000000000 +0000
++++ web2py-1.92.1/applications/admin/controllers/default.py	2011-02-20 18:16:10.000000000 +0000
+@@ -220,18 +220,6 @@
+         session.flash = T('internal error')
+         redirect(URL('plugin',args=request.args))
+ 
+-def upgrade_web2py():
+-    if 'upgrade' in request.vars:
+-        (success, error) = upgrade(request)
+-        if success:
+-            session.flash = T('web2py upgraded; please restart it')
+-        else:
+-            session.flash = T('unable to upgrade because "%s"', error)
+-        redirect(URL('site'))
+-    elif 'noupgrade' in request.vars:
+-        redirect(URL('site'))
+-    return dict()
+-
+ def uninstall():
+     app = get_app()
+     if 'delete' in request.vars:
+Index: web2py-1.92.1/applications/admin/views/default/site.html
+===================================================================
+--- web2py-1.92.1.orig/applications/admin/views/default/site.html	2011-02-20 18:17:21.000000000 +0000
++++ web2py-1.92.1/applications/admin/views/default/site.html	2011-02-20 18:18:02.000000000 +0000
+@@ -58,14 +58,6 @@
+     {{if is_manager():}}
+     <div class="box">
+       <h3>{{=myversion}}</h3>      
+-      {{if session.check_version:}}
+-      <p id="check_version">
+-        {{=T('Checking for upgrades...')}}
+-      <script>ajax('{{=URL('check_version')}}',[],'check_version');</script>{{session.check_version=False}}
+-      {{else:}}
+-      <p id="check_version">
+-        {{=button("javascript:ajax('"+URL('check_version')+"',[],'check_version')", T('check for upgrades'))}}
+-      {{pass}}
+       </p>
+     </div>
+     {{pass}}

Added: packages/web2py/trunk/debian/patches/desktop_file
===================================================================
--- packages/web2py/trunk/debian/patches/desktop_file	                        (rev 0)
+++ packages/web2py/trunk/debian/patches/desktop_file	2011-02-21 09:18:52 UTC (rev 15822)
@@ -0,0 +1,16 @@
+Index: web2py-1.92.1/web2py.desktop
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ web2py-1.92.1/web2py.desktop	2011-02-20 18:04:52.000000000 +0000
+@@ -0,0 +1,11 @@
++[Desktop Entry]
++Encoding=UTF-8
++Name=web2py
++Comment=Enterprise web development framework using Python
++Comment[es]=Entorno empresarial de desarrollo web con Python
++Exec=web2py %U
++Icon=/usr/share/pixmaps/web2py.png
++Terminal=false
++Type=Application
++Categories=Development;
++StartupNotify=false

Added: packages/web2py/trunk/debian/patches/launcher
===================================================================
--- packages/web2py/trunk/debian/patches/launcher	                        (rev 0)
+++ packages/web2py/trunk/debian/patches/launcher	2011-02-21 09:18:52 UTC (rev 15822)
@@ -0,0 +1,118 @@
+Index: web2py-1.92.1/web2py
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ web2py-1.92.1/web2py	2011-02-21 08:59:32.000000000 +0000
+@@ -0,0 +1,113 @@
++#!/usr/bin/env python
++# -*- coding: utf-8 -*-
++##############################################################################
++# Module:     web2py
++# Purpose:     web2py launcher for use with Debian web2py package
++# Date:        15-Jan-2011.
++# Ver.:        18-Feb-2011.
++# Author:    José L. Redrejo Rodríguez
++# Copyright: 2011 -  José L. Redrejo Rodríguez <jredrejo @nospam@ debian.org>
++#
++# This program is free software: you can redistribute it and/or modify
++# it under the terms of the GNU General Public License as published by
++# the Free Software Foundation, either version 3 of the License, or
++# (at your option) any later version.
++# 
++# This program 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 General Public License for more details.
++# 
++# You should have received a copy of the GNU General Public License
++# along with this program.  If not, see <http://www.gnu.org/licenses/>.
++# 
++##############################################################################
++
++import os
++import sys
++import pwd
++from shutil import copytree
++
++web2py_skeleton="/usr/share/web2py/applications"
++
++
++
++def create_dir(path):
++	if not os.path.exists(path):
++		try:
++			os.makedirs(path)
++		except:
++			print "Error trying to make %s directory to run webwpy" % (path)
++			sys.exit(1)
++		return False
++	else:
++		return True
++
++
++
++home_user=pwd.getpwuid(os.getuid())[5]
++current_path = os.getcwd()
++if not os.access(current_path,os.W_OK):
++	current_path=home_user
++
++if current_path == home_user:
++	web2py_dir=os.path.join(home_user,"web2py")
++else:
++	web2py_dir=current_path
++
++
++web2py_applications=os.path.join(web2py_dir,"applications")
++
++#Create the applications dir if required:	
++create_dir(web2py_applications)	
++
++if not os.path.exists(os.path.join(web2py_dir,"welcome.w2p")):
++	open(os.path.join(web2py_dir,"welcome.w2p"), 'w').close() 
++
++#Create symlink to welcome application
++welcome_dir=os.path.join(web2py_applications,"welcome")
++if not os.path.exists(welcome_dir):
++	os.symlink(os.path.join(web2py_skeleton,"welcome"),welcome_dir)
++
++#Copy examples application:	
++examples_dir=os.path.join(web2py_applications,"examples")
++if not os.path.exists(examples_dir):
++	copytree(os.path.join(web2py_skeleton,"examples"),examples_dir)
++
++#Create admin application, with permissions for the user when needed
++admin_dir=os.path.join(web2py_applications,"admin")
++if not create_dir(admin_dir):
++	for subfolder in ('controllers', 'languages','models','static','views'):
++		folder_path =  os.path.join(admin_dir, subfolder)
++		if not os.path.exists(folder_path):
++			original_path=os.path.join(web2py_skeleton,"admin",subfolder)
++			os.symlink(original_path,folder_path)
++	
++	for subfolder in ('databases','modules', 'cron', 'errors', 'sessions',
++                       'private', 'uploads'):		
++		os.mkdir(os.path.join(admin_dir,subfolder))
++		
++
++if not "-f" in sys.argv:
++	sys.argv.append("-f")
++	sys.argv.append(web2py_dir)
++
++
++
++try:
++    path = '/usr/share/web2py'
++    os.chdir(path)
++except NameError:
++    path = os.getcwd() # Seems necessary for py2exe
++    
++try:
++    sys.path.remove(path)
++except ValueError:
++    pass
++sys.path.insert(0, path)
++
++# import gluon.import_all ##### This should be uncommented for py2exe.py
++import gluon.widget
++
++# Start Web2py and Web2py cron service!
++gluon.widget.start(cron=True)

Added: packages/web2py/trunk/debian/patches/series
===================================================================
--- packages/web2py/trunk/debian/patches/series	                        (rev 0)
+++ packages/web2py/trunk/debian/patches/series	2011-02-21 09:18:52 UTC (rev 15822)
@@ -0,0 +1,4 @@
+welcome_without_sessions
+launcher
+desktop_file
+avoid_upgrading

Added: packages/web2py/trunk/debian/patches/welcome_without_sessions
===================================================================
--- packages/web2py/trunk/debian/patches/welcome_without_sessions	                        (rev 0)
+++ packages/web2py/trunk/debian/patches/welcome_without_sessions	2011-02-21 09:18:52 UTC (rev 15822)
@@ -0,0 +1,8 @@
+Index: web2py-1.92.1/applications/welcome/models/debian.py
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ web2py-1.92.1/applications/welcome/models/debian.py	2011-02-20 19:37:46.000000000 +0000
+@@ -0,0 +1,3 @@
++# -*- coding: utf-8 -*-
++session.forget()
++

Added: packages/web2py/trunk/debian/python-gluon.dirs
===================================================================
--- packages/web2py/trunk/debian/python-gluon.dirs	                        (rev 0)
+++ packages/web2py/trunk/debian/python-gluon.dirs	2011-02-21 09:18:52 UTC (rev 15822)
@@ -0,0 +1 @@
+usr/share/python-support/python-gluon

Added: packages/web2py/trunk/debian/python-gluon.install
===================================================================
--- packages/web2py/trunk/debian/python-gluon.install	                        (rev 0)
+++ packages/web2py/trunk/debian/python-gluon.install	2011-02-21 09:18:52 UTC (rev 15822)
@@ -0,0 +1 @@
+gluon usr/share/python-support/python-gluon

Added: packages/web2py/trunk/debian/python-web2py.dirs
===================================================================
--- packages/web2py/trunk/debian/python-web2py.dirs	                        (rev 0)
+++ packages/web2py/trunk/debian/python-web2py.dirs	2011-02-21 09:18:52 UTC (rev 15822)
@@ -0,0 +1,6 @@
+usr/share/web2py/deposit
+usr/share/web2py/logs
+usr/share/web2py/site-packages
+usr/bin
+usr/share/applications
+usr/share/pixmaps

Added: packages/web2py/trunk/debian/python-web2py.docs
===================================================================
--- packages/web2py/trunk/debian/python-web2py.docs	                        (rev 0)
+++ packages/web2py/trunk/debian/python-web2py.docs	2011-02-21 09:18:52 UTC (rev 15822)
@@ -0,0 +1 @@
+debian/README.Debian

Added: packages/web2py/trunk/debian/python-web2py.examples
===================================================================
--- packages/web2py/trunk/debian/python-web2py.examples	                        (rev 0)
+++ packages/web2py/trunk/debian/python-web2py.examples	2011-02-21 09:18:52 UTC (rev 15822)
@@ -0,0 +1,6 @@
+router.example.py
+*.yaml 
+logging.example.conf  
+routes.example.py
+appengine_config.py
+gaehandler.py

Added: packages/web2py/trunk/debian/python-web2py.install
===================================================================
--- packages/web2py/trunk/debian/python-web2py.install	                        (rev 0)
+++ packages/web2py/trunk/debian/python-web2py.install	2011-02-21 09:18:52 UTC (rev 15822)
@@ -0,0 +1,8 @@
+applications/examples/static/img/favicon.png usr/share/pixmaps
+applications usr/share/web2py
+VERSION usr/share/web2py
+web2py.py usr/share/web2py
+wsgihandler.py usr/share/web2py
+splashlogo.gif usr/share/web2py
+web2py usr/bin
+web2py.desktop usr/share/applications

Modified: packages/web2py/trunk/debian/python-web2py.menu
===================================================================
--- packages/web2py/trunk/debian/python-web2py.menu	2011-02-21 07:56:04 UTC (rev 15821)
+++ packages/web2py/trunk/debian/python-web2py.menu	2011-02-21 09:18:52 UTC (rev 15822)
@@ -1,4 +1,4 @@
 ?package(web2py):needs="X11" section="Applications/Web Development"\
         title="web2py"\
-        icon="/usr/share/pixmaps/web2py.xpm"\
+        icon="/usr/share/pixmaps/web2py.png"\
         command="/usr/bin/web2py"

Added: packages/web2py/trunk/debian/rules
===================================================================
--- packages/web2py/trunk/debian/rules	                        (rev 0)
+++ packages/web2py/trunk/debian/rules	2011-02-21 09:18:52 UTC (rev 15822)
@@ -0,0 +1,45 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+PREFIX = debian/python-web2py/usr/share/web2py
+DIRS= databases errors sessions private uploads cache
+
+%:
+	dh $@ 
+
+
+override_dh_install:
+	dh_install
+
+	#needed to run welcome app from a non-writable location:
+	$(foreach dir,$(DIRS),mkdir -p $(PREFIX)/applications/welcome/$(dir))
+	rm -f $(PREFIX)/applications/welcome/models/db.py
+
+	#admin app must be upgraded only via a Debian package:
+	rm -f $(PREFIX)/applications/admin/view/default/upgrade_web2py.html
+
+	# no additional licensing files wanted 
+	find debian/ -name LICENSE -delete
+	find debian/ -name LICENSE.txt -delete	
+
+	#created with web2py first run:
+	touch $(PREFIX)/welcome.w2p	
+	
+	#icon for desktop file:
+	mv debian/python-web2py/usr/share/pixmaps/favicon.png debian/python-web2py/usr/share/pixmaps/web2py.png
+
+	# Remove embedded Javascript libraries
+	find $(PREFIX)/applications -name jquery.js -exec \
+		ln -sf /usr/share/javascript/jquery/jquery.js {} \;
+
+	# Removed embedded Feedparser module
+	# For a Lenny backport, pyshared must be replaced with python-support/python-feedparser
+	ln -sf /usr/share/pyshared/feedparser.py  debian/python-gluon/usr/share/python-support/python-gluon/gluon/contrib/feedparser.py
+
+override_dh_installman:
+	dh_installman debian/web2py.1 -ppython-web2py
+
+
+


Property changes on: packages/web2py/trunk/debian/rules
___________________________________________________________________
Added: svn:executable
   + *

Added: packages/web2py/trunk/debian/web2py.1
===================================================================
--- packages/web2py/trunk/debian/web2py.1	                        (rev 0)
+++ packages/web2py/trunk/debian/web2py.1	2011-02-21 09:18:52 UTC (rev 15822)
@@ -0,0 +1,59 @@
+.\" Hey, EMACS: -*- nroff -*-
+.\" First parameter, NAME, should be all caps
+.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
+.\" other parameters are allowed: see man(7), man(1)
+.\" Please adjust this date whenever revising the manpage.
+.\" 
+.\" Some roff macros, for reference:
+.\" .nh        disable hyphenation
+.\" .hy        enable hyphenation
+.\" .ad l      left justify
+.\" .ad b      justify to both left and right margins
+.\" .nf        disable filling
+.\" .fi        enable filling
+.\" .br        insert line break
+.\" .sp <n>    insert n+1 empty lines
+.\" for manpage-specific macros, see man(7)
+.TH "WEB2PY" "SECTION" "January 30, 2011" "" ""
+.SH "NAME"
+web2py \- web2py framework server launcher
+.SH "SYNOPSIS"
+.B web2py
+.RI [ options ] " files" ...
+.br 
+.B bar
+.RI [ options ] " files" ...
+.SH "DESCRIPTION"
+This manual page documents briefly the
+.B web2py
+and
+.B bar
+commands.
+.PP 
+.\" TeX users may be more comfortable with the \fB<whatever>\fP and
+.\" \fI<whatever>\fP escape sequences to invode bold face and italics,
+.\" respectively.
+\fBweb2py\fP is a program that...
+.SH "OPTIONS"
+These programs follow the usual GNU command line syntax, with long
+options starting with two dashes (`\-').
+A summary of options is included below.
+For a complete description, see the Info files.
+.TP 
+.B \-h, \-\-help
+Show summary of options.
+.TP 
+.B \-v, \-\-version
+Show version of program.
+.SH "SEE ALSO"
+.BR bar (1),
+.BR baz (1).
+.br 
+The programs are documented fully by
+.I R "The Rise and Fall of a Fooish Bar" ,
+available via the Info system.
+.SH "AUTHOR"
+web2py was written by <Massimo Di Pierro>.
+.PP 
+This manual page was written by José L. Redrejo Rodríguez <jredrejo at debian.org>,
+for the Debian project (and may be used by others).




More information about the Python-modules-commits mailing list