Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 344255 - dev-python/markupsafe-0.11 build fails due to using invalid PYTHONPATH at CPython3.1 step
Summary: dev-python/markupsafe-0.11 build fails due to using invalid PYTHONPATH at CPy...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-05 10:23 UTC by Renato Alves
Modified: 2010-11-08 05:03 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Renato Alves 2010-11-05 10:23:34 UTC
I have both python-2.6.5-r3 and 3.1.2-r4 installed. python-2.6 is the system default as set via eselect python.

I also have:
PYTHONPATH=".:/home/myuser/system/lib64/python2.6/site-packages"
on my normal work user which remains upon su'ing to root.

When upgrading markupsafe from 0.9.2 to 0.11 build fails with the log below.

After unsetting PYTHONPATH the package emerged without problems.

==== Start log

(...)
copying markupsafe/__init__.py -> build-2.6/lib.linux-x86_64-2.6/markupsafe
copying markupsafe/_native.py -> build-2.6/lib.linux-x86_64-2.6/markupsafe
copying markupsafe/tests.py -> build-2.6/lib.linux-x86_64-2.6/markupsafe
running egg_info
writing MarkupSafe.egg-info/PKG-INFO
writing top-level names to MarkupSafe.egg-info/top_level.txt
writing dependency_links to MarkupSafe.egg-info/dependency_links.txt
writing MarkupSafe.egg-info/PKG-INFO
writing top-level names to MarkupSafe.egg-info/top_level.txt
writing dependency_links to MarkupSafe.egg-info/dependency_links.txt
reading manifest file 'MarkupSafe.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'MarkupSafe.egg-info/SOURCES.txt'
copying markupsafe/_speedups.c -> build-2.6/lib.linux-x86_64-2.6/markupsafe
warning: build_py: byte-compiling is disabled, skipping.
running build_ext
building 'markupsafe._speedups' extension
creating build-2.6/temp.linux-x86_64-2.6
creating build-2.6/temp.linux-x86_64-2.6/markupsafe
x86_64-pc-linux-gnu-gcc -pthread -march=core2 -msse4.1 -O2 -pipe -fPIC -I/usr/include/python2.6 -c markupsafe/_speedups.c -o build-2.6/temp.linux-x86_64-2.6/markupsafe/_speedups.o
x86_64-pc-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,--as-needed -march=core2 -msse4.1 -O2 -pipe build-2.6/temp.linux-x86_64-2.6/markupsafe/_speedups.o -L/usr/lib64 -lpython2.6 -o build-2.6/lib.linux-x86_64-2.6/markupsafe/_speedups.so
 * Building of dev-python/markupsafe-0.11 with CPython 3.1...
python3.1 setup.py --with-speedups build -b build-3.1
Traceback (most recent call last):
  File "setup.py", line 3, in <module>
    from setuptools import setup, Extension, Feature
  File "/home/myuser/system/lib64/python2.6/site-packages/setuptools-0.6c11-py2.6.egg/setuptools/__init__.py", line 2, in <module>
  File "/home/myuser/system/lib64/python2.6/site-packages/setuptools-0.6c11-py2.6.egg/setuptools/extension.py", line 2, in <module>
ImportError: No module named dist
 * ERROR: dev-python/markupsafe-0.11 failed:
 *   Building failed with CPython 3.1 in distutils_building() function
 * 
 * Call stack:
 *     ebuild.sh, line   54:  Called src_compile
 *   environment, line 3282:  Called distutils_src_compile
 *   environment, line  956:  Called python_execute_function 'distutils_building'
 *   environment, line 2070:  Called die
 * The specific snippet of code:
 *                       die "${failure_message}";
 * 
 * If you need support, post the output of 'emerge --info =dev-python/markupsafe-0.11',
 * the complete build log and the output of 'emerge -pqv =dev-python/markupsafe-0.11'.
 * The complete build log is located at '/var/tmp/portage/dev-python/markupsafe-0.11/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-python/markupsafe-0.11/temp/environment'.
 * S: '/var/tmp/portage/dev-python/markupsafe-0.11/work/MarkupSafe-0.11'

==== End log

Reproducible: Always
Comment 1 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2010-11-06 23:37:54 UTC
You shouldn't set environmental variables, which might break build processes.
Comment 2 Renato Alves 2010-11-08 05:03:58 UTC
Shouldn't PYTHONPATH be sanitized or unset (for python3) by portage before build?

Seems like any package that tries to build both for python2 and python3 is bound to break if this variable is set.