Skip to content

Commit ad1f8db

Browse files
committed
Improved the build process and added instructions for building jars
1 parent a7de0b7 commit ad1f8db

File tree

5 files changed

+56
-14
lines changed

5 files changed

+56
-14
lines changed

CHANGES.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ v2.0.1
33

44
* Use super() to call superclass constructors in combo/list models as
55
originally intended
6+
* Added instructions for building jars
67

78

89
v2.0.0

README.rst

Lines changed: 44 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,53 @@ Included in this package:
1616
* shortcuts for loading resources (images or generic data) via class loaders
1717
* shortcuts for basic dialogs
1818
* enhanced file selection dialogs
19-
* wrappers for loading `JFormDesigner <http://www.jformdesigner.com/>`_ forms
19+
* wrappers for loading `JFormDesigner`_ forms
2020
* decorators and functions for safely accessing the GUI from any thread
2121
* support for running background tasks in separate threads
2222

2323
Requires Jython 2.7 or later.
2424

25-
Documentation can be found at the Jython-Swingutils
26-
`documentation repository <http://packages.python.org/jython-swingutils/>`_
25+
Documentation can be found at the Python Packaging
26+
`documentation repository`_.
2727

28-
The source code and the issue tracker can be found at
29-
`Bitbucket <http://bitbucket.org/agronholm/jython-swingutils/>`_.
28+
The `source code`_ and the `issue tracker`_ can be found at GitHub.
29+
30+
31+
Building jar files
32+
------------------
33+
34+
To build a jar file, you need to tell ant where to find jython.jar, by
35+
defining the ``jythonjarpath`` property, either as a command line option
36+
to ant, or in the ``build.properties`` file.
37+
38+
To build a jar file containing the Python source files::
39+
40+
ant srcjar
41+
42+
To build a jar containing compiled bytecode files::
43+
44+
ant binjar
45+
46+
47+
Building signed jar files
48+
-------------------------
49+
50+
Signing the jar files requires three additional properties to be defined:
51+
``signer``, ``storepass`` and ``keypass``. It also requires that you have a
52+
matching code signing key in your keystore (``~/.keystore``).
53+
54+
55+
To build a signed source jar::
56+
57+
ant signsrcjar
58+
59+
To build a signed, compiled jar (suitable for `Java Web Start`_)::
60+
61+
ant signbinjar
62+
63+
64+
.. _JFormDesigner: http://www.jformdesigner.com/
65+
.. _source code: https://github.com/jython/swingutils
66+
.. _issue tracker: https://github.com/jython/swingutils/issues
67+
.. _documentation repository: http://packages.python.org/jython-swingutils/
68+
.. _Java Web Start: http://docs.oracle.com/javase/tutorial/deployment/webstart/

RELEASE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2.0.1

build.xml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
"version" properties to build this. To sign the (source or binary) jar, you also
66
need to provide the "signer", "storepass", "keypass" properties. -->
77
<property file="build.properties"/>
8-
<property name="srcjarfile" location="dist/jython-swingutils-${version}.jar" />
9-
<property name="binjarfile" location="dist/jython-swingutils-${version}-bin.jar" />
8+
<loadfile property="release" srcfile="RELEASE"/>
9+
<property name="jarfile" location="dist/jython-swingutils-${release}.jar" />
1010

1111
<target name="clean">
1212
<delete dir="build"/>
@@ -25,26 +25,26 @@
2525

2626
<target name="srcjar">
2727
<mkdir dir="dist"/>
28-
<delete file="${srcjarfile}" />
29-
<jar destfile="${srcjarfile}">
28+
<delete file="${jarfile}" />
29+
<jar destfile="${jarfile}">
3030
<fileset dir="." includes="swingutils/**/*.py"/>
3131
</jar>
3232
</target>
3333

3434
<target name="binjar" depends="clean, compile">
3535
<mkdir dir="dist"/>
36-
<delete file="${binjarfile}" />
37-
<jar destfile="${binjarfile}">
36+
<delete file="${jarfile}" />
37+
<jar destfile="${jarfile}">
3838
<fileset dir="build" includes="**/*.class"/>
3939
</jar>
4040
</target>
4141

4242
<target name="signbinjar" depends="binjar">
43-
<signjar jar="${binjarfile}" alias="${signer}" storepass="${storepass}" keypass="${keypass}" />
43+
<signjar jar="${jarfile}" alias="${signer}" storepass="${storepass}" keypass="${keypass}" />
4444
</target>
4545

4646
<target name="signsrcjar" depends="srcjar">
47-
<signjar jar="${srcjarfile}" alias="${signer}" storepass="${storepass}" keypass="${keypass}" />
47+
<signjar jar="${jarfile}" alias="${signer}" storepass="${storepass}" keypass="${keypass}" />
4848
</target>
4949

5050
</project>

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@
66
raise Exception('This package can only be installed on Jython.')
77

88
long_description = open('README.rst').read()
9+
version = open('RELEASE').read()
910

1011
setup(
1112
name='jython-swingutils',
12-
version='2.0.1',
13+
version=version,
1314
description="Makes using Java's Swing UI toolkit easy on Jython",
1415
long_description=long_description,
1516
author='Alex Gronholm',

0 commit comments

Comments
 (0)