Hello community,
here is the log from the commit of package python-py2pack for openSUSE:Factory checked in at 2012-05-03 11:00:02
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-py2pack (Old)
and /work/SRC/openSUSE:Factory/.python-py2pack.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-py2pack", Maintainer is ""
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-py2pack/python-py2pack.changes 2011-09-26 10:17:13.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.python-py2pack.new/python-py2pack.changes 2012-05-03 11:00:05.000000000 +0200
@@ -1,0 +2,6 @@
+Fri Apr 13 12:13:49 UTC 2012 - saschpe@suse.de
+
+- Update to version 0.4.1.1
+ * spec file template conforms to spec-cleaner
+
+-------------------------------------------------------------------
Old:
----
py2pack-0.3.21.tar.gz
New:
----
py2pack-0.4.1.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-py2pack.spec ++++++
--- /var/tmp/diff_new_pack.U576e6/_old 2012-05-03 11:00:06.000000000 +0200
+++ /var/tmp/diff_new_pack.U576e6/_new 2012-05-03 11:00:06.000000000 +0200
@@ -1,7 +1,7 @@
#
# spec file for package python-py2pack
#
-# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -11,12 +11,12 @@
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
-#
+
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: python-py2pack
-Version: 0.3.21
+Version: 0.4.1.1
Release: 0
Url: http://github.com/saschpe/py2pack
Summary: Generate distribution packages from Python packages on PyPI
@@ -29,13 +29,11 @@
BuildRequires: python-Jinja2
Requires: python-argparse
Requires: python-Jinja2
-%if 0%{?suse_version}
-%py_requires
-%if 0%{?suse_version} > 1110
+%if 0%{?suse_version} && 0%{?suse_version} <= 1110
+%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
+%else
BuildArch: noarch
%endif
-%endif
-%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%description
This script allows to generate RPM spec or DEB dsc files from Python modules.
++++++ py2pack-0.3.21.tar.gz -> py2pack-0.4.1.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/py2pack-0.3.21/MANIFEST.in new/py2pack-0.4.1.1/MANIFEST.in
--- old/py2pack-0.3.21/MANIFEST.in 2011-03-09 09:45:40.000000000 +0100
+++ new/py2pack-0.4.1.1/MANIFEST.in 2012-03-29 11:45:09.000000000 +0200
@@ -1,3 +1,3 @@
include AUTHORS LICENSE README.rst
-include doc/*
+include docs/*
include py2pack/templates/*
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/py2pack-0.3.21/PKG-INFO new/py2pack-0.4.1.1/PKG-INFO
--- old/py2pack-0.3.21/PKG-INFO 2011-09-22 12:48:42.000000000 +0200
+++ new/py2pack-0.4.1.1/PKG-INFO 2012-04-13 09:28:43.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: py2pack
-Version: 0.3.21
+Version: 0.4.1.1
Summary: Generate distribution packages from Python packages on PyPI
Home-page: http://github.com/saschpe/py2pack
Author: Sascha Peilicke
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/py2pack-0.3.21/doc/py2pack.1 new/py2pack-0.4.1.1/doc/py2pack.1
--- old/py2pack-0.3.21/doc/py2pack.1 2011-08-25 13:43:43.000000000 +0200
+++ new/py2pack-0.4.1.1/doc/py2pack.1 1970-01-01 01:00:00.000000000 +0100
@@ -1,168 +0,0 @@
-'\" t
-.\" Title: py2pack
-.\" Author: Sascha Peilicke
-.\" Generator: DocBook XSL Stylesheets v1.76.1 http://docbook.sf.net/
-.\" Date: 07/19/2011
-.\" Manual: @VERSION@
-.\" Source: http://github.com/saschpe/py2pack @VERSION@
-.\" Language: English
-.\"
-.TH "PY2PACK" "1" "07/19/2011" "http://github\&.com/saschpe/py" "@VERSION@"
-.\" -----------------------------------------------------------------
-.\" * Define some portability stuff
-.\" -----------------------------------------------------------------
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.\" http://bugs.debian.org/507673
-.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
-.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-.ie \n(.g .ds Aq \(aq
-.el .ds Aq '
-.\" -----------------------------------------------------------------
-.\" * set default formatting
-.\" -----------------------------------------------------------------
-.\" disable hyphenation
-.nh
-.\" disable justification (adjust text to left margin only)
-.ad l
-.\" -----------------------------------------------------------------
-.\" * MAIN CONTENT STARTS HERE *
-.\" -----------------------------------------------------------------
-.SH "NAME"
-py2pack \- Generate Distribution Packages from Python Packages on PyPI
-.SH "SYNOPSIS"
-.HP \w'\fBpy2pack\fR\ 'u
-\fBpy2pack\fR [\-h] [\-\-version] {search | help | show | list | fetch | generate} ...
-.SH "COMMANDS"
-.PP
-The following commands are available:
-.SS "The fetch Command"
-.HP \w'\fBpy2pack\fR\ 'u
-\fBpy2pack\fR fetch name [version]
-.PP
-Downloads a package from PyPI and stores it in the current directory\&. Optionally you can specify a version number\&.
-.SS "The generate Command"
-.HP \w'\fBpy2pack\fR\fB\ generate\fR\ 'u
-\fBpy2pack\fR\fB generate\fR [\-h] [\-t\ {fedora\&.spec\ |\ opensuse\&.dsc\ |\ opensuse\&.spec}] [\-f\ \fIFILENAME\fR] name [version]
-.PP
-Creates a SPEC or DSC file for a specific distribution\&.
-.SS "The list Command"
-.HP \w'\fBpy2pack\fR\fB\ list\fR\ 'u
-\fBpy2pack\fR\fB list\fR [\-h]
-.PP
-Gives a list of all Python modules available on PyPI\&.
-.SS "The search Command"
-.HP \w'\fBpy2pack\fR\fB\ search\fR\ 'u
-\fBpy2pack\fR\fB search\fR [\-h] {name}
-.PP
-Gives a list of all Python modules found in
-\fIname\fR\&.
-.SS "The show Command"
-.HP \w'\fBpy2pack\fR\fB\ show\fR\ 'u
-\fBpy2pack\fR\fB show\fR [\-h] {name} [version]
-.PP
-Shows the
-\m[blue]\fBDOAP\fR\m[]\&\s-2\u[1]\d\s+2
-record for the given name and version (optionally)\&. The output is a Python dictionary\&.
-.SH "EXAMPLES"
-.PP
-Creating a package from a Python module involves the following steps:
-.sp
-.RS 4
-.ie n \{\
-\h'-04' 1.\h'+01'\c
-.\}
-.el \{\
-.sp -1
-.IP " 1." 4.2
-.\}
-Search for your favorite Python module, for example,
-:
-.sp
-.if n \{\
-.RS 4
-.\}
-.nf
-$ \fBpy2pack\fR search pylint
-searching for package pylint\&.\&.\&.
-found logilab\&.pylintinstaller\-0\&.15\&.2
-found plpylint\-0\&.1\&.2
-found pylint\-0\&.22\&.0
-.fi
-.if n \{\
-.RE
-.\}
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04' 2.\h'+01'\c
-.\}
-.el \{\
-.sp -1
-.IP " 2." 4.2
-.\}
-Download
-.sp
-.if n \{\
-.RS 4
-.\}
-.nf
-$ \fBpy2pack\fR fetch
-downloading package pylint\-0\&.22\&.0\&.\&.\&.
-from http://pypi\&.python\&.org/packages/source/p/pylint/pylint\-0\&.22\&.0\&.tar\&.gz
-.fi
-.if n \{\
-.RE
-.\}
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04' 3.\h'+01'\c
-.\}
-.el \{\
-.sp -1
-.IP " 3." 4.2
-.\}
-Create a SPEC file, for example, for openSUSE:
-.sp
-.if n \{\
-.RS 4
-.\}
-.nf
-$ \fBpy2pack\fR generate \-t opensuse\&.spec \-f python\-pylint\&.spec pylint
-.fi
-.if n \{\
-.RE
-.\}
-.RE
-.sp
-.RS 4
-.ie n \{\
-\h'-04' 4.\h'+01'\c
-.\}
-.el \{\
-.sp -1
-.IP " 4." 4.2
-.\}
-Check the SPEC file
-python\-pylint\&.spec
-and adapt it to your needs\&.
-.RE
-.SH "AUTHORS"
-.PP
-\fBSascha Peilicke\fR <\&saschpe@gmx\&.de\&>
-.RS 4
-Developer
-.RE
-.PP
-\fBThomas Schraitle\fR
-.RS 4
-Manpage author
-.RE
-.SH "NOTES"
-.IP " 1." 4
-DOAP
-.RS 4
-\%http://usefulinc.com/doap
-.RE
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/py2pack-0.3.21/doc/py2pack.html new/py2pack-0.4.1.1/doc/py2pack.html
--- old/py2pack-0.3.21/doc/py2pack.html 2011-08-25 13:43:43.000000000 +0200
+++ new/py2pack-0.4.1.1/doc/py2pack.html 1970-01-01 01:00:00.000000000 +0100
@@ -1,20 +0,0 @@
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>py2pack</title><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><meta name="description" content=""></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div lang="en" class="refentry" title="py2pack"><a name="py2pack"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>py2pack —
- Generate Distribution Packages from Python Packages on PyPI
- </p></div><div class="refsynopsisdiv" title="Synopsis"><a name="py2pack.synopsis"></a><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">py2pack</code> [-h] [--version] { search | help | show | list | fetch | generate } ... </p></div></div><div class="refsect1" title="Commands"><a name="py2pack.options"></a><h2>Commands</h2><p>The following commands are available:</p><div class="refsect2" title="The fetch Command"><a name="py2pack.cmd.fetch"></a><h3>The fetch Command</h3><div class="cmdsynopsis"><p><code class="command">py2pack</code> fetch name [version]</p></div><p>Downloads a package from PyPI and stores it in the current directory. Optionally you
- can specify a version number.</p></div><div class="refsect2" title="The generate Command"><a name="py2pack.cmd.generate"></a><h3>The generate Command</h3><div class="cmdsynopsis"><p><code class="command">py2pack</code> <br><code class="command"> generate</code> [-h] [
- -t
- { fedora.spec | opensuse.dsc | opensuse.spec }
- ] [-f <em class="replaceable"><code>FILENAME</code></em>] name [version]</p></div><p>Creates a SPEC or DSC file for a specific distribution.</p></div><div class="refsect2" title="The list Command"><a name="py2pack.cmd.list"></a><h3>The list Command</h3><div class="cmdsynopsis"><p><code class="command">py2pack</code> <br><code class="command"> list</code> [-h]</p></div><p>Gives a list of all Python modules available on PyPI.</p></div><div class="refsect2" title="The search Command"><a name="py2pack.cmd.search"></a><h3>The search Command</h3><div class="cmdsynopsis"><p><code class="command">py2pack</code> <br><code class="command"> search</code> [-h] {name}</p></div><p>Gives a list of all Python modules found in
- <em class="replaceable"><code>name</code></em>.</p></div><div class="refsect2" title="The show Command"><a name="py2pack.cmd.show"></a><h3>The show Command</h3><div class="cmdsynopsis"><p><code class="command">py2pack</code> <br><code class="command"> show</code> [-h] {name} [version]</p></div><p>Shows the <a class="ulink" href="http://usefulinc.com/doap" target="_top">DOAP</a> record for the
- given name and version (optionally). The output is a Python
- dictionary.</p></div></div><div class="refsect1" title="Examples"><a name="py2pack.examples"></a><h2>Examples</h2><p>Creating a package from a Python module involves the following
- steps:</p><div class="procedure"><ol class="procedure" type="1"><li class="step" title="Step 1"><p>Search for your favorite Python module, for example,
- <span class="package"></span>:</p><pre class="screen"><code class="prompt">$ </code><span class="command"><strong>py2pack</strong></span> search pylint
-searching for package pylint...
-found logilab.pylintinstaller-0.15.2
-found plpylint-0.1.2
-found pylint-0.22.0</pre></li><li class="step" title="Step 2"><p>Download</p><pre class="screen"><code class="prompt">$ </code><span class="command"><strong>py2pack</strong></span> fetch
-downloading package pylint-0.22.0...
-from http://pypi.python.org/packages/source/p/pylint/pylint-0.22.0.tar.gz</pre></li><li class="step" title="Step 3"><p>Create a SPEC file, for example, for openSUSE:</p><pre class="screen"><code class="prompt">$ </code><span class="command"><strong>py2pack</strong></span> generate -t opensuse.spec -f python-pylint.spec pylint</pre></li><li class="step" title="Step 4"><p>Check the SPEC file
- <code class="filename">python-pylint.spec</code> and adapt it to your
- needs.</p></li></ol></div></div></div></body></html>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/py2pack-0.3.21/docs/py2pack.1 new/py2pack-0.4.1.1/docs/py2pack.1
--- old/py2pack-0.3.21/docs/py2pack.1 1970-01-01 01:00:00.000000000 +0100
+++ new/py2pack-0.4.1.1/docs/py2pack.1 2011-09-29 20:21:08.000000000 +0200
@@ -0,0 +1,168 @@
+'\" t
+.\" Title: py2pack
+.\" Author: Sascha Peilicke
+.\" Generator: DocBook XSL Stylesheets v1.76.1 http://docbook.sf.net/
+.\" Date: 07/19/2011
+.\" Manual: @VERSION@
+.\" Source: http://github.com/saschpe/py2pack @VERSION@
+.\" Language: English
+.\"
+.TH "PY2PACK" "1" "07/19/2011" "http://github\&.com/saschpe/py" "@VERSION@"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
+py2pack \- Generate Distribution Packages from Python Packages on PyPI
+.SH "SYNOPSIS"
+.HP \w'\fBpy2pack\fR\ 'u
+\fBpy2pack\fR [\-h] [\-\-version] {search | help | show | list | fetch | generate} ...
+.SH "COMMANDS"
+.PP
+The following commands are available:
+.SS "The fetch Command"
+.HP \w'\fBpy2pack\fR\ 'u
+\fBpy2pack\fR fetch name [version]
+.PP
+Downloads a package from PyPI and stores it in the current directory\&. Optionally you can specify a version number\&.
+.SS "The generate Command"
+.HP \w'\fBpy2pack\fR\fB\ generate\fR\ 'u
+\fBpy2pack\fR\fB generate\fR [\-h] [\-t\ {fedora\&.spec\ |\ opensuse\&.dsc\ |\ opensuse\&.spec}] [\-f\ \fIFILENAME\fR] name [version]
+.PP
+Creates a SPEC or DSC file for a specific distribution\&.
+.SS "The list Command"
+.HP \w'\fBpy2pack\fR\fB\ list\fR\ 'u
+\fBpy2pack\fR\fB list\fR [\-h]
+.PP
+Gives a list of all Python modules available on PyPI\&.
+.SS "The search Command"
+.HP \w'\fBpy2pack\fR\fB\ search\fR\ 'u
+\fBpy2pack\fR\fB search\fR [\-h] {name}
+.PP
+Gives a list of all Python modules found in
+\fIname\fR\&.
+.SS "The show Command"
+.HP \w'\fBpy2pack\fR\fB\ show\fR\ 'u
+\fBpy2pack\fR\fB show\fR [\-h] {name} [version]
+.PP
+Shows the
+\m[blue]\fBDOAP\fR\m[]\&\s-2\u[1]\d\s+2
+record for the given name and version (optionally)\&. The output is a Python dictionary\&.
+.SH "EXAMPLES"
+.PP
+Creating a package from a Python module involves the following steps:
+.sp
+.RS 4
+.ie n \{\
+\h'-04' 1.\h'+01'\c
+.\}
+.el \{\
+.sp -1
+.IP " 1." 4.2
+.\}
+Search for your favorite Python module, for example,
+:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+$ \fBpy2pack\fR search pylint
+searching for package pylint\&.\&.\&.
+found logilab\&.pylintinstaller\-0\&.15\&.2
+found plpylint\-0\&.1\&.2
+found pylint\-0\&.22\&.0
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04' 2.\h'+01'\c
+.\}
+.el \{\
+.sp -1
+.IP " 2." 4.2
+.\}
+Download
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+$ \fBpy2pack\fR fetch
+downloading package pylint\-0\&.22\&.0\&.\&.\&.
+from http://pypi\&.python\&.org/packages/source/p/pylint/pylint\-0\&.22\&.0\&.tar\&.gz
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04' 3.\h'+01'\c
+.\}
+.el \{\
+.sp -1
+.IP " 3." 4.2
+.\}
+Create a SPEC file, for example, for openSUSE:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+$ \fBpy2pack\fR generate \-t opensuse\&.spec \-f python\-pylint\&.spec pylint
+.fi
+.if n \{\
+.RE
+.\}
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04' 4.\h'+01'\c
+.\}
+.el \{\
+.sp -1
+.IP " 4." 4.2
+.\}
+Check the SPEC file
+python\-pylint\&.spec
+and adapt it to your needs\&.
+.RE
+.SH "AUTHORS"
+.PP
+\fBSascha Peilicke\fR <\&saschpe@gmx\&.de\&>
+.RS 4
+Developer
+.RE
+.PP
+\fBThomas Schraitle\fR
+.RS 4
+Manpage author
+.RE
+.SH "NOTES"
+.IP " 1." 4
+DOAP
+.RS 4
+\%http://usefulinc.com/doap
+.RE
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/py2pack-0.3.21/docs/py2pack.html new/py2pack-0.4.1.1/docs/py2pack.html
--- old/py2pack-0.3.21/docs/py2pack.html 1970-01-01 01:00:00.000000000 +0100
+++ new/py2pack-0.4.1.1/docs/py2pack.html 2011-09-29 20:21:08.000000000 +0200
@@ -0,0 +1,20 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>py2pack</title><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><meta name="description" content=""></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div lang="en" class="refentry" title="py2pack"><a name="py2pack"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>py2pack —
+ Generate Distribution Packages from Python Packages on PyPI
+ </p></div><div class="refsynopsisdiv" title="Synopsis"><a name="py2pack.synopsis"></a><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">py2pack</code> [-h] [--version] { search | help | show | list | fetch | generate } ... </p></div></div><div class="refsect1" title="Commands"><a name="py2pack.options"></a><h2>Commands</h2><p>The following commands are available:</p><div class="refsect2" title="The fetch Command"><a name="py2pack.cmd.fetch"></a><h3>The fetch Command</h3><div class="cmdsynopsis"><p><code class="command">py2pack</code> fetch name [version]</p></div><p>Downloads a package from PyPI and stores it in the current directory. Optionally you
+ can specify a version number.</p></div><div class="refsect2" title="The generate Command"><a name="py2pack.cmd.generate"></a><h3>The generate Command</h3><div class="cmdsynopsis"><p><code class="command">py2pack</code> <br><code class="command"> generate</code> [-h] [
+ -t
+ { fedora.spec | opensuse.dsc | opensuse.spec }
+ ] [-f <em class="replaceable"><code>FILENAME</code></em>] name [version]</p></div><p>Creates a SPEC or DSC file for a specific distribution.</p></div><div class="refsect2" title="The list Command"><a name="py2pack.cmd.list"></a><h3>The list Command</h3><div class="cmdsynopsis"><p><code class="command">py2pack</code> <br><code class="command"> list</code> [-h]</p></div><p>Gives a list of all Python modules available on PyPI.</p></div><div class="refsect2" title="The search Command"><a name="py2pack.cmd.search"></a><h3>The search Command</h3><div class="cmdsynopsis"><p><code class="command">py2pack</code> <br><code class="command"> search</code> [-h] {name}</p></div><p>Gives a list of all Python modules found in
+ <em class="replaceable"><code>name</code></em>.</p></div><div class="refsect2" title="The show Command"><a name="py2pack.cmd.show"></a><h3>The show Command</h3><div class="cmdsynopsis"><p><code class="command">py2pack</code> <br><code class="command"> show</code> [-h] {name} [version]</p></div><p>Shows the <a class="ulink" href="http://usefulinc.com/doap" target="_top">DOAP</a> record for the
+ given name and version (optionally). The output is a Python
+ dictionary.</p></div></div><div class="refsect1" title="Examples"><a name="py2pack.examples"></a><h2>Examples</h2><p>Creating a package from a Python module involves the following
+ steps:</p><div class="procedure"><ol class="procedure" type="1"><li class="step" title="Step 1"><p>Search for your favorite Python module, for example,
+ <span class="package"></span>:</p><pre class="screen"><code class="prompt">$ </code><span class="command"><strong>py2pack</strong></span> search pylint
+searching for package pylint...
+found logilab.pylintinstaller-0.15.2
+found plpylint-0.1.2
+found pylint-0.22.0</pre></li><li class="step" title="Step 2"><p>Download</p><pre class="screen"><code class="prompt">$ </code><span class="command"><strong>py2pack</strong></span> fetch
+downloading package pylint-0.22.0...
+from http://pypi.python.org/packages/source/p/pylint/pylint-0.22.0.tar.gz</pre></li><li class="step" title="Step 3"><p>Create a SPEC file, for example, for openSUSE:</p><pre class="screen"><code class="prompt">$ </code><span class="command"><strong>py2pack</strong></span> generate -t opensuse.spec -f python-pylint.spec pylint</pre></li><li class="step" title="Step 4"><p>Check the SPEC file
+ <code class="filename">python-pylint.spec</code> and adapt it to your
+ needs.</p></li></ol></div></div></div></body></html>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/py2pack-0.3.21/py2pack/py2pack.py new/py2pack-0.4.1.1/py2pack/py2pack.py
--- old/py2pack-0.3.21/py2pack/py2pack.py 2011-09-22 12:15:56.000000000 +0200
+++ new/py2pack-0.4.1.1/py2pack/py2pack.py 2012-04-13 09:28:25.000000000 +0200
@@ -1,7 +1,7 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
-# Copyright (c) 2010, Sascha Peilicke
+# Copyright (c) 2011 Sascha Peilicke
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
@@ -18,8 +18,10 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
import argparse
+import httplib
import os
import pwd
+import re
import sys
import urllib
import warnings
@@ -31,7 +33,22 @@
warnings.filterwarnings('ignore', 'Module argparse was already imported') # Filter a UserWarning from Jinja2
import jinja2
-__version__ = '0.3.21'
+__version__ = '0.4.1.1'
+
+
+class ProxiedTransport(xmlrpclib.Transport):
+ def set_proxy(self, proxy):
+ self.proxy = proxy
+ def make_connection(self, host):
+ self.realhost = host
+ h = httplib.HTTP(self.proxy)
+ return h
+ def send_request(self, connection, handler, request_body):
+ connection.putrequest('POST', 'http://{0}{1}'.format(self.realhost, handler))
+ def send_host(self, connection, host):
+ connection.putheader('Host', self.realhost)
+
+
TEMPLATE_DIR = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'templates') # absolute template path
pypi = xmlrpclib.ServerProxy('http://python.org/pypi') # XML RPC connection to PyPI
@@ -71,7 +88,7 @@
def generate(args):
check_or_set_version(args)
if not args.template:
- args.template = template_list()[0]
+ args.template = file_template_list()[0]
if not args.filename:
args.filename = args.name + '.' + args.template.rsplit('.', 1)[1] # take template file ending
print('generating spec file for {0}...'.format(args.name))
@@ -83,6 +100,7 @@
data['source_url'] = args.name + '-' + args.version + '.zip'
data['year'] = datetime.now().year # set current year
data['user_name'] = pwd.getpwuid(os.getuid())[4] # set system user (packager)
+ data['summary_no_ending_dot'] = re.sub('(.*)\.', '\g<1>', data['summary'])
template = env.get_template(args.template)
result = template.render(data).encode('utf-8') # render template and encode properly
outfile = open(args.filename, 'w') # write result to spec file
@@ -92,6 +110,10 @@
outfile.close()
+def create(args):
+ print('create package {0}...'.format(args.name))
+
+
def check_or_set_version(args):
if not args.version: # take first version found
releases = pypi.package_releases(args.name)
@@ -103,19 +125,29 @@
def newest_download_url(args):
- for url in pypi.package_urls(args.name, args.version): # fetch all download URLs
- if url['packagetype'] == 'sdist': # found the source URL we care for
+ for url in pypi.package_urls(args.name, args.version): # Fetch all download URLs
+ if url['packagetype'] == 'sdist': # Found the source URL we care for
return url
- return []
+ # No PyPI tarball release, let's see if an upstream download URL is provided:
+ data = pypi.release_data(args.name, args.version) # Fetch all meta data
+ if 'download_url' in data:
+ filename = os.path.basename(data['download_url'])
+ return {'url': data['download_url'], 'filename': filename}
+ return {} # We're all out of bubblegum
-def template_list():
+def file_template_list():
return filter(lambda filename: not filename.startswith('.'), os.listdir(TEMPLATE_DIR))
+def package_template_list():
+ return ['obs']
+
+
def main():
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument('--version', action='version', version='%(prog)s {0}'.format(__version__))
+ parser.add_argument('--proxy', help='HTTP proxy to use')
subparsers = parser.add_subparsers(title='commands')
parser_list = subparsers.add_parser('list', help='list all packages on PyPI')
@@ -135,17 +167,35 @@
parser_fetch.add_argument('version', nargs='?', help='package version (optional)')
parser_fetch.set_defaults(func=fetch)
- parser_spec = subparsers.add_parser('generate', help='generate RPM spec or DEB dsc file for a package')
- parser_spec.add_argument('name', help='package name')
- parser_spec.add_argument('version', nargs='?', help='package version (optional)')
- parser_spec.add_argument('-t', '--template', choices=template_list(), help='spec file template')
- parser_spec.add_argument('-f', '--filename', help='spec filename (optional)')
- parser_spec.set_defaults(func=generate)
+ parser_generate = subparsers.add_parser('generate', help='generate RPM spec or DEB dsc file for a package')
+ parser_generate.add_argument('name', help='package name')
+ parser_generate.add_argument('version', nargs='?', help='package version (optional)')
+ parser_generate.add_argument('-t', '--template', choices=file_template_list(), default='opensuse.spec', help='file template')
+ parser_generate.add_argument('-f', '--filename', help='spec filename (optional)')
+ parser_generate.set_defaults(func=generate)
+
+ parser_do = subparsers.add_parser('create', help='generate complete package')
+ parser_do.add_argument('name', help='package name')
+ parser_do.add_argument('version', nargs='?', help='package version (optional)')
+ parser_do.add_argument('-t', '--template', choices=package_template_list(), default='obs', help='package template')
+ parser_do.set_defaults(func=create)
parser_help = subparsers.add_parser('help', help='show this help')
parser_help.set_defaults(func=lambda args: parser.print_help())
args = parser.parse_args()
+
+ # set HTTP proxy if one is provided
+ if args.proxy:
+ try:
+ urllib.urlopen(args.proxy)
+ except IOError:
+ print('the proxy \'{0}\' is not responding'.format(args.proxy))
+ sys.exit(1)
+ p = ProxiedTransport()
+ p.set_proxy(args.proxy)
+ pypi._ServerProxy__transport = p # Evil, but should do the trick
+
args.func(args)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/py2pack-0.3.21/py2pack/templates/opensuse.spec new/py2pack-0.4.1.1/py2pack/templates/opensuse.spec
--- old/py2pack-0.3.21/py2pack/templates/opensuse.spec 2011-09-22 11:59:23.000000000 +0200
+++ new/py2pack-0.4.1.1/py2pack/templates/opensuse.spec 2012-03-29 11:10:50.000000000 +0200
@@ -11,19 +11,18 @@
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
-#
+
# Please submit bugfixes or comments via http://bugs.opensuse.org/
-#
+
Name: python-{{ name }}
Version: {{ version }}
Release: 0
-Url: {{ home_page }}
-Summary: {{ summary }}
License: {{ license }}
+Summary: {{ summary_no_ending_dot|default(summary, true) }}
+Url: {{ home_page }}
Group: Development/Languages/Python
Source: {{ source_url|replace(version, '%{version}') }}
-BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: python-devel {%- if requires_python %} = {{ requires_python }} {% endif %}
{%- for req in requires %}
BuildRequires: python-{{ req|replace('(','')|replace(')','') }}
@@ -33,14 +32,16 @@
BuildRequires: python-{{ req|replace('(','')|replace(')','') }}
Requires: python-{{ req|replace('(','')|replace(')','') }}
{%- endfor %}
-%if 0%{?suse_version}
-%py_requires
-%if 0%{?suse_version} > 1110
+{%- if source_url.endswith('.zip') %}
+BuildRequires: unzip
+{%- endif %}
+BuildRoot: %{_tmppath}/%{name}-%{version}-build
+%if 0%{?suse_version} && 0%{?suse_version} <= 1110
+%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
+%{!?python_sitearch: %global python_sitearch %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
+%else
BuildArch: noarch
%endif
-%endif
-%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
-%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
%description
{{ description }}
@@ -56,7 +57,6 @@
%files
%defattr(-,root,root,-)
-# You may have to add additional files here (documentation and binaries mostly)
%{python_sitelib}/*
%changelog
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/py2pack-0.3.21/py2pack.egg-info/PKG-INFO new/py2pack-0.4.1.1/py2pack.egg-info/PKG-INFO
--- old/py2pack-0.3.21/py2pack.egg-info/PKG-INFO 2011-09-22 12:48:42.000000000 +0200
+++ new/py2pack-0.4.1.1/py2pack.egg-info/PKG-INFO 2012-04-13 09:28:43.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: py2pack
-Version: 0.3.21
+Version: 0.4.1.1
Summary: Generate distribution packages from Python packages on PyPI
Home-page: http://github.com/saschpe/py2pack
Author: Sascha Peilicke
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/py2pack-0.3.21/py2pack.egg-info/SOURCES.txt new/py2pack-0.4.1.1/py2pack.egg-info/SOURCES.txt
--- old/py2pack-0.3.21/py2pack.egg-info/SOURCES.txt 2011-09-22 12:48:42.000000000 +0200
+++ new/py2pack-0.4.1.1/py2pack.egg-info/SOURCES.txt 2012-04-13 09:28:43.000000000 +0200
@@ -3,8 +3,8 @@
MANIFEST.in
README.rst
setup.py
-doc/py2pack.1
-doc/py2pack.html
+docs/py2pack.1
+docs/py2pack.html
py2pack/__init__.py
py2pack/py2pack.py
py2pack.egg-info/PKG-INFO
@@ -15,5 +15,4 @@
py2pack/templates/mageia.spec
py2pack/templates/opensuse.dsc
py2pack/templates/opensuse.spec
-scripts/py2pack
-test/test_py2pack.py
\ No newline at end of file
+scripts/py2pack
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/py2pack-0.3.21/setup.py new/py2pack-0.4.1.1/setup.py
--- old/py2pack-0.3.21/setup.py 2011-09-22 12:15:33.000000000 +0200
+++ new/py2pack-0.4.1.1/setup.py 2012-03-29 11:45:57.000000000 +0200
@@ -33,19 +33,19 @@
"""Generate manpage, HTML and PDF documentation.
"""
try:
- subprocess.call(["xsltproc", "--output", "doc/py2pack.html", "/usr/share/xml/docbook/stylesheet/nwalsh/current/html/docbook.xsl", "doc/src/py2pack.xml.in"])
- subprocess.call(["xsltproc", "--output", "doc/py2pack.1", "/usr/share/xml/docbook/stylesheet/nwalsh/current/manpages/docbook.xsl", "doc/src/py2pack.xml.in"])
+ subprocess.call(["xsltproc", "--output", "docs/py2pack.html", "/usr/share/xml/docbook/stylesheet/nwalsh/current/html/docbook.xsl", "docs/src/py2pack.xml.in"])
+ subprocess.call(["xsltproc", "--output", "docs/py2pack.1", "/usr/share/xml/docbook/stylesheet/nwalsh/current/manpages/docbook.xsl", "docs/src/py2pack.xml.in"])
#subprocess.call(["xsltproc", "--output", "doc/py2pack.fo",
# "--stringparam", "paper.type", "A4",
# "--stringparam", "body.start.indent", "0pt",
# "--stringparam", "title.margin.left", "0pt",
# "--stringparam", "variablelist.as.blocks", "1",
- # "/usr/share/xml/docbook/stylesheet/nwalsh/current/fo/docbook.xsl", "doc/py2pack.xml.in"])
- #subprocess.call(["fop", "doc/py2pack.fo", "doc/py2pack.pdf"])
+ # "/usr/share/xml/docbook/stylesheet/nwalsh/current/fo/docbook.xsl", "docs/py2pack.xml.in"])
+ #subprocess.call(["fop", "docs/py2pack.fo", "docs/py2pack.pdf"])
except:
pass
- #if os.path.exists("doc/py2pack.fo"):
- # os.remove("doc/py2pack.fo")
+ #if os.path.exists("docs/py2pack.fo"):
+ # os.remove("docs/py2pack.fo")
sys.exit()
setup(
@@ -61,9 +61,9 @@
packages=['py2pack'],
package_data={'py2pack': ['templates/*']},
data_files=[('share/doc/py2pack', ['AUTHORS', 'LICENSE', 'README.rst']),
- ('share/doc/py2pack/html', ['doc/py2pack.html']),
- #('share/doc/py2pack/pdf', ['doc/py2pack.pdf']),
- ('man/man1', ['doc/py2pack.1'])],
+ ('share/doc/py2pack/html', ['docs/py2pack.html']),
+ #('share/doc/py2pack/pdf', ['docs/py2pack.pdf']),
+ ('man/man1', ['docs/py2pack.1'])],
requires=['argparse', 'Jinja2'],
classifiers=[
'Development Status :: 4 - Beta',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/py2pack-0.3.21/test/test_py2pack.py new/py2pack-0.4.1.1/test/test_py2pack.py
--- old/py2pack-0.3.21/test/test_py2pack.py 2011-08-25 13:43:43.000000000 +0200
+++ new/py2pack-0.4.1.1/test/test_py2pack.py 1970-01-01 01:00:00.000000000 +0100
@@ -1,34 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-#
-# Copyright (c) 2010, Sascha Peilicke
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
-#
-# 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 (see the file COPYING); if not, write to the
-# Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
-
-import unittest
-import doctest
-
-import py2pack
-
-
-class Test(unittest.TestCase):
- """Unit tests for py2pack."""
-
- def test_doctests(self):
- """Run py2pack doctests"""
- doctest.testmod(py2pack)
-
-if __name__ == "__main__":
- unittest.main()
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org