mirror of
				https://github.com/msgpack/msgpack-python.git
				synced 2025-11-04 03:20:56 +00:00 
			
		
		
		
	User can not cythonize during `pip install msgpack`. So remove cython from build dependency. If user need to use another Cython, user should download sdist, unzip, manually cythonize, and `pip install .`.
		
			
				
	
	
		
			32 lines
		
	
	
	
		
			655 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			32 lines
		
	
	
	
		
			655 B
		
	
	
	
		
			Python
		
	
	
	
	
	
#!/usr/bin/env python
 | 
						|
import os
 | 
						|
import sys
 | 
						|
 | 
						|
from setuptools import Extension, setup
 | 
						|
 | 
						|
PYPY = hasattr(sys, "pypy_version_info")
 | 
						|
 | 
						|
libraries = []
 | 
						|
macros = []
 | 
						|
ext_modules = []
 | 
						|
 | 
						|
if sys.platform == "win32":
 | 
						|
    libraries.append("ws2_32")
 | 
						|
    macros = [("__LITTLE_ENDIAN__", "1")]
 | 
						|
 | 
						|
if not PYPY and not os.environ.get("MSGPACK_PUREPYTHON"):
 | 
						|
    ext_modules.append(
 | 
						|
        Extension(
 | 
						|
            "msgpack._cmsgpack",
 | 
						|
            sources=["msgpack/_cmsgpack.c"],
 | 
						|
            libraries=libraries,
 | 
						|
            include_dirs=["."],
 | 
						|
            define_macros=macros,
 | 
						|
        )
 | 
						|
    )
 | 
						|
del libraries, macros
 | 
						|
 | 
						|
setup(
 | 
						|
    ext_modules=ext_modules,
 | 
						|
    packages=["msgpack"],
 | 
						|
)
 |