Difference between revisions of "CcPublisher Release Procedure"

From Creative Commons
Jump to: navigation, search
Line 3: Line 3:
 
== Increment Version Number ==
 
== Increment Version Number ==
  
The version number currently needs to be updated in two places.  This will be corrected in the future (see [http://roundup.creativecommons.org/ccpublisher/issue102 Issue 102]).
+
The version number currently needs to be updated in three places.  This will be corrected in the future (see [http://roundup.creativecommons.org/ccpublisher/issue102 Issue 102]).
  
 
=== pyarchive ===
 
=== pyarchive ===
Line 19: Line 19:
  
 
The <code>version.txt</code> contains the current version number and is used for the about box and other user-visible locations.  This file is located in the resources directory of a ccPublisher checkout.
 
The <code>version.txt</code> contains the current version number and is used for the about box and other user-visible locations.  This file is located in the resources directory of a ccPublisher checkout.
 +
 +
=== setup.nsi ===
 +
 +
<code>setup.nsi</code>, located in the deploy/win32 directory of a Subversion checkout, contains instructions for building the installer for Windows.  The version number appears near the top of the file.  The line similar to
 +
 +
  !define VERSION 1.9.2
 +
 +
needs to be updated before the installer is generated.
 +
 +
== Branch or Tag Subversion ==
 +
  
 
== Create Packages ==
 
== Create Packages ==
Line 37: Line 48:
 
|}
 
|}
  
=== Building ===
+
=== Linux ===
 
 
When issuing
 
==== Linux ====
 
  
 
We currently distribute tarballs of ccPublisher for Linux.  There is some support for building RPMs in Subversion, but it is far more fragile than the simple tarball support.  To build a tarball from your checkout:
 
We currently distribute tarballs of ccPublisher for Linux.  There is some support for building RPMs in Subversion, but it is far more fragile than the simple tarball support.  To build a tarball from your checkout:
Line 46: Line 54:
 
   $ python setup.py sdist
 
   $ python setup.py sdist
  
==== Windows ====
+
Distutils will create a tarball containing all the code necessary for ccPublisher in the <code>dist</code> directory with the filename <code>ccPublisher-X.Y.Z.tar.gz</code>, where X.Y.Z is the version number.
 +
 
 +
=== Windows ===
  
 
The [http://www.py2exe.org py2exe] [http://docs.python.org/dist/dist.html distutils] extension takes a Python script, assembles the dependencies, and creates an executable stub along with the dependencies.  To build the application byte code and loader, run the following command:
 
The [http://www.py2exe.org py2exe] [http://docs.python.org/dist/dist.html distutils] extension takes a Python script, assembles the dependencies, and creates an executable stub along with the dependencies.  To build the application byte code and loader, run the following command:
Line 52: Line 62:
 
   C:\publisher> c:\python24\python.exe setup.py py2exe
 
   C:\publisher> c:\python24\python.exe setup.py py2exe
  
This will assemble the necessary files in the <code>dist</code> subdirectory.  When building ccPublisher, you will see <code>ccpublisher.exe</code> which is the main application.
+
This will assemble the necessary files in the <code>dist</code> subdirectory.  When building ccPublisher, you will see <code>ccpublisher.exe</code>; this is the main application.
  
==== Mac OS X ====
+
Once the application is built, an installer must be created. 
  
 +
=== Mac OS X ===
  
=== Packaging ===
 
  
 
== Distribute Packages ==
 
== Distribute Packages ==

Revision as of 13:00, 10 May 2006

This page documents the procedure used when creating a new release of ccPublisher.

Increment Version Number

The version number currently needs to be updated in three places. This will be corrected in the future (see Issue 102).

pyarchive

The pyarchive package is responsible for assembling metadata and uploading files to the Internet Archive. The file submission.py contains the version number as part of the uploading application identification. For example, the current release contains the following code that would need updated for a new release:

       result.write(u"""
       <title>%s</title>
       <collection>%s</collection>
       <mediatype>%s</mediatype>
       <upload_application appid="ccpublisher" version="1.9.3" />
       """ % (self.title, self.collection, self.mediatype) )

version.txt

The version.txt contains the current version number and is used for the about box and other user-visible locations. This file is located in the resources directory of a ccPublisher checkout.

setup.nsi

setup.nsi, located in the deploy/win32 directory of a Subversion checkout, contains instructions for building the installer for Windows. The version number appears near the top of the file. The line similar to

  !define VERSION 1.9.2

needs to be updated before the installer is generated.

Branch or Tag Subversion

Create Packages

The package creation process varies slightly for different platforms. We will have scripts for this, we just haven't found the right tool. Ideally something like Ant, but without the Java overhead. Suggestions welcome.

Prerequisites

Windows Mac OS X Linux
  • py2app

Linux

We currently distribute tarballs of ccPublisher for Linux. There is some support for building RPMs in Subversion, but it is far more fragile than the simple tarball support. To build a tarball from your checkout:

 $ python setup.py sdist

Distutils will create a tarball containing all the code necessary for ccPublisher in the dist directory with the filename ccPublisher-X.Y.Z.tar.gz, where X.Y.Z is the version number.

Windows

The py2exe distutils extension takes a Python script, assembles the dependencies, and creates an executable stub along with the dependencies. To build the application byte code and loader, run the following command:

 C:\publisher> c:\python24\python.exe setup.py py2exe

This will assemble the necessary files in the dist subdirectory. When building ccPublisher, you will see ccpublisher.exe; this is the main application.

Once the application is built, an installer must be created.

Mac OS X

Distribute Packages