You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+20-10
Original file line number
Diff line number
Diff line change
@@ -77,7 +77,10 @@ The aim of this repository is to provide means to package each new [OpenCV relea
77
77
78
78
### Build process
79
79
80
-
The project is structured like a normal Python package with a standard ``setup.py`` file. The build process for a single entry in the build matrices is as follows (see for example ``appveyor.yml`` file):
80
+
The project is structured like a normal Python package with a standard ``setup.py`` file.
81
+
The build process for a single entry in the build matrices is as follows (see for example ``appveyor.yml`` file):
82
+
83
+
0. In Linux and MacOS build: get OpenCV's optional C dependencies that we compile against
81
84
82
85
1. Checkout repository and submodules
83
86
@@ -86,25 +89,32 @@ The project is structured like a normal Python package with a standard ``setup.p
86
89
- Contrib modules are also included as a submodule
87
90
88
91
2. Find OpenCV version from the sources
89
-
3. Install dependencies (numpy)
92
+
3. Install Python dependencies
93
+
94
+
-``setup.py`` installs the dependencies itself, so you need to run it in an environment
95
+
where you have the rights to install modules with Pip for the running Python
96
+
90
97
4. Build OpenCV
91
98
92
99
- tests are disabled, otherwise build time increases too much
93
100
- there are 4 build matrix entries for each build combination: with and without contrib modules, with and without GUI (headless)
94
101
- Linux builds run in manylinux Docker containers (CentOS 5)
95
102
96
-
5. Copy each ``.pyd/.so`` file to cv2 folder of this project and
6. Linux and macOS wheels are transformed with auditwheel and delocate, correspondingly
98
106
99
-
- Linux and macOS wheels are checked with auditwheel and delocate
107
+
7. Install the generated wheel
108
+
8. Test that Python can import the library and run some sanity checks
109
+
9. Use twine to upload the generated wheel to PyPI (only in release builds)
100
110
101
-
6. Install the generated wheel
102
-
7. Test that Python can import the library and run some sanity checks
103
-
8. Use twine to upload the generated wheel to PyPI (only in release builds)
111
+
Steps 1--5 are handled by ``setup.py bdist_wheel``.
104
112
105
-
The ``cv2.pyd/.so`` file is normally copied to site-packages. To avoid polluting the root folder this package wraps the statically built binary into cv2 package and ``__init__.py`` file in the package handles the import logic correctly.
113
+
The build can be customized with environment variables.
114
+
In addition to any variables that OpenCV's build accepts, we recognize:
106
115
107
-
Since all packages use the same ``cv2`` namespace explained above, uninstall the other package before switching for example from ``opencv-python`` to ``opencv-contrib-python``.
116
+
-``ENABLE_CONTRIB`` and ``ENABLE_HEADLESS``. Set to ``1`` to build the contrib and/or headless version
117
+
-``CMAKE_ARGS``. Additional arguments for OpenCV's CMake invocation. You can use this to make a custom build.
0 commit comments