[PATCH] Minor build issues with pyHDF

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[PATCH] Minor build issues with pyHDF

Mike Grant
Hi,

I was trying to build pyhdf for a Fedora 12 box with python 2.6 and ran
into two minor issues with setup.py.  First was that distutils isn't in
the numpy I have but in it's own module (easy fix).

Second was an issue with having an unset LINK_ARGS environment variable.
 This comes out as extra_link_args=[""] in the Extension call, which
appears to count as a sequence with length 1 (needs to be [] with length
0).  This passes "" (empty string) as a separate argument to gcc, which
then fails to find the file named "".  Output of a build demonstrating this:
-----------------------------------
python setup.py -i /usr/include/hdf/ -l /usr/lib64/hdf/ build
running build
running build_py
running build_ext
building 'pyhdf._hdfext' extension
gcc -pthread -shared build/temp.linux-x86_64-2.6/pyhdf/hdfext_wrap.o
-L/usr/lib64/hdf/ -L/usr/lib64 -lmfhdf -ldf -lsz -ljpeg -lz -lpython2.6
-o build/lib.linux-x86_64-2.6/pyhdf/_hdfext.so
gcc: : No such file or directory
error: command 'gcc' failed with exit status 1
-----------------------------------

I've attached a patch that fixes both these issues, though I'm not sure
the way I fixed LINK_ARGS is the nicest way to do it.

Anyway, thanks very much for the module :)

Cheers,

Mike Grant.


--------------------------------------------------------------------------------
Plymouth Marine Laboratory
 
Registered Office:
Prospect Place
The Hoe
Plymouth  PL1 3DH
 
Website: www.pml.ac.uk
Registered Charity No. 1091222
PML is a company limited by guarantee
registered in England & Wales
company number 4178503

PML is a member of the Plymouth Marine Sciences Partnership
Website: www.pmsp.org.uk
--------------------------------------------------------------------------------
This e-mail, its content and any file attachments are confidential.

If you have received this e-mail in error please do not copy, disclose it to any third party or use the contents or attachments in any way. Please notify the sender by replying to this e-mail or e-mail [hidden email] and then delete the email without making any copies or using it in any other way.

The content of this message may contain personal views which are not the views of Plymouth Marine Laboratory unless specifically stated.

You are reminded that e-mail communications are not secure and may contain viruses. Plymouth Marine Laboratory accepts no liability for any loss or damage which may be caused by viruses.
--------------------------------------------------------------------------------

_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev

pyhdf-mggr.patch (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Minor build issues with pyHDF

Robert Kern
On Thu, Apr 29, 2010 at 2:26 PM, Mike Grant <[hidden email]> wrote:
> Hi,
>
> I was trying to build pyhdf for a Fedora 12 box with python 2.6 and ran
> into two minor issues with setup.py.  First was that distutils isn't in
> the numpy I have but in it's own module (easy fix).

numpy.distutils is a subpackage of distutils. It is distinct from the
standard library's distutils package and extends it. The setup.py file
is correct in that respect. If you do not have the numpy.distutils
package, then your installation of numpy is broken.

> Second was an issue with having an unset LINK_ARGS environment variable.
>  This comes out as extra_link_args=[""] in the Extension call, which
> appears to count as a sequence with length 1 (needs to be [] with length
> 0).  This passes "" (empty string) as a separate argument to gcc, which
> then fails to find the file named "".  Output of a build demonstrating this:
> -----------------------------------
> python setup.py -i /usr/include/hdf/ -l /usr/lib64/hdf/ build
> running build
> running build_py
> running build_ext
> building 'pyhdf._hdfext' extension
> gcc -pthread -shared build/temp.linux-x86_64-2.6/pyhdf/hdfext_wrap.o
> -L/usr/lib64/hdf/ -L/usr/lib64 -lmfhdf -ldf -lsz -ljpeg -lz -lpython2.6
> -o build/lib.linux-x86_64-2.6/pyhdf/_hdfext.so
> gcc: : No such file or directory
> error: command 'gcc' failed with exit status 1
> -----------------------------------

Thank you. I will be checking in a fix shortly.

--
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
  -- Umberto Eco
_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Minor build issues with pyHDF

Gael Varoquaux
On Thu, Apr 29, 2010 at 02:39:27PM -0500, Robert Kern wrote:
> numpy.distutils is a subpackage of distutils. It is distinct from the
> standard library's distutils package and extends it. The setup.py file
> is correct in that respect. If you do not have the numpy.distutils
> package, then your installation of numpy is broken.

I believe that Fedora is shipping numpy without distutils. They have a
separate package for numpy.distutils. Maybe someone should try to
convince them that it is a bug.

Gaël
_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Minor build issues with pyHDF

Mike Grant
In reply to this post by Mike Grant
On 29/04/10 20:26, Mike Grant wrote:
> I was trying to build pyhdf for a Fedora 12 box with python 2.6 and ran
> into two minor issues with setup.py.  First was that distutils isn't in
> the numpy I have but in it's own module (easy fix).

Hmm, though looking into it more deeply, I see that Fedora decided that
was a bug and put distutils back into numpy recently..

https://bugzilla.redhat.com/show_bug.cgi?id=572820

And installing that in-testing numpy fixed the second (link_args) issue
too.. oh well, scrap that patch :)

Cheers,

Mike.

--------------------------------------------------------------------------------
Plymouth Marine Laboratory
 
Registered Office:
Prospect Place
The Hoe
Plymouth  PL1 3DH
 
Website: www.pml.ac.uk
Registered Charity No. 1091222
PML is a company limited by guarantee
registered in England & Wales
company number 4178503

PML is a member of the Plymouth Marine Sciences Partnership
Website: www.pmsp.org.uk
--------------------------------------------------------------------------------
This e-mail, its content and any file attachments are confidential.

If you have received this e-mail in error please do not copy, disclose it to any third party or use the contents or attachments in any way. Please notify the sender by replying to this e-mail or e-mail [hidden email] and then delete the email without making any copies or using it in any other way.

The content of this message may contain personal views which are not the views of Plymouth Marine Laboratory unless specifically stated.

You are reminded that e-mail communications are not secure and may contain viruses. Plymouth Marine Laboratory accepts no liability for any loss or damage which may be caused by viruses.
--------------------------------------------------------------------------------
_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Minor build issues with pyHDF

Gael Varoquaux
On Thu, Apr 29, 2010 at 08:45:38PM +0100, Mike Grant wrote:
> On 29/04/10 20:26, Mike Grant wrote:
> > I was trying to build pyhdf for a Fedora 12 box with python 2.6 and ran
> > into two minor issues with setup.py.  First was that distutils isn't in
> > the numpy I have but in it's own module (easy fix).

> Hmm, though looking into it more deeply, I see that Fedora decided that
> was a bug and put distutils back into numpy recently..

> https://bugzilla.redhat.com/show_bug.cgi?id=572820

Cool. Good new.

Gaël
_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev