Mar 17, 2012 6:05 am
Collin Day
Hi all,
I have a question about python 3.2 distutils on a Gentoo amd64 system.
When I open an ipython session and import distutils.unixcompiler and
then check the shared library extension with
UnixCCompiler.shared)lib_extension, it returns '.so', as I would
expect. When I run a setup.py in an unofficial PIL source that should
work with python 3.2 and step into it, I hit the line:
find_library_file(self, "tcl" + version):
feature.tcl = "tcl"+TCL_VERSION
self is: <__main__.pil_build_ext object at 0xf44510>
find_library_file is:
def find_library_file(self, library):
return self.compiler.find_library_file(self.compiler.library_dirs,
library)
self.compiler is <distutils.unixccompiler.UnixCCompiler object at
0xfc5410>
library is: 'tcl8.5'
when I check the shared_lib_extension it returns '.cpython-32.so' - not
'.so'
This is causing a problem because, for example, I have libtcl8.5.so, but
it is looking for libtcl8.5.cpython-32.so.
Where is this shared lib extension being determined? After all, in an
interactive session, it is just looking for .so, but in the script, it
is looking for .cpython-32.so. I tried grep -R cpython-32 * in the top
level directory of ther PIL source I am using, thinking it may be
ovridden or set somewhere, but it turns up empty. Can anyone tell me
what the difference is? I posted earlier, but I just noticed this
difference between interactive session and script.
Thanks!
Previous Thread: How to get a reference of the 'owner' class to which a method belongsin Python 3.X?
Next Thread: Using non-dict namespaces in functions
Related Forum Topics
Distutils + mercurial good practice question
distutils generates a number of files automatically in my projects,
including MANIFEST, build/* and dist/*
Is there any reason why I would want or need to track them in mercurial?
I currently have this .hgignore file:
syntax:...
Generating a .pc file using distutils
Is there some standard way to generate a .pc file (given a .pc.in or
similar) using distutils?
If there's not, is there a good way to access whatever the user passes
in as --prefix (besides parsing sys.argv yourself)?
Thanks,
\t
Distutils on windows ignoring package_data
Hi,
I have created a distutils setup.py script that installs a list of packages
(all subpackages of one main package). Some packages have package_data files
(icons, translations, etc).
Running setup.py install on my Linux system (python 2.6) perfectly installs
all package data, but on...
Distutils bdist_wininst failure on Linux
Following instructions here:
http://docs.python.org/py3k/distutils/builtdist.html#creating-windows-installers
I am trying to create a Windows installer for a pure-module distribution
using Python 3.2. I get a "LookupError: unknown encoding: mbcs"
Here is the full output of distutils...
Adding new source types to distutils?
Last night I wrote a toy prototype module that lets one compile Rust
crates into extension modules for Python. The problem is, I don't know
the "right" way to do this. Ideally I'd just want to tell build_ext
that there's a new source type I want to handle (.rc and .rs), and
also tell...
Appending to sys.path during module install with distutils
I'm trying to use distutils to install a collection of modules in
/usr/local/lib/python2.7/site-packages. My distribution (Fedora 15)
doesn't include any /usr/local paths in sys.path, so the import fails
when running the program. The distutils documentation suggests adding
a $NAME.pth file to...
Python 3 dict question
hi all,
suppose I have Python dict myDict and I know it's not empty.
I have to get any (key, value) pair from the dict (no matter which
one) and perform some operation.
In Python 2 I used mere
key, val = myDict.items()[0]
but in Python 3 myDict.items() return iterator.
Of course, I could...
Question about available python lib for a task
Hello,
I would like to build a database of all the MS-Excel file on a LAN. I
would like to get the files metadata : filename, summary, location,
size, etc.
Is there a dedicated python lib for the task? Is pywin32 one of the
possible lib available?
I would prefer to not building...
Python Noob Question.
Sorry, but I was redirected here via a thread on another forum concerning where to find help for Python. (Python-forums.org not working for me)
I wanted to ask if there was any way I could write a simple Python Temperature program. Where essentially it somehow (Now sure how, I'm a noob...