[Python-checkins] r77756 - in python/trunk/Lib/distutils: command/bdist_msi.py tests/test_bdist_msi.py
M.-A. Lemburg
mal at egenix.com
Tue Jan 26 19:12:45 CET 2010
Hi Tarek,
I noticed that you have removed get_platform from the distutils.util
module. This will break a lot of setup.py code out there.
Please add a
from sysconfig import get_platform
to the distutils.util module to restore compatibility.
Also note that a lot of setup.py code does monkey patching of
get_platform() to fix certain inefficiencies of its implementation,
so I'm not sure whether changing the distutils imports to load
it directly from sysconfig will really do good.
Thanks.
tarek.ziade wrote:
> Author: tarek.ziade
> Date: Tue Jan 26 18:20:37 2010
> New Revision: 77756
>
> Log:
> fixed bdist_msi imports and added a test module for distutils.command.bdist_msi
>
> Added:
> python/trunk/Lib/distutils/tests/test_bdist_msi.py
> Modified:
> python/trunk/Lib/distutils/command/bdist_msi.py
>
> Modified: python/trunk/Lib/distutils/command/bdist_msi.py
> ==============================================================================
> --- python/trunk/Lib/distutils/command/bdist_msi.py (original)
> +++ python/trunk/Lib/distutils/command/bdist_msi.py Tue Jan 26 18:20:37 2010
> @@ -6,15 +6,15 @@
> """
> Implements the bdist_msi command.
> """
> -
> import sys, os
> +from sysconfig import get_python_version, get_platform
> +
> from distutils.core import Command
> from distutils.dir_util import remove_tree
> -from distutils.sysconfig import get_python_version
> from distutils.version import StrictVersion
> from distutils.errors import DistutilsOptionError
> -from distutils.util import get_platform
> from distutils import log
> +
> import msilib
> from msilib import schema, sequence, text
> from msilib import Directory, Feature, Dialog, add_data
>
> Added: python/trunk/Lib/distutils/tests/test_bdist_msi.py
> ==============================================================================
> --- (empty file)
> +++ python/trunk/Lib/distutils/tests/test_bdist_msi.py Tue Jan 26 18:20:37 2010
> @@ -0,0 +1,23 @@
> +"""Tests for distutils.command.bdist_msi."""
> +import unittest
> +import sys
> +
> +from distutils.tests import support
> +
> + at unittest.skipUnless(sys.platform=="win32", "These tests are only for win32")
> +class BDistMSITestCase(support.TempdirManager,
> + support.LoggingSilencer,
> + unittest.TestCase):
> +
> + def test_minial(self):
> + # minimal test XXX need more tests
> + from distutils.command.bdist_msi import bdist_msi
> + pkg_pth, dist = self.create_dist()
> + cmd = bdist_msi(dist)
> + cmd.ensure_finalized()
> +
> +def test_suite():
> + return unittest.makeSuite(BDistMSITestCase)
> +
> +if __name__ == '__main__':
> + test_support.run_unittest(test_suite())
> _______________________________________________
> Python-checkins mailing list
> Python-checkins at python.org
> http://mail.python.org/mailman/listinfo/python-checkins
--
Marc-Andre Lemburg
eGenix.com
Professional Python Services directly from the Source (#1, Jan 26 2010)
>>> Python/Zope Consulting and Support ... http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
________________________________________________________________________
::: Try our new mxODBC.Connect Python Database Interface for free ! ::::
eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48
D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
Registered at Amtsgericht Duesseldorf: HRB 46611
http://www.egenix.com/company/contact/
More information about the Python-checkins
mailing list