forked from containers/podman-py
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
25 lines (19 loc) · 625 Bytes
/
Copy pathsetup.py
File metadata and controls
25 lines (19 loc) · 625 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import fnmatch
import setuptools
from setuptools import find_packages
from setuptools.command.build_py import build_py as build_py_orig
excluded = [
"podman/tests/*",
]
class build_py(build_py_orig): # noqa: N801
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)
]
setuptools.setup(
packages=find_packages(),
cmdclass={"build_py": build_py},
)