From 33d022704169a4e5f01cce9fdaa9c8a6048c5e89 Mon Sep 17 00:00:00 2001 From: Raoul Snyman Date: Sun, 14 Feb 2010 23:20:13 +0200 Subject: [PATCH 1/3] Working on a "Source Distribution" - aka source tarball --- MANIFEST.in | 11 +++++++++ setup.py | 69 ++++++++++++++++++++++++++++------------------------- 2 files changed, 47 insertions(+), 33 deletions(-) create mode 100644 MANIFEST.in diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 000000000..0e94db321 --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,11 @@ +recursive-include openlp *.py +recursive-include openlp *.sqlite +recursive-include openlp *.csv +recursive-include documentation * +recursive-include resources/forms * +recursive-include resources/i18n * +recursive-include resources/images * +recursive-include scripts *.py +include copyright.txt +include LICENSE +include version.txt diff --git a/setup.py b/setup.py index 8c34238ff..aa7b27a67 100644 --- a/setup.py +++ b/setup.py @@ -1,38 +1,41 @@ -# -*- coding: utf-8 -*- -# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4 +from setuptools import setup, find_packages +import sys, os -############################################################################### -# OpenLP - Open Source Lyrics Projection # -# --------------------------------------------------------------------------- # -# Copyright (c) 2008-2010 Raoul Snyman # -# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael # -# Gorven, Scott Guerrieri, Maikel Stuivenberg, Martin Thompson, Jon Tibble, # -# Carsten Tinggaard # -# --------------------------------------------------------------------------- # -# 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; version 2 of the License. # -# # -# 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, write to the Free Software Foundation, Inc., 59 # -# Temple Place, Suite 330, Boston, MA 02111-1307 USA # -############################################################################### +VERSION_FILE = 'openlp/.version' -from setuptools import setup +try: + from bzrlib.branch import Branch + b = Branch.open_containing('.')[0] + b.lock_read() + try: + revno = b.revno() + # Add the latest tag in here too + finally: + b.unlock() +except: + revno = 0 -APP = ['openlp.pyw'] -OPTIONS = {'argv_emulation': True, 'includes': ['sip', 'PyQt4']} +version = '1.9.1-bzr%s' % revno setup( - name='openlp.org', - version='1.9.0', - url='http://www.openlp.org/', - app=APP, - options={'py2app': OPTIONS}, - setup_requires=['py2app'], -) \ No newline at end of file + name='OpenLP', + version=version, + description="Open source Church presentation and lyrics projection application.", + long_description="""\ +OpenLP (previously openlp.org) is free church presentation software, or lyrics projection software, used to display slides of songs, Bible verses, videos, images, and even presentations (if PowerPoint is installed) for church worship using a computer and a data projector.""", + classifiers=[], # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers + keywords='open source church presentation lyrics projection song bible display project', + author='Raoul Snyman', + author_email='raoulsnyman@openlp.org', + url='http://openlp.org/', + license='GNU General Public License', + packages=find_packages(exclude=['ez_setup', 'examples', 'tests']), + include_package_data=True, + zip_safe=False, + install_requires=[ + # -*- Extra requirements: -*- + ], + entry_points=""" + # -*- Entry points: -*- + """ +) From 77e55da0d33677f5ad0e2dbac733185df39a19a5 Mon Sep 17 00:00:00 2001 From: Raoul Snyman Date: Fri, 19 Feb 2010 21:14:39 +0200 Subject: [PATCH 2/3] Pulling in the tags and the revision number from bzr. --- setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.py b/setup.py index aa7b27a67..457e8a556 100644 --- a/setup.py +++ b/setup.py @@ -10,6 +10,7 @@ try: try: revno = b.revno() # Add the latest tag in here too + verno = b.tags.get_tag_dict().keys()[0] finally: b.unlock() except: From 7efd037024290641e3ca344bf5e0bad68fc0ddd1 Mon Sep 17 00:00:00 2001 From: Raoul Snyman Date: Fri, 19 Feb 2010 21:17:32 +0200 Subject: [PATCH 3/3] Pull the version number from the tag. --- setup.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index 457e8a556..d891b7bbf 100644 --- a/setup.py +++ b/setup.py @@ -8,15 +8,15 @@ try: b = Branch.open_containing('.')[0] b.lock_read() try: - revno = b.revno() - # Add the latest tag in here too verno = b.tags.get_tag_dict().keys()[0] + revno = b.revno() finally: b.unlock() except: + verno = '1.9.0' revno = 0 -version = '1.9.1-bzr%s' % revno +version = '%s-bzr%s' % (verno, revno) setup( name='OpenLP',