Re: [Python-checkins] r77756 - in python/trunk/Lib/distutils: command/bdist_msi.py tests/test_bdist_msi.py
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 + +@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@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/
On Tue, Jan 26, 2010 at 7:12 PM, M.-A. Lemburg <mal@egenix.com> wrote:
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.
That's one of the reason why I kept the API and I've added a deprecation warning at first, but then you suggested in python-dev that I should remove them and just document the fact that the API was relocated. I can put it back like I've first did it Tarek -- Tarek Ziadé | http://ziade.org
Tarek Ziadé wrote:
On Tue, Jan 26, 2010 at 7:12 PM, M.-A. Lemburg <mal@egenix.com> wrote:
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.
That's one of the reason why I kept the API and I've added a deprecation warning at first, but then you suggested in python-dev that I should remove them and just document the fact that the API was relocated.
Are you sure that was me ?
I can put it back like I've first did it
Yes, please. -- 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/
On Tue, Jan 26, 2010 at 7:43 PM, M.-A. Lemburg <mal@egenix.com> wrote: [..]
Are you sure that was me ?
Yes, in the First draft of "sysconfig" thread
I can put it back like I've first did it
Yes, please.
Ok, I'll work on that
-- 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/
-- Tarek Ziadé | http://ziade.org
Tarek Ziadé wrote:
On Tue, Jan 26, 2010 at 7:43 PM, M.-A. Lemburg <mal@egenix.com> wrote: [..]
Are you sure that was me ?
Yes, in the First draft of "sysconfig" thread
Sorry about that. No idea what I was thinking.
I can put it back like I've first did it
Yes, please.
Ok, I'll work on that
Thanks. -- 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/
On Tue, Jan 26, 2010 at 8:02 PM, M.-A. Lemburg <mal@egenix.com> wrote:
Tarek Ziadé wrote:
On Tue, Jan 26, 2010 at 7:43 PM, M.-A. Lemburg <mal@egenix.com> wrote: [..]
Are you sure that was me ?
Yes, in the First draft of "sysconfig" thread
Sorry about that. No idea what I was thinking.
No worries. So what I am doing is adding back the name that points to the new locations when the API still exists (but without a deprecation warning for them) for instance, in distutils.sysconfig will have: +# names defined here to keep backward compatibility +get_python_version = _sysconfig.get_python_version +get_config_h_filename = _sysconfig.get_config_h_filename +parse_config_h = _sysconfig.parse_config_h +get_config_vars = _sysconfig.get_config_vars +get_config_var = _sysconfig.get_config_var +from distutils.ccompiler import customize_compiler And for the APIs that are being deprecated, I am just throwing a DeprecationWarning. For the patch problem, I am not sure what's the best way. I think that's not a huge change for people patching code. What do you suggest ? Tarek -- Tarek Ziadé | http://ziade.org
Tarek Ziadé wrote:
On Tue, Jan 26, 2010 at 8:02 PM, M.-A. Lemburg <mal@egenix.com> wrote:
Tarek Ziadé wrote:
On Tue, Jan 26, 2010 at 7:43 PM, M.-A. Lemburg <mal@egenix.com> wrote: [..]
Are you sure that was me ?
Yes, in the First draft of "sysconfig" thread
Sorry about that. No idea what I was thinking.
No worries. So what I am doing is adding back the name that points to the new locations when the API still exists (but without a deprecation warning for them)
for instance, in distutils.sysconfig will have:
+# names defined here to keep backward compatibility +get_python_version = _sysconfig.get_python_version +get_config_h_filename = _sysconfig.get_config_h_filename +parse_config_h = _sysconfig.parse_config_h +get_config_vars = _sysconfig.get_config_vars +get_config_var = _sysconfig.get_config_var +from distutils.ccompiler import customize_compiler
Great, thanks.
And for the APIs that are being deprecated, I am just throwing a DeprecationWarning. For the patch problem, I am not sure what's the best way. I think that's not a huge change for people patching code. What do you suggest ?
I'm not sure what you mean with "patch problem". Perhaps the monkey- patching that's often applied to get_platform() ? For that I think we need a better way to tell distutils to use a different platform string than by monkey-patching the function. In mxSetup we currently have to do the monkey-patching in order to support our prebuilt archives. I suppose the situation is similar for eggs. The reason for the change of the platform string is that this is used in many build paths, so we need to make sure that the platform string used on the build machine is also used on the target machine. This often happens on a few platforms such as Mac OS X that have a number of different possible platform strings (e.g. various fat builds vs. single architecture builds). Ideally, there should be a global in distutils that you can change using a public API to avoid the monkey-patching, e.g. distutils.sysconfig.get_platform() Initializes the global using sysconfig.get_platform() if not set and returns its current value. distutils.sysconfig.set_platform(platform_id) Sets the global to a new value. -- 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/
On Tue, Jan 26, 2010 at 8:24 PM, M.-A. Lemburg <mal@egenix.com> wrote: [..]
And for the APIs that are being deprecated, I am just throwing a DeprecationWarning. For the patch problem, I am not sure what's the best way. I think that's not a huge change for people patching code. What do you suggest ?
I'm not sure what you mean with "patch problem". Perhaps the monkey- patching that's often applied to get_platform() ?
Yes,
For that I think we need a better way to tell distutils to use a different platform string than by monkey-patching the function.
In mxSetup we currently have to do the monkey-patching in order to support our prebuilt archives. I suppose the situation is similar for eggs.
yes, it has a custom get_build_platform but it doesn't monkey patch distutils for that/
The reason for the change of the platform string is that this is used in many build paths, so we need to make sure that the platform string used on the build machine is also used on the target machine. This often happens on a few platforms such as Mac OS X that have a number of different possible platform strings (e.g. various fat builds vs. single architecture builds).
Ideally, there should be a global in distutils that you can change using a public API to avoid the monkey-patching, e.g.
distutils.sysconfig.get_platform()
Initializes the global using sysconfig.get_platform() if not set and returns its current value.
distutils.sysconfig.set_platform(platform_id)
Sets the global to a new value.
Sounds like a plan, I'll add this. FYI I have the sysconfig module pending for the py3k branch, but I was waiting a few days to see if everything was OK with the change in 2.x. I guess I'll merge it after that, then work on the shutil part. The next big step is the documentation for sysconfig. Tarek
-- 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/
-- Tarek Ziadé | http://ziade.org
Tarek Ziadé wrote:
On Tue, Jan 26, 2010 at 8:24 PM, M.-A. Lemburg <mal@egenix.com> wrote: [..]
And for the APIs that are being deprecated, I am just throwing a DeprecationWarning. For the patch problem, I am not sure what's the best way. I think that's not a huge change for people patching code. What do you suggest ?
I'm not sure what you mean with "patch problem". Perhaps the monkey- patching that's often applied to get_platform() ?
Yes,
For that I think we need a better way to tell distutils to use a different platform string than by monkey-patching the function.
In mxSetup we currently have to do the monkey-patching in order to support our prebuilt archives. I suppose the situation is similar for eggs.
yes, it has a custom get_build_platform but it doesn't monkey patch distutils for that/
The reason for the change of the platform string is that this is used in many build paths, so we need to make sure that the platform string used on the build machine is also used on the target machine. This often happens on a few platforms such as Mac OS X that have a number of different possible platform strings (e.g. various fat builds vs. single architecture builds).
Ideally, there should be a global in distutils that you can change using a public API to avoid the monkey-patching, e.g.
distutils.sysconfig.get_platform()
Initializes the global using sysconfig.get_platform() if not set and returns its current value.
distutils.sysconfig.set_platform(platform_id)
Sets the global to a new value.
Sounds like a plan, I'll add this.
Great ! You will then also have to undo a few import changes that you have just applied to get the get_platform API from distutils.sysconfig (instead of sysconfig, or the old distutils.utils).
FYI
I have the sysconfig module pending for the py3k branch, but I was waiting a few days to see if everything was OK with the change in 2.x. I guess I'll merge it after that, then work on the shutil part.
I'll run a few more tests of our stuff tomorrow. For now, I've fixed all issues I found, except one, but I'm not sure whether that's distutil's fault, RPM's, mxSetup's or a mix of all of them... the bdist_rpm command no longer works. We haven't used that command in years, so it's not all that surprising.
The next big step is the documentation for sysconfig.
-- 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/
On Tue, Jan 26, 2010 at 10:35 PM, M.-A. Lemburg <mal@egenix.com> wrote: [..]
Great !
You will then also have to undo a few import changes that you have just applied to get the get_platform API from distutils.sysconfig (instead of sysconfig, or the old distutils.utils).
Yes, I am currently doing that API in distutils.util, with some tests.
FYI
I have the sysconfig module pending for the py3k branch, but I was waiting a few days to see if everything was OK with the change in 2.x. I guess I'll merge it after that, then work on the shutil part.
I'll run a few more tests of our stuff tomorrow. For now, I've fixed all issues I found, except one, but I'm not sure whether that's distutil's fault, RPM's, mxSetup's or a mix of all of them... the bdist_rpm command no longer works. We haven't used that command in years, so it's not all that surprising.
Ok I'll stick around in case you have a problem. I'm on IRC as well Tarek
Tarek Ziadé wrote:
On Tue, Jan 26, 2010 at 10:35 PM, M.-A. Lemburg <mal@egenix.com> wrote:
I'll run a few more tests of our stuff tomorrow.
Ok I'll stick around in case you have a problem. I'm on IRC as well
I ran the tests again: everything looks fine. I'll now integrate the new set_platform() API into mxSetup.py. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Jan 27 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/
On Wed, Jan 27, 2010 at 8:37 PM, M.-A. Lemburg <mal@egenix.com> wrote:
Tarek Ziadé wrote:
On Tue, Jan 26, 2010 at 10:35 PM, M.-A. Lemburg <mal@egenix.com> wrote:
I'll run a few more tests of our stuff tomorrow.
Ok I'll stick around in case you have a problem. I'm on IRC as well
I ran the tests again: everything looks fine. I'll now integrate the new set_platform() API into mxSetup.py.
Great ! I'll now merge everything in the Py3k branch, then work on the sysconfig module documentation + distutils documentation. I'll also start the shutil work, that will lead to the removal of dir_util, file_util and archive_util. I'll leave the modules and add an import for relocated APIs Tarek
Thanks, -- Marc-Andre Lemburg eGenix.com
Professional Python Services directly from the Source (#1, Jan 27 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/
-- Tarek Ziadé | http://ziade.org
Tarek Ziadé wrote:
On Wed, Jan 27, 2010 at 8:37 PM, M.-A. Lemburg <mal@egenix.com> wrote:
Tarek Ziadé wrote:
On Tue, Jan 26, 2010 at 10:35 PM, M.-A. Lemburg <mal@egenix.com> wrote:
I'll run a few more tests of our stuff tomorrow.
Ok I'll stick around in case you have a problem. I'm on IRC as well
I ran the tests again: everything looks fine. I'll now integrate the new set_platform() API into mxSetup.py.
Great ! I'll now merge everything in the Py3k branch, then work on the sysconfig module documentation + distutils documentation.
I'll also start the shutil work, that will lead to the removal of dir_util, file_util and archive_util. I'll leave the modules and add an import for relocated APIs
Ok. For the archive_util, could you add an API to register new or update existing archive formats. We're currently using a simple dictionary update for this, but that's not really clean: # Register our version of make_tarball() distutils.archive_util.ARCHIVE_FORMATS.update({ 'gztar': (mx_make_tarball, [('compression', 'gzip')], 'gzipped tar-file'), 'bztar': (mx_make_tarball, [('compression', 'bzip2')], 'bzip2ed tar-file'), 'ztar': (mx_make_tarball, [('compression', 'compress')], 'compressed tar file'), 'tar': (mx_make_tarball, [('compression', None)], 'tar file'), }) -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Jan 27 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/
On Wed, Jan 27, 2010 at 9:23 PM, M.-A. Lemburg <mal@egenix.com> wrote:
Tarek Ziadé wrote:
On Wed, Jan 27, 2010 at 8:37 PM, M.-A. Lemburg <mal@egenix.com> wrote:
Tarek Ziadé wrote:
On Tue, Jan 26, 2010 at 10:35 PM, M.-A. Lemburg <mal@egenix.com> wrote:
I'll run a few more tests of our stuff tomorrow.
Ok I'll stick around in case you have a problem. I'm on IRC as well
I ran the tests again: everything looks fine. I'll now integrate the new set_platform() API into mxSetup.py.
Great ! I'll now merge everything in the Py3k branch, then work on the sysconfig module documentation + distutils documentation.
I'll also start the shutil work, that will lead to the removal of dir_util, file_util and archive_util. I'll leave the modules and add an import for relocated APIs
Ok.
For the archive_util, could you add an API to register new or update existing archive formats.
We're currently using a simple dictionary update for this, but that's not really clean:
# Register our version of make_tarball() distutils.archive_util.ARCHIVE_FORMATS.update({ 'gztar': (mx_make_tarball, [('compression', 'gzip')], 'gzipped tar-file'), 'bztar': (mx_make_tarball, [('compression', 'bzip2')], 'bzip2ed tar-file'), 'ztar': (mx_make_tarball, [('compression', 'compress')], 'compressed tar file'), 'tar': (mx_make_tarball, [('compression', None)], 'tar file'), })
Yes that was the plan because I didn't want to add a public "ARCHIVE_FORMATS" dict. I'll also have to keep the distutils.archive_util.ARCHIVE_FORMATS if it's used out there. (and maybe use a dict subclass so it's linked to shutil APIs + adds deprecation warnings) Tarek -- Tarek Ziadé | http://ziade.org
M.-A. Lemburg wrote:
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.
Likewise, distutils.sysconfig's customize_compiler() was moved to distutils.ccompiler without a b/w compatible import in sysconfig. distutils.sysconfig's get_python_inc() is deprecated, but there's no replacement for it in sysconfig. IMHO, there should be one to maintain b/w compatibility. In general, I don't think that we should add lots and lots of deprecations for moved imports. Just reimport the APIs from the new locations in the old locations and be done with it. There's no real benefit from breaking apps in a minor release. We've been through that and felt the pain with the hash function reorg - this caused lots of noise without really buying us anything. Major module reorganization should be left to major releases. 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 + +@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@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/
On Tue, Jan 26, 2010 at 7:42 PM, M.-A. Lemburg <mal@egenix.com> wrote: [..]
Likewise, distutils.sysconfig's customize_compiler() was moved to distutils.ccompiler without a b/w compatible import in sysconfig.
I've used the same strategy (API relocation)
distutils.sysconfig's get_python_inc() is deprecated, but there's no replacement for it in sysconfig. IMHO, there should be one to maintain b/w compatibility.
The API still exists in distutils.sysconfig, and offers that backward compatibility. There's no plan to keep it in the new sysconfig module.
In general, I don't think that we should add lots and lots of deprecations for moved imports. Just reimport the APIs from the new locations in the old locations and be done with it.
There's no real benefit from breaking apps in a minor release. We've been through that and felt the pain with the hash function reorg - this caused lots of noise without really buying us anything. Major module reorganization should be left to major releases.
Sure, that's why I've added deprecation warnings in the first place :) Tarek
participants (2)
-
M.-A. Lemburg
-
Tarek Ziadé