This is not a problem with compiling python extensions, this is a problem
linking to the mysqlclient library.
Check out the comments on this page:
Unfortunately I can't try anything out for you since I don't have a Windows
machine anymore (changed jobs).
On Fri, Dec 08, 2006 at 02:24:58PM -0700, Robert McFadzean wrote:
> I have tried a number of the suggestions on getting the minGW32 compiler to build python extensions, but I still get the same hangup which seems to be here:
> bal_init]+0x1e):C:\cygwin\home\mys: variable '_iob' can't be auto-imported. Plea
> se read the documentation for ld's --enable-auto-import for details.
> And I don't know what that means other than that it proceeds with a lot of warnings, tries something else, and then gives it up.
> Robert G. McFadzean
> Vermilion School of Agriculture
> Lakeland College
> 5707 47 Ave West
> Vermilion AB T9X 1K5
> Tlf: (780) 853-4890
> Fax: (780) 853-8704
> -----Original Message-----
> From: Chris Lambacher [mailto:email@example.com]
> Sent: Thursday, December 07, 2006 3:14 PM
> To: Robert McFadzean
> Cc: distutils-sig(a)python.org
> Subject: Re: [Distutils] Compiler Incompatibility
> On Wed, Dec 06, 2006 at 11:59:30AM -0700, Robert McFadzean wrote:
> > I have been trying to build MySQLdb for python and A. Dustman has come to the conclusion that the minGW32 compiler that I am using will not work with a Windows ( os is Windows XP) versions of Python and MySQL. Can anyone here confirm that he is right. Is there a possible work around? Dustman suggested that I would have to compile Python and MySQL with the gcc compiler for it to work.
> A quick search finds a plethora of resources for how to use mingw to compile
> python extentions using the standard Windows Python distribution.
> Many of those are out of date and some steps can be skipped and either the
> export file is actually shipped with 2.4 and 2.5 or mingw32-gcc just deals
> with it interally. I haven't done this in a while, but, I think all you
> really need to do at this point is:
> python setup.py build --compiler=mingw32
> python setup.py install
> Note, you can make the '--compiler=mingw32' a default setting by adding
> to c:\Python2x\Lib\distutils\distutils.cfg, at which point all you have to do
> python setup.py install
> I don't know any details particular to building MySQLdb.
> > Robert G. McFadzean
> > Instructor
> > Vermilion School of Agriculture
> > Lakeland College
> > 5707 47 Ave West
> > Vermilion AB T9X 1K5
> > Tlf: (780) 853-4890
> > Fax: (780) 853-8704
> > robert.mcfadzean(a)lakelandc.ab.ca
> > _______________________________________________
> > Distutils-SIG maillist - Distutils-SIG(a)python.org
> > http://mail.python.org/mailman/listinfo/distutils-sig
I'm new to setuptools and I'm hoping to have a few questions answered. I
also have some observations that may be useful, but that can come later.
1. why does setuptools bdist_rpm use
2. is it possible to have setuptools write dependency information not
just to requires.txt but also to setup.cfg so that RPM will be aware of
3. This is more of a distutils question, but, what can be done about the
INSTALLED_FILES containing directories that aren't marked with %dir
(this causes two problems: /all/ directories end up being created but
NOT owned by the RPM, and all files /under/ that directory get included,
which means they likely get included *twice* to to also being explicitly
Sorry for the multi-issue email, I'm new at this.
I have been trying to build MySQLdb for python and A. Dustman has come to the conclusion that the minGW32 compiler that I am using will not work with a Windows ( os is Windows XP) versions of Python and MySQL. Can anyone here confirm that he is right. Is there a possible work around? Dustman suggested that I would have to compile Python and MySQL with the gcc compiler for it to work.
Robert G. McFadzean
Vermilion School of Agriculture
5707 47 Ave West
Vermilion AB T9X 1K5
Tlf: (780) 853-4890
Fax: (780) 853-8704
At 01:55 PM 12/7/2006 -0500, Alexander Michael wrote:
>Once a script has started, is it possible to forcibly ignore the
>version of a package listed in easy-install.pth and tell pkg_resources
>to require a newer version that is available on the sys.path?
Yes, but it's only possible with a crude hack at the moment. Explicitly
add your new version to the beginning of sys.path, then call
pkg_resources.working_set.__init__(). This will clear and reset the global
working set to match the current state of sys.path.
Once a script has started, is it possible to forcibly ignore the
version of a package listed in easy-install.pth and tell pkg_resources
to require a newer version that is available on the sys.path? The
script actually installs the newer version using easy_install, but now
I want the script to use the newer available version (and forget about
the older version).
Thanks for any hints,
By the way, it appears to me that in the EasyInstall documentation
(<http://peak.telecommunity.com/DevCenter/EasyInstall>) the option
--upgrade is elsewhere referred to as --update, but maybe it is my
At 12:48 PM 12/4/2006 +0100, Ramon Diaz-Uriarte wrote:
>(Apologies for cross-posting, but since this relates to both Pylons
>and distutils I figured it'd be OK)
>We are developing a web-based application using Pylons. Pylons itself
>allows for easy distribution via eggs. Our application depends on
>non-Python software (mainly R and a bunch of R packages). As part of
>the installation, we would like to run a shell script (with possibly
>some Python and R code in it), and verify if all R-dependencies are
>satisfied, and if they are not, abort the installation.
>Note we are not trying to get setuptools to install the R-stuff, just
>run a script which checks a few things. I've searched the distutils
>and Pylons lists and docs and I cannot find this addressed, but I
>think I once read about this being possible. What am I missing?
You may be thinking of the zc.buildout system, which allows you to create
"recipes" (sort of like makefiles, but simpler) that can be used to install
complex systems, including both eggs and non-Python software. See:
i have a very basic pure-python package and script that i would like
to distribute as a noarch rpm using distutils. i am using FC5 as my
development platform and have prepared a setup.py that properly builds
and installs my application.
the first problem i have is that the bdist_rpm command results in an
%install section as follows:
python setup.py install --single-version-externally-managed --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES
the trouble here with that %install section is that the python modules
get bytecompiled and thus turned into native code. i'd prefer for
that not to happen, so i have written my own install.sh script and i
provide that to my python setup.py call as follows:
$ python setup.py bdist_rpm --spec-only --install-script /path/to/install.sh
my install.sh passes the --optimize 0 and --no-compile arguments to
distutils, resulting in no .pyc or .pyo files being installed in my
RPM_BUILD_ROOT. the contents of my install.sh are as follows:
python setup.py install --single-version-externally-managed --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES --optimize 0 --no-compile
i thought that would result in no byte compiled files but
unfortunately i was wrong. i'm not sure what's causing it, but
rpmbuild ends up calling brp-python-bytecompile to compile the .py
files. i noticed in the ChangeLog for rpm the following:
- force *.py->*.pyo byte code compilation with brp-python-bytecompile.
so it appears to me as tho there is no way to assemble a noarch RPM
using distutils. does that sound accurate to you all? or are those
folks out there using distutils and an old version of rpm (prior to
2005) that are able to assemble noarch RPMs?
WeatherNet Observations for station: home
Temperature: 54.80F Pressure: 30.02in;
Dew Point: 30.76F (40%) Wind: 248 at 5 mph
Recorded: 17:54:59 10/25/06 (http://wsdl.wxnet.org/inquiry/binding.wsdl)
I am writing a package installation using distutils it is very nice but
I have it two snags:
setup.py install --prefix=<prefix>
a) Shouldn't the *.data syntax work for data_files as it does for
b) Why does it install the data files on <prefix>/foo and not in
<prefix>/share/foo like the documentation seems to imply?
Everything else seems to work as advertised scripts go to <prefix>/bin
packages to <prefix>/lib/python2.4/site-packages...
Is it me or is it a bug?
Thank you very much.
I'm using zc.buildout for a project that also utilizes a custom egg-info
writer. I specify the egg-info writer package as a setup_requires
package in setup.py. Of course, that doesn't trigger zc.buildout (er,
setuptools) to install that egg when I run buildout. I could work
around this by specifying two parts in buildout.cfg: first install the
egg for my egg-info writer, then create a development egg for my project
(which uses the egg-info writer).
I'm curious if there's a way with the current recipe set to create a
develop egg within a part, as opposed to just specifying "develop = ."
in the [buildout] section.
(Apologies for cross-posting, but since this relates to both Pylons
and distutils I figured it'd be OK)
We are developing a web-based application using Pylons. Pylons itself
allows for easy distribution via eggs. Our application depends on
non-Python software (mainly R and a bunch of R packages). As part of
the installation, we would like to run a shell script (with possibly
some Python and R code in it), and verify if all R-dependencies are
satisfied, and if they are not, abort the installation.
Note we are not trying to get setuptools to install the R-stuff, just
run a script which checks a few things. I've searched the distutils
and Pylons lists and docs and I cannot find this addressed, but I
think I once read about this being possible. What am I missing?
Statistical Computing Team
Structural Biology and Biocomputing Programme
Spanish National Cancer Centre (CNIO)