From 663a2076b91ead505e5a497653c6ce0382f95c16 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Fri, 7 Jun 2024 09:14:51 -0500 Subject: [PATCH] remove setup.py --- bindings/python/setup.py | 46 ---------------------------------------- 1 file changed, 46 deletions(-) delete mode 100644 bindings/python/setup.py diff --git a/bindings/python/setup.py b/bindings/python/setup.py deleted file mode 100644 index 49b1ee4ac..000000000 --- a/bindings/python/setup.py +++ /dev/null @@ -1,46 +0,0 @@ -import sys - -from setuptools import setup - -# Make our Windows and macOS wheels platform specific because we embed -# libmongocrypt. On Linux we ship manylinux2010 wheels which cannot do this or -# else auditwheel raises the following error: -# RuntimeError: Invalid binary wheel, found the following shared -# library/libraries in purelib folder: -# libmongocrypt.so -# The wheel has to be platlib compliant in order to be repaired by auditwheel. -cmdclass = {} -if sys.platform in ("win32", "darwin"): - try: - from wheel.bdist_wheel import bdist_wheel as _bdist_wheel - - class bdist_wheel(_bdist_wheel): - def finalize_options(self): - _bdist_wheel.finalize_options(self) - self.root_is_pure = False - - def get_tag(self): - python, abi, plat = _bdist_wheel.get_tag(self) - # Our python source is py3 compatible. - python, abi = "py3", "none" - return python, abi, plat - - cmdclass["bdist_wheel"] = bdist_wheel - except ImportError: - # Version of wheel is too old, use None to fail a bdist_wheel attempt. - cmdclass["bdist_wheel"] = None - - -def parse_reqs_file(fname): - with open(fname) as fid: - lines = [li.strip() for li in fid.readlines()] - return [li for li in lines if li and not li.startswith("#")] - - -extras_require = dict(test=parse_reqs_file("test-requirements.txt")) - -setup( - cmdclass=cmdclass, - install_requires=parse_reqs_file("requirements.txt"), - extras_require=extras_require, -)