Ticket #163: jython-setup.patch

File jython-setup.patch, 1.0 KB (added by anonymous, 4 years ago)
  • setup.py

    diff -r 155b075683b1 setup.py
    a b  
    5858 
    5959 
    6060import sys, os.path 
    61  
     61import platform 
    6262from distutils import log 
    6363from distutils.core import setup, Command 
    6464from distutils.core import Distribution as _Distribution 
     
    309309        test_all.main([]) 
    310310 
    311311 
     312if platform.system().lower().startswith('java'): 
     313    ext_modules = [] 
     314else: 
     315    ext_modules = [ 
     316        Extension('_yaml', ['ext/_yaml.pyx'], 
     317            'libyaml', "LibYAML bindings", LIBYAML_CHECK, 
     318            libraries=['yaml']), 
     319    ] 
     320 
    312321if __name__ == '__main__': 
    313322 
    314323    setup( 
     
    326335 
    327336        package_dir={'': {2: 'lib', 3: 'lib3'}[sys.version_info[0]]}, 
    328337        packages=['yaml'], 
    329         ext_modules=[ 
    330             Extension('_yaml', ['ext/_yaml.pyx'], 
    331                 'libyaml', "LibYAML bindings", LIBYAML_CHECK, 
    332                 libraries=['yaml']), 
    333         ], 
     338        ext_modules=ext_modules, 
    334339 
    335340        distclass=Distribution, 
    336341