Notes on how to build a new release

master
baztian 2011-01-25 16:47:08 +01:00
parent f7189ee906
commit ea30deb1f5
5 changed files with 532 additions and 164 deletions

View File

@ -1,3 +1,4 @@
./README*.html
./*.class ./*.class
./build ./build
./dist ./dist

View File

@ -1,3 +1,3 @@
recursive-include src/test *.py *.sql recursive-include src/test *.py *.sql
include README* COPYING* ez_setup.py
prune *~ prune *~
include README*.rst COPYING* ez_setup.py

View File

@ -0,0 +1,366 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" />
<title>JayDeBeApi - Development notes</title>
<style type="text/css">
/*
:Author: David Goodger (goodger@python.org)
:Id: $Id: html4css1.css 6253 2010-03-02 00:24:53Z milde $
:Copyright: This stylesheet has been placed in the public domain.
Default cascading style sheet for the HTML output of Docutils.
See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
customize this style sheet.
*/
/* used to remove borders from tables and images */
.borderless, table.borderless td, table.borderless th {
border: 0 }
table.borderless td, table.borderless th {
/* Override padding for "table.docutils td" with "! important".
The right padding separates the table cells. */
padding: 0 0.5em 0 0 ! important }
.first {
/* Override more specific margin styles with "! important". */
margin-top: 0 ! important }
.last, .with-subtitle {
margin-bottom: 0 ! important }
.hidden {
display: none }
a.toc-backref {
text-decoration: none ;
color: black }
blockquote.epigraph {
margin: 2em 5em ; }
dl.docutils dd {
margin-bottom: 0.5em }
/* Uncomment (and remove this text!) to get bold-faced definition list terms
dl.docutils dt {
font-weight: bold }
*/
div.abstract {
margin: 2em 5em }
div.abstract p.topic-title {
font-weight: bold ;
text-align: center }
div.admonition, div.attention, div.caution, div.danger, div.error,
div.hint, div.important, div.note, div.tip, div.warning {
margin: 2em ;
border: medium outset ;
padding: 1em }
div.admonition p.admonition-title, div.hint p.admonition-title,
div.important p.admonition-title, div.note p.admonition-title,
div.tip p.admonition-title {
font-weight: bold ;
font-family: sans-serif }
div.attention p.admonition-title, div.caution p.admonition-title,
div.danger p.admonition-title, div.error p.admonition-title,
div.warning p.admonition-title {
color: red ;
font-weight: bold ;
font-family: sans-serif }
/* Uncomment (and remove this text!) to get reduced vertical space in
compound paragraphs.
div.compound .compound-first, div.compound .compound-middle {
margin-bottom: 0.5em }
div.compound .compound-last, div.compound .compound-middle {
margin-top: 0.5em }
*/
div.dedication {
margin: 2em 5em ;
text-align: center ;
font-style: italic }
div.dedication p.topic-title {
font-weight: bold ;
font-style: normal }
div.figure {
margin-left: 2em ;
margin-right: 2em }
div.footer, div.header {
clear: both;
font-size: smaller }
div.line-block {
display: block ;
margin-top: 1em ;
margin-bottom: 1em }
div.line-block div.line-block {
margin-top: 0 ;
margin-bottom: 0 ;
margin-left: 1.5em }
div.sidebar {
margin: 0 0 0.5em 1em ;
border: medium outset ;
padding: 1em ;
background-color: #ffffee ;
width: 40% ;
float: right ;
clear: right }
div.sidebar p.rubric {
font-family: sans-serif ;
font-size: medium }
div.system-messages {
margin: 5em }
div.system-messages h1 {
color: red }
div.system-message {
border: medium outset ;
padding: 1em }
div.system-message p.system-message-title {
color: red ;
font-weight: bold }
div.topic {
margin: 2em }
h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
margin-top: 0.4em }
h1.title {
text-align: center }
h2.subtitle {
text-align: center }
hr.docutils {
width: 75% }
img.align-left, .figure.align-left, object.align-left {
clear: left ;
float: left ;
margin-right: 1em }
img.align-right, .figure.align-right, object.align-right {
clear: right ;
float: right ;
margin-left: 1em }
img.align-center, .figure.align-center, object.align-center {
display: block;
margin-left: auto;
margin-right: auto;
}
.align-left {
text-align: left }
.align-center {
clear: both ;
text-align: center }
.align-right {
text-align: right }
/* reset inner alignment in figures */
div.align-right {
text-align: left }
/* div.align-center * { */
/* text-align: left } */
ol.simple, ul.simple {
margin-bottom: 1em }
ol.arabic {
list-style: decimal }
ol.loweralpha {
list-style: lower-alpha }
ol.upperalpha {
list-style: upper-alpha }
ol.lowerroman {
list-style: lower-roman }
ol.upperroman {
list-style: upper-roman }
p.attribution {
text-align: right ;
margin-left: 50% }
p.caption {
font-style: italic }
p.credits {
font-style: italic ;
font-size: smaller }
p.label {
white-space: nowrap }
p.rubric {
font-weight: bold ;
font-size: larger ;
color: maroon ;
text-align: center }
p.sidebar-title {
font-family: sans-serif ;
font-weight: bold ;
font-size: larger }
p.sidebar-subtitle {
font-family: sans-serif ;
font-weight: bold }
p.topic-title {
font-weight: bold }
pre.address {
margin-bottom: 0 ;
margin-top: 0 ;
font: inherit }
pre.literal-block, pre.doctest-block {
margin-left: 2em ;
margin-right: 2em }
span.classifier {
font-family: sans-serif ;
font-style: oblique }
span.classifier-delimiter {
font-family: sans-serif ;
font-weight: bold }
span.interpreted {
font-family: sans-serif }
span.option {
white-space: nowrap }
span.pre {
white-space: pre }
span.problematic {
color: red }
span.section-subtitle {
/* font-size relative to parent (h1..h6 element) */
font-size: 80% }
table.citation {
border-left: solid 1px gray;
margin-left: 1px }
table.docinfo {
margin: 2em 4em }
table.docutils {
margin-top: 0.5em ;
margin-bottom: 0.5em }
table.footnote {
border-left: solid 1px black;
margin-left: 1px }
table.docutils td, table.docutils th,
table.docinfo td, table.docinfo th {
padding-left: 0.5em ;
padding-right: 0.5em ;
vertical-align: top }
table.docutils th.field-name, table.docinfo th.docinfo-name {
font-weight: bold ;
text-align: left ;
white-space: nowrap ;
padding-left: 0 }
h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
font-size: 100% }
ul.auto-toc {
list-style-type: none }
</style>
</head>
<body>
<div class="document" id="jaydebeapi-development-notes">
<h1 class="title">JayDeBeApi - Development notes</h1>
<p>Some notes for development.</p>
<div class="contents topic" id="contents">
<p class="topic-title first">Contents</p>
<ul class="simple">
<li><a class="reference internal" href="#build-a-new-release" id="id1">Build a new release</a></li>
</ul>
</div>
<div class="section" id="build-a-new-release">
<h1><a class="toc-backref" href="#id1">Build a new release</a></h1>
<ol class="arabic">
<li><p class="first">Sync the branch.</p>
<pre class="literal-block">
$ bzr pull
</pre>
</li>
<li><p class="first">Do your changes.</p>
</li>
<li><p class="first">Add a changelog entry to <tt class="docutils literal">README.rst</tt>.</p>
</li>
<li><p class="first">Increase version in <tt class="docutils literal">setup.py</tt>.</p>
</li>
<li><p class="first">Run setuptools to ensure everything is working as expected.</p>
<pre class="literal-block">
$ python setup.py sdist
</pre>
</li>
<li><p class="first">Commit your changes.</p>
<pre class="literal-block">
$ bzr ci -m &quot;my comment&quot;
</pre>
</li>
<li><p class="first">Tag for the new version.</p>
<pre class="literal-block">
$ bzr tag jaydebeapi-0.1.2
</pre>
</li>
<li><p class="first">Send changes to launchpad.</p>
<pre class="literal-block">
$ bzr push
</pre>
</li>
<li><p class="first">Publish new release on PyPi.</p>
<pre class="literal-block">
$ python setup.py sdist --formats=gztar upload
</pre>
</li>
</ol>
</div>
</div>
</body>
</html>

View File

@ -1,163 +1,163 @@
Metadata-Version: 1.0 Metadata-Version: 1.0
Name: JayDeBeApi Name: JayDeBeApi
Version: 0.1.2 Version: 0.1.2
Summary: A bridge from JDBC database drivers to Python DB-API. Summary: A bridge from JDBC database drivers to Python DB-API.
Home-page: https://launchpad.net/jaydebeapi Home-page: https://launchpad.net/jaydebeapi
Author: Bastian Bowe Author: Bastian Bowe
Author-email: bastian.bowe@gmail.com Author-email: bastian.bowe@gmail.com
License: GNU LGPL License: GNU LGPL
Description: ===================================================================== Description: =====================================================================
JayDeBeApi - bridge from JDBC database drivers to Python DB-API JayDeBeApi - bridge from JDBC database drivers to Python DB-API
===================================================================== =====================================================================
The JayDeBeApi module allows you to connect from Python code to The JayDeBeApi module allows you to connect from Python code to
databases using Java `JDBC databases using Java `JDBC
<http://java.sun.com/products/jdbc/overview.html>`_. It provides a <http://java.sun.com/products/jdbc/overview.html>`_. It provides a
Python DB-API_ v2.0 to that database. Python DB-API_ v2.0 to that database.
It works on ordinary Python (cPython) using the JPype_ Java It works on ordinary Python (cPython) using the JPype_ Java
integration or on `Jython <http://www.jython.org/>`_ to make use of integration or on `Jython <http://www.jython.org/>`_ to make use of
the Java JDBC driver. the Java JDBC driver.
It has been tested with `Hypersonic SQL (HSQLDB) It has been tested with `Hypersonic SQL (HSQLDB)
<http://hsqldb.org/>`_ and `IBM DB2 <http://hsqldb.org/>`_ and `IBM DB2
<http://www.ibm.com/software/data/db2/>`_ for z/OS. <http://www.ibm.com/software/data/db2/>`_ for z/OS.
In contrast to zxJDBC from the Jython project JayDeBeApi let's you In contrast to zxJDBC from the Jython project JayDeBeApi let's you
access a database with Jython AND Python with only minor code access a database with Jython AND Python with only minor code
modifications. JayDeBeApi's future goal is to provide a unique and modifications. JayDeBeApi's future goal is to provide a unique and
fast interface to different types of JDBC-Drivers through a flexible fast interface to different types of JDBC-Drivers through a flexible
plug-in mechanism. plug-in mechanism.
.. contents:: .. contents::
Install Install
======= =======
You can get and install JayDeBeApi with `easy_install You can get and install JayDeBeApi with `easy_install
<http://peak.telecommunity.com/DevCenter/EasyInstall>`_ :: <http://peak.telecommunity.com/DevCenter/EasyInstall>`_ ::
$ easy_install JayDeBeApi $ easy_install JayDeBeApi
If you want to install JayDeBeApi in Jython make sure to have If you want to install JayDeBeApi in Jython make sure to have
EasyInstall available for it. EasyInstall available for it.
Or you can get a copy of the source branch using `bzr Or you can get a copy of the source branch using `bzr
<http://bazaar.canonical.com/>`_ by running :: <http://bazaar.canonical.com/>`_ by running ::
$ bzr branch lp:jaydebeapi $ bzr branch lp:jaydebeapi
and install it with :: and install it with ::
$ python setup.py install $ python setup.py install
or if you are using Jython use :: or if you are using Jython use ::
$ jython setup.py install $ jython setup.py install
It has been tested with Jython 2.5.2. It has been tested with Jython 2.5.2.
If you are using cPython ensure that you have installed JPype_ If you are using cPython ensure that you have installed JPype_
properly. It has been tested with JPype 0.5.4. properly. It has been tested with JPype 0.5.4.
Usage Usage
===== =====
Basically you just import the ``jaydebeapi`` Python module and execute Basically you just import the ``jaydebeapi`` Python module and execute
the ``connect`` method. This gives you a DB-API_ conform connection to the ``connect`` method. This gives you a DB-API_ conform connection to
the database. the database.
The first argument to ``connect`` is the name of the Java driver The first argument to ``connect`` is the name of the Java driver
class. The rest of the arguments are internally passed to the Java class. The rest of the arguments are internally passed to the Java
``DriverManager.getConnection`` method. See the Javadoc of ``DriverManager.getConnection`` method. See the Javadoc of
``DriverManager`` class for details. ``DriverManager`` class for details.
Here is an example: Here is an example:
>>> import jaydebeapi >>> import jaydebeapi
>>> conn = jaydebeapi.connect('org.hsqldb.jdbcDriver', >>> conn = jaydebeapi.connect('org.hsqldb.jdbcDriver',
... 'jdbc:hsqldb:mem', 'SA', '') ... 'jdbc:hsqldb:mem', 'SA', '')
>>> curs = conn.cursor() >>> curs = conn.cursor()
>>> curs.execute('create table CUSTOMER' >>> curs.execute('create table CUSTOMER'
... '("CUST_ID" INTEGER not null,' ... '("CUST_ID" INTEGER not null,'
... ' "NAME" VARCHAR not null,' ... ' "NAME" VARCHAR not null,'
... ' primary key ("CUST_ID"))' ... ' primary key ("CUST_ID"))'
... ) ... )
>>> curs.execute("insert into CUSTOMER values (1, 'John')") >>> curs.execute("insert into CUSTOMER values (1, 'John')")
>>> curs.execute("select * from CUSTOMER") >>> curs.execute("select * from CUSTOMER")
>>> curs.fetchall() >>> curs.fetchall()
[(1, u'John')] [(1, u'John')]
You probably have to configure Jython or JPype to actually be able to You probably have to configure Jython or JPype to actually be able to
access the database driver's jar files. If I want to connect to a HSQL access the database driver's jar files. If I want to connect to a HSQL
in memory database on my Ubuntu machine I'm starting Python by running :: in memory database on my Ubuntu machine I'm starting Python by running ::
$ JAVA_HOME=/usr/lib/jvm/java-6-openjdk python $ JAVA_HOME=/usr/lib/jvm/java-6-openjdk python
Now I have to configure JPype Now I have to configure JPype
>>> jar = '/path/to/my/driver/hsqldb.jar' >>> jar = '/path/to/my/driver/hsqldb.jar'
>>> args='-Djava.class.path=%s' % jar >>> args='-Djava.class.path=%s' % jar
>>> jpype.startJVM(jvm_path, args) >>> jpype.startJVM(jvm_path, args)
or in Jython I have to or in Jython I have to
>>> jar = '/path/to/my/driver/hsqldb.jar' >>> jar = '/path/to/my/driver/hsqldb.jar'
>>> import sys >>> import sys
>>> sys.path.append(jar) >>> sys.path.append(jar)
Contributing Contributing
============ ============
Please submit `bugs and patches Please submit `bugs and patches
<https://bugs.launchpad.net/jaydebeapi>`_. All contributors will be <https://bugs.launchpad.net/jaydebeapi>`_. All contributors will be
acknowledged. Thanks! acknowledged. Thanks!
License License
======= =======
JayDeBeApi is released under the GNU Lesser General Public license JayDeBeApi is released under the GNU Lesser General Public license
(LGPL). See the file ``COPYING`` and ``COPYING.LESSER`` in the (LGPL). See the file ``COPYING`` and ``COPYING.LESSER`` in the
distribution for details. distribution for details.
Changelog Changelog
========= =========
- 0.1.2 - 0.1.2
- ``easy_install JayDeBeApi`` should really work - ``easy_install JayDeBeApi`` should really work
- 0.1.1 - 0.1.1
- Fixed bug #688290 "NULL values with converters error on fetch." - Fixed bug #688290 "NULL values with converters error on fetch."
- Fixed bug #684909 "Selecting ROWIDs errors out on fetch." - Fixed bug #684909 "Selecting ROWIDs errors out on fetch."
- 0.1 - 0.1
- Initial release - Initial release
To do To do
===== =====
- Extract Java calls to seperate Java methods to increase performance. - Extract Java calls to seperate Java methods to increase performance.
- Check if https://code.launchpad.net/dbapi-compliance can help making - Check if https://code.launchpad.net/dbapi-compliance can help making
JayDeBeApi more DB-API complient. JayDeBeApi more DB-API complient.
- Test it on different databases and provide a flexible db specific - Test it on different databases and provide a flexible db specific
pluign mechanism. pluign mechanism.
- SQLAlchemy modules (seperate project) - SQLAlchemy modules (seperate project)
.. _DB-API: http://www.python.org/dev/peps/pep-0249/ .. _DB-API: http://www.python.org/dev/peps/pep-0249/
.. _JPype: http://jpype.sourceforge.net/ .. _JPype: http://jpype.sourceforge.net/
Keywords: db api java jdbc bridge connect sql jpype jython Keywords: db api java jdbc bridge connect sql jpype jython
Platform: UNKNOWN Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL) Classifier: License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)
Classifier: Programming Language :: Java Classifier: Programming Language :: Java
Classifier: Programming Language :: Python Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2 Classifier: Programming Language :: Python :: 2
Classifier: Topic :: Database Classifier: Topic :: Database
Classifier: Topic :: Software Development :: Libraries :: Java Libraries Classifier: Topic :: Software Development :: Libraries :: Java Libraries
Classifier: Topic :: Software Development :: Libraries :: Python Modules Classifier: Topic :: Software Development :: Libraries :: Python Modules

View File

@ -2,6 +2,7 @@ COPYING
COPYING.LESSER COPYING.LESSER
MANIFEST.in MANIFEST.in
README.rst README.rst
README_development.rst
ez_setup.py ez_setup.py
setup.py setup.py
src/JayDeBeApi.egg-info/PKG-INFO src/JayDeBeApi.egg-info/PKG-INFO