ó
ØÆ÷Xc           @  sd  d  Z  d d l m Z m Z d Z d d l Z d d l Z d d l m Z d d l	 m
 Z
 d d l m Z d d l m Z d d	 l m Z d
 „  Z d d d „ Z e d k r`e d d ƒ Z e d e ƒ e j ƒ  Z d e d <d d d d d d d d d d d g e d <e d e d d  d! d" d# d$ d% d" d& d$ d' d( d) d* d+ d, d- d. d/ d0 d1 g e  n  d S(2   s€  
setup.py for installing F2PY

Usage:
   python setup.py install

Copyright 2001-2005 Pearu Peterson all rights reserved,
Pearu Peterson <pearu@cens.ioc.ee>
Permission to use, modify, and distribute this software is given under the
terms of the NumPy License.

NO WARRANTY IS EXPRESSED OR IMPLIED.  USE AT YOUR OWN RISK.
$Revision: 1.32 $
$Date: 2005/01/30 17:22:14 $
Pearu Peterson

iÿÿÿÿ(   t   divisiont   print_functions4   $Id: setup.py,v 1.32 2005/01/30 17:22:14 pearu Exp $N(   t   newer(   t   log(   t   setup(   t   Configuration(   t   versionc           C  s'   t  d ƒ j t j ƒ r d Sd t j S(   s×    Return shebang line for f2py script

    If we are building a binary distribution format, then the shebang line
    should be ``#!python`` rather than ``#!`` followed by the contents of
    ``sys.executable``.
    t   bdist_wheelt	   bdist_eggt   bdist_wininstt	   bdist_rpms   #!pythons   #!(   s   bdist_wheels	   bdist_eggs   bdist_wininsts	   bdist_rpm(   t   sett   intersectiont   syst   argvt
   executable(    (    (    s/   /tmp/pip-build-X4mzal/numpy/numpy/f2py/setup.pyt   _get_f2py_shebang!   s    t    c         C  si   t  d |  | ƒ } | j d ƒ | j d d ƒ | j ƒ  d „  } | j | ƒ t j d | j ƒ  ƒ | S(   Nt   f2pyt   testss   src/fortranobject.cs   src/fortranobject.hc         S  s  d t  j j t j ƒ d } | d d k r> | d  d } n  d t j k rj | d d k rj | d } n  t  j j |  | ƒ } t t | ƒ rt	 j
 d | ƒ t | d	 ƒ } | j t ƒ  d
 ƒ t  j j t  j j t ƒ d ƒ } t | ƒ  } | j | j ƒ  ƒ Wd  QX| j ƒ  n  | S(   NR   i   iüÿÿÿs   .exes   .pyR	   iýÿÿÿs   Creating %st   ws   
s   __main__.py(   t   ost   patht   basenameR   R   R   t   joinR   t   __file__R   t   infot   opent   writeR   t   dirnamet   readt   close(   t	   build_dirt   f2py_exet   targett   ft   mainloct   mf(    (    s/   /tmp/pip-build-X4mzal/numpy/numpy/f2py/setup.pyt   generate_f2py_py9   s    !s   F2PY Version %s(   R   t   add_data_dirt   add_data_filest   make_svn_version_pyt   add_scriptsR   R   t   get_version(   t   parent_packaget   top_patht   configR&   (    (    s/   /tmp/pip-build-X4mzal/numpy/numpy/f2py/setup.pyt   configuration.   s    	
	t   __main__R-   s   F2PY Versions;   http://cens.ioc.ee/projects/f2py2e/2.x/F2PY-2-latest.tar.gzt   download_urls+   Development Status :: 5 - Production/Stables   Intended Audience :: Developerss%   Intended Audience :: Science/Researchs(   License :: OSI Approved :: NumPy Licenses   Natural Language :: Englishs"   Operating System :: OS Independents   Programming Language :: Cs   Programming Language :: Fortrans   Programming Language :: Pythons   Topic :: Scientific/Engineerings0   Topic :: Software Development :: Code Generatorst   classifiersR   t   descriptions,   F2PY - Fortran to Python Interface Generatont   authors   Pearu Petersont   author_emails   pearu@cens.ioc.eet
   maintainert   maintainer_emailt   licenset   BSDt	   platformss%   Unix, Windows (mingw|cygwin), Mac OSXt   long_descriptionsM  The Fortran to Python Interface Generator, or F2PY for short, is a
command line tool (f2py) for generating Python C/API modules for
wrapping Fortran 77/90/95 subroutines, accessing common blocks from
Python, and calling Python functions from Fortran (call-backs).
Interfacing subroutines/data from Fortran 90/95 modules is supported.t   urls#   http://cens.ioc.ee/projects/f2py2e/t   keywordst   FortranR   (   t   __doc__t
   __future__R    R   t   __version__R   R   t   distutils.dep_utilR   t   numpy.distutilsR   t   numpy.distutils.coreR   t   numpy.distutils.misc_utilR   R   R   t   NoneR/   t   __name__R.   t   printt   todict(    (    (    s/   /tmp/pip-build-X4mzal/numpy/numpy/f2py/setup.pyt   <module>   sN   	"
	