Skip to content

Commit e576ad4

Browse files
authored
Merge pull request #1108 from opencv-pushbot:gitee/alalek/support_custom_builds
setup.py: support patched sources, allow custom package name
2 parents a9a35c8 + 6140e85 commit e576ad4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

setup.py

100644100755
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def main():
4848
"\\", "/"
4949
)
5050

51-
if os.path.exists(".git"):
51+
if not bool(os.environ.get('OPENCV_PYTHON_SKIP_GIT_COMMANDS', False)) and os.path.exists(".git"):
5252
import pip._internal.vcs.git as git
5353

5454
g = git.Git() # NOTE: pip API's are internal, this has to be refactored
@@ -95,6 +95,8 @@ def main():
9595
if build_rolling:
9696
package_name += "-rolling"
9797

98+
package_name = os.environ.get('OPENCV_PYTHON_PACKAGE_NAME', package_name)
99+
98100
long_description = io.open("README.md", encoding="utf-8").read()
99101

100102
packages = ["cv2", "cv2.data"]

0 commit comments

Comments
 (0)