New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test_distutils fails on 2.6.5rc1: "No module named setuptools_build_ext" #52349
Comments
Current 2.6.5rc1+ building on OS X: ====================================================================== Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/tests/test_build_ext.py", line 350, in test_setuptools_compat
from setuptools_build_ext import build_ext as setuptools_build_ext
ImportError: No module named setuptools_build_ext |
(I should add that this appears to be simply a missing test file. There is no indication that distutils itself has a problem.) |
This file was added in r75256. Are you sure you miss that test file ? |
The file is the source tree but it doesn't seem to get installed in the framework which is where the tests are being run from: /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/tests$ ls -l setuptools* |
Ok so, this file is lost during the installation process only for the Mac OS X install it seems. I need to dig into the Mac OS X build process. If I "./configure && make && make install" with the 2.6.5rc+ tarball, Btw, how do you run the tests exactly Ned ? $ python2.6 test/regrtest.py -v test_distutils |
You are correct: setuptools_build_ext.py should have been there. It turns out the file was missing in my installer builds due to a combination of issues summarized below. The bottom line is that this is not a problem for 2.6.5 and my apologies for causing extra work for you, Tarek. On the plus side, there was some good in all this by causing me to find a couple of serious flaws in my testing process and in the current hg support. The rest of the story: to manage patches, I use hg on top of svn mirrors of the various source trees. hg supports use of a top-level .hgignore file to specify files to ignore for revision control. There is an .hgignore file checked into the svn trees but it turns out to have at least one subtly incorrect entry in it which causes hg to ignore all files with "build" anywhere in their names. As a result, "setuptools_build_ext.py" has not been carried along into builds in my build process and I haven't noticed it up to now. For future reference, testing the tests requires an OS X framework build. The tests themselves are installed into the lib directory of the framework: If you do not want to disturb an existing framework installation (in /Library/Frameworks/Python.frameworks), you can try something like this: # using the Python-2.6.5rc2 tarball Due to the problem documented in bpo-8107, the rest of the test is skipped. (In the original report, the OS X installer builds use separate source and build directories and the build directory is usually still around when the tests are run, so the xxconfig.c *was* found and the test suite was attempted resulting in the reported error - another process issue for me.) If I copy in the two updated files (test_build_ext.py and xxmodule.c) from r78877, test_build_ext now completes as expected: $ bin/python2.6 -m test.regrtest -v test_distutils
test_get_exe_bytes (distutils.tests.test_bdist_wininst.BuildWinInstTestCase) ... ok
test_build_ext (distutils.tests.test_build_ext.BuildExtTestCase) ... ok
test_build_ext_inplace (distutils.tests.test_build_ext.BuildExtTestCase) ... ok
test_build_ext_path_cross_platform (distutils.tests.test_build_ext.BuildExtTestCase) ... ok
test_build_ext_path_with_os_sep (distutils.tests.test_build_ext.BuildExtTestCase) ... ok
test_check_extensions_list (distutils.tests.test_build_ext.BuildExtTestCase) ... ok
test_compiler_option (distutils.tests.test_build_ext.BuildExtTestCase) ... ok
test_ext_fullpath (distutils.tests.test_build_ext.BuildExtTestCase) ... ok
test_finalize_options (distutils.tests.test_build_ext.BuildExtTestCase) ... ok
test_get_outputs (distutils.tests.test_build_ext.BuildExtTestCase) ... ok
test_get_source_files (distutils.tests.test_build_ext.BuildExtTestCase) ... ok
test_setuptools_compat (distutils.tests.test_build_ext.BuildExtTestCase) ... ok
test_solaris_enable_shared (distutils.tests.test_build_ext.BuildExtTestCase) ... ok
test_dont_write_bytecode (distutils.tests.test_build_py.BuildPyTestCase) ... ok
[...] |
ok thanks for the tests Neal. Martin, do I have to do soemthing in msi.py to see this file included ? (I am looking at msi.py right now and it looks like it has the proper glob, but I want to be 100% sure) Ronald, what about the Mac OS scripts ? |
Tarek, in general, if you want a new file in Lib included, create a bug report and assign it to me. |
Ok I see. Good to know thx |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: