I'm trying to use 2to3 in setup.py for the first time. I have
distribute installed, so it sounds like I should be able to just add
"use_2to3=True" to my call to setup, and things should just work.
Unfortunately, the setup.py is currently importing the package in order
to determine the version number. Specifically, setup.py has:
from xyz import version
setup(name='xyz', version=version.VERSION, ...)
If I run "python3 setup.py build", this fails because the "from xyz
import version" causes lots of python3-incompatible code to get called.
It seems like there's probably an easy way around this that I'm missing.
In theory, I could specify the version number in two different places
and hope that they would stay synced, but I'm not smart enough to pull
that off. :) Is there anything else I should try? Thanks.
PGP Fingerprint: 8A17 B57C 6879 1863 DE55 8012 AB4D 6098 8826 6868
What is the state of real cross-compiling support in Distutils2? AFAIK
cross-compiling is supported only for various Windows compilers Visual
Studio, MinGW, Borland etc. What I need is an option to cross-compile
software for other architecture like: host - x86, target - ARM.
I encountered following problems trying to cross-compile netifaces 6.0
for ARM Linux:
1. the cross-compiler was not used for all compilation stages without
following package: http://pypi.python.org/pypi/distutilscross
2. during header search process temp c files were created, compiled
and executed. Execution led to an error (cross-compiled binary). What
is the proper way of searching for required headers/libs aka autoconf?
3. Libraries search paths (LDFLAGS) were ignored at linking stage
Version 7.0 fixes problems 2 to 3, but the first one still remains.
Projects/distros that are using cross-compilation are:
I just tried to download distutils2 from PyPI (1.0a3) for my OS X 10.5.8
system (that's Python 2.5).
Errors out trying to run setup.py:
% python setup.py build
error: file 'distutils2/mkpkg.py' does not exist
This seems an unhappy state of affairs. So, where should I download a
real copy from, and why isn't the package on PyPI up-to-date?
I have two mac os/x computers, each up to date with the same compiler
and environments, yet it appears that distutils is emitting different
gcc arguments. Specifically, one of the computers is attempting to
compile Mercurial using the -isysoot ... argument, effectively causing
the build process to fail.
Details: os/x 10.7
Python 2.7.2 (installed from 10.7 installer at python.org)
Mercurial source is 2.1
I don't see any environment settings which would cause gcc to use to
-isysroot argument and I cannot determine where else it might be
coming from (it is not in the Mercurial project), so I believe it must
be coming from distutils.
With something like this
site_packages = pkg_resources.get_python_lib()
I get the python global path of the site-packages directory, is there a
way to get also
the local one, which for example on Linux might be something like