File: setup.py

package info (click to toggle)
python-podman 5.4.0.1-2~bpo12%2B1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm-backports
  • size: 1,140 kB
  • sloc: python: 7,532; makefile: 82; sh: 75
file content (23 lines) | stat: -rw-r--r-- 588 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import fnmatch

import setuptools
from setuptools import find_packages
from setuptools.command.build_py import build_py as build_py_orig

excluded = []


class build_py(build_py_orig):
    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},
)