Skip to content

Commit

Permalink
move build.py out of package
Browse files Browse the repository at this point in the history
  • Loading branch information
Tester authored and Tester committed Dec 27, 2023
1 parent af5bbc2 commit b6712d2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 18 deletions.
File renamed without changes.
20 changes: 2 additions & 18 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import fnmatch

from setuptools import setup
from setuptools.command.build_py import build_py
from wheel.bdist_wheel import bdist_wheel


Expand All @@ -16,21 +13,8 @@ def get_tag(self):
return python, abi, plat


excluded = ['curl_cffi/build.py', 'curl_cffi\\build.py']


class excluded_build_py(build_py):
def find_package_modules(self, package, package_dir):
modules = super().find_package_modules(package, package_dir)
return [
(pkg, mod, file)
for (pkg, mod, file) in modules
if not any(fnmatch.fnmatchcase(file, pat=pattern) for pattern in excluded)
]


setup(
# this option is only valid in setup.py
cffi_modules=["curl_cffi/build.py:ffibuilder"],
cmdclass={"bdist_wheel": bdist_wheel_abi3, 'build_py': excluded_build_py}, # type: ignore
cffi_modules=["./build.py:ffibuilder"],
cmdclass={"bdist_wheel": bdist_wheel_abi3}, # type: ignore
)

0 comments on commit b6712d2

Please sign in to comment.