[Python-modules-commits] r3656 - /packages/pyicu/trunk/debian/patches/setup.py.dpatch

bzed-guest at users.alioth.debian.org bzed-guest at users.alioth.debian.org
Sat Nov 17 17:44:20 UTC 2007


Author: bzed-guest
Date: Sat Nov 17 17:44:20 2007
New Revision: 3656

URL: http://svn.debian.org/wsvn/python-modules/?sc=1&rev=3656
Log:
better setup.py

Modified:
    packages/pyicu/trunk/debian/patches/setup.py.dpatch

Modified: packages/pyicu/trunk/debian/patches/setup.py.dpatch
URL: http://svn.debian.org/wsvn/python-modules/packages/pyicu/trunk/debian/patches/setup.py.dpatch?rev=3656&op=diff
==============================================================================
--- packages/pyicu/trunk/debian/patches/setup.py.dpatch (original)
+++ packages/pyicu/trunk/debian/patches/setup.py.dpatch Sat Nov 17 17:44:20 2007
@@ -7,13 +7,14 @@
 @DPATCH@
 diff -urNad pyicu~/setup.py pyicu/setup.py
 --- pyicu~/setup.py	1970-01-01 01:00:00.000000000 +0100
-+++ pyicu/setup.py	2007-11-17 17:40:54.000000000 +0100
-@@ -0,0 +1,24 @@
++++ pyicu/setup.py	2007-11-17 18:38:32.000000000 +0100
+@@ -0,0 +1,40 @@
 +import os
++import re
++
 +from distutils.core import setup, Extension
 +if not os.environ.has_key('CC'):
 +    os.environ['CC']='g++'
-+
 +
 +
 +__cpp_files__ = ['bases.cpp', 'calendar.cpp', 'charset.cpp',
@@ -21,10 +22,24 @@
 +                 'errors.cpp', 'format.cpp', 'iterators.cpp',
 +                 'locale.cpp', 'numberformat.cpp', '_PyICU.cpp']
 +
-+__pyicu_version__ = '0.6'
++
++## this is a debian-only way to figure out which pyicu version we're
++## using here.... normally upstream's job to keep the version uptodate
++
++def __get_pyicu_version__():
++    dpkgp_stdin, dpkgp_stdout = os.popen2('dpkg-parsechangelog')
++    dpkgp_out = dpkgp_stdout.read()
++    dpkgp_stdin.close()
++    dpkgp_stdout.close()
++    return re.findall(r'^Version: (.*)-[0-9]+', dpkgp_out, re.M)[0]
++__pyicu_version__ = __get_pyicu_version__()
++
 +
 +setup(name="PyICU",
++      description='Python extension wrapping the ICU C++ API',
 +      version=__pyicu_version__,
++      url='http://pyicu.osafoundation.org/',
++      author='Open Source Applications Foundation',
 +      ext_modules=[Extension('_PyICU',
 +                             __cpp_files__,
 +                             libraries=['icui18n', 'icuuc', 'icudata'],
@@ -33,3 +48,4 @@
 +                  ],
 +      py_modules=['PyICU']
 +     )
++




More information about the Python-modules-commits mailing list