Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit d46ba96

Browse filesBrowse files
authored
Merge pull request #1665 from EliahKagan/omit-pymod
Omit py_modules in setup
2 parents 7744984 + 3fbbfd7 commit d46ba96
Copy full SHA for d46ba96

File tree

1 file changed

+0
-20
lines changed
Filter options

1 file changed

+0
-20
lines changed

‎setup.py

Copy file name to clipboardExpand all lines: setup.py
-20Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
from setuptools import setup, find_packages
55
from setuptools.command.build_py import build_py as _build_py
66
from setuptools.command.sdist import sdist as _sdist
7-
import fnmatch
87
import os
98
import sys
109

@@ -62,24 +61,6 @@ def _stamp_version(filename: str) -> None:
6261
print("WARNING: Couldn't find version line in file %s" % filename, file=sys.stderr)
6362

6463

65-
def build_py_modules(basedir: str, excludes: Sequence = ()) -> Sequence:
66-
# create list of py_modules from tree
67-
res = set()
68-
_prefix = os.path.basename(basedir)
69-
for root, _, files in os.walk(basedir):
70-
for f in files:
71-
_f, _ext = os.path.splitext(f)
72-
if _ext not in [".py"]:
73-
continue
74-
_f = os.path.join(root, _f)
75-
_f = os.path.relpath(_f, basedir)
76-
_f = "{}.{}".format(_prefix, _f.replace(os.sep, "."))
77-
if any(fnmatch.fnmatch(_f, x) for x in excludes):
78-
continue
79-
res.add(_f)
80-
return list(res)
81-
82-
8364
setup(
8465
name="GitPython",
8566
cmdclass={"build_py": build_py, "sdist": sdist},
@@ -91,7 +72,6 @@ def build_py_modules(basedir: str, excludes: Sequence = ()) -> Sequence:
9172
url="https://github.com/gitpython-developers/GitPython",
9273
packages=find_packages(exclude=["test", "test.*"]),
9374
include_package_data=True,
94-
py_modules=build_py_modules("./git", excludes=["git.ext.*"]),
9575
package_dir={"git": "git"},
9676
python_requires=">=3.7",
9777
install_requires=requirements,

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.