[Checkins] SVN: van.pydeb/trunk/ add restrictedpython and change default debian -> python name translation. Also prepare next release.
Brian Sutherland
jinty at web.de
Mon Jun 15 08:15:10 EDT 2009
Log message for revision 100986:
add restrictedpython and change default debian -> python name translation. Also prepare next release.
Changed:
U van.pydeb/trunk/CHANGES.txt
U van.pydeb/trunk/setup.py
U van.pydeb/trunk/van/pydeb/__init__.py
U van.pydeb/trunk/van/pydeb/py_to_bin.txt
U van.pydeb/trunk/van/pydeb/py_to_src.txt
U van.pydeb/trunk/van/pydeb/tests/translations.txt
-=-
Modified: van.pydeb/trunk/CHANGES.txt
===================================================================
--- van.pydeb/trunk/CHANGES.txt 2009-06-15 11:58:14 UTC (rev 100985)
+++ van.pydeb/trunk/CHANGES.txt 2009-06-15 12:15:10 UTC (rev 100986)
@@ -1,10 +1,14 @@
Changes
=======
-1.2.1 (unreleased)
+1.2.1 (2009-06-15)
------------------
-* Add mapping for ZConfig.
+* Add mapping for ZConfig and RestrictedPython.
+* Change default Debian binary to python package name conversion. The original
+ package name will be used if there is no python-prefix. This works with
+ packages such as buildbot which do not include the python-. The previous
+ version errored in this case, so we're backwards compatible :)
1.2.0 (2009-05-29)
------------------
Modified: van.pydeb/trunk/setup.py
===================================================================
--- van.pydeb/trunk/setup.py 2009-06-15 11:58:14 UTC (rev 100985)
+++ van.pydeb/trunk/setup.py 2009-06-15 12:15:10 UTC (rev 100986)
@@ -23,7 +23,7 @@
long_description=long_description,
author="Vanguardistas",
url='http://pypi.python.org/pypi/van.pydeb',
- version='1.2.1dev',
+ version='1.2.1',
license = 'ZPL 2.1',
packages=find_packages(),
entry_points = {'console_scripts': ['van-pydeb = van.pydeb:main',]},
Modified: van.pydeb/trunk/van/pydeb/__init__.py
===================================================================
--- van.pydeb/trunk/van/pydeb/__init__.py 2009-06-15 11:58:14 UTC (rev 100985)
+++ van.pydeb/trunk/van/pydeb/__init__.py 2009-06-15 12:15:10 UTC (rev 100986)
@@ -70,11 +70,14 @@
def bin_to_py(binary_package):
"""Convert a doebian binary package name to a setuptools project name"""
+ # try for an exact match
py_package_name = _BIN_TO_PY.get(binary_package)
if py_package_name is not None:
return py_package_name
- assert binary_package.startswith('python-')
- return binary_package[7:]
+ # now we try guess
+ if binary_package.startswith('python-'):
+ return binary_package[7:]
+ return binary_package
def src_to_py(source_package):
"""Convert a debian source package name to a setuptools project name"""
Modified: van.pydeb/trunk/van/pydeb/py_to_bin.txt
===================================================================
--- van.pydeb/trunk/van/pydeb/py_to_bin.txt 2009-06-15 11:58:14 UTC (rev 100985)
+++ van.pydeb/trunk/van/pydeb/py_to_bin.txt 2009-06-15 12:15:10 UTC (rev 100986)
@@ -8,3 +8,4 @@
SQLAlchemy python-sqlalchemy
ZConfig python-zconfig
ZODB3 python-zodb
+RestrictedPython python-restrictedpython
Modified: van.pydeb/trunk/van/pydeb/py_to_src.txt
===================================================================
--- van.pydeb/trunk/van/pydeb/py_to_src.txt 2009-06-15 11:58:14 UTC (rev 100985)
+++ van.pydeb/trunk/van/pydeb/py_to_src.txt 2009-06-15 12:15:10 UTC (rev 100986)
@@ -7,3 +7,4 @@
SQLAlchemy sqlalchemy
ZConfig zconfig
ZODB3 zodb
+RestrictedPython restrictedpython
Modified: van.pydeb/trunk/van/pydeb/tests/translations.txt
===================================================================
--- van.pydeb/trunk/van/pydeb/tests/translations.txt 2009-06-15 11:58:14 UTC (rev 100985)
+++ van.pydeb/trunk/van/pydeb/tests/translations.txt 2009-06-15 12:15:10 UTC (rev 100986)
@@ -28,6 +28,25 @@
>>> runit('van-pydeb src_to_py foo')
foo
+Defaults
+--------
+
+If no special rules are specified, defaults that are (hopefully) intelligent
+will take effect. For converting the binary package name to the python package
+name they look like:
+
+ * If the package name starts with python- remove it:
+
+ >>> print pydeb.bin_to_py("python-foo")
+ foo
+ >>> print pydeb.bin_to_py("python-python-foo")
+ python-foo
+
+ * Else, return the package name:
+
+ >>> print pydeb.bin_to_py("foo")
+ foo
+
Paste
-----
More information about the Checkins
mailing list