Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple, Interdependent Python Image Processing Ports: py-opencv, etc. #6261

Merged
merged 11 commits into from
Jan 25, 2021

Conversation

essandess
Copy link
Contributor

@essandess essandess commented Jan 28, 2020

Multiple Python Image Processing Ports: py-opencv, etc.

  • python/py-codecov/Portfile
  • python/py-imutils/Portfile
  • python/py-moviepy/Portfile
  • python/py-opencv/Portfile
  • python/py-photomosaic/Portfile
  • python/py-proglog/Portfile
  • python/py-pytest-fixture-config/Portfile
  • python/py-pytest-mock/Portfile
  • python/py-pytest-shutil/Portfile
  • python/py-pytest-virtualenv/Portfile

Description

Type(s)
  • bugfix
  • enhancement
  • security fix
Tested on

macOS 10.x
Xcode 8.x

Verification

Have you

  • checked your Portfile with port lint?
  • tried existing tests with sudo port test?
  • tried a full install with sudo port -vst install?
  • tested basic functionality of all binary files?

@macportsbot
Copy link

Notifying maintainers:
@beauby for port libfaiss.
@stromnov for port py-scikit-build.
@mdouze for port libfaiss.

@macportsbot
Copy link

Travis Build #10157 Errored.

Lint results
--->  Verifying Portfile for libfaiss
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-codecov
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-dlib
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-faiss
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-imutils
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-moviepy
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-opencv
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-photomosaic
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-proglog
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-pytest-fixture-config
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-pytest-mock
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-pytest-shutil
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-pytest-virtualenv
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-scikit-build
--->  0 errors and 0 warnings found.

Port libfaiss success on xcode10.3. Log
Port py37-codecov success on xcode10.3. Log
Port py-codecov success on xcode10.3. Log
Port py38-codecov success on xcode10.3. Log
Port py37-dlib success on xcode10.3. Log
Port py-dlib success on xcode10.3. Log
Port py38-dlib fail on xcode10.3. Log
Port libfaiss success on xcode9.4. Log
Port py37-codecov success on xcode9.4. Log
Port py-codecov success on xcode9.4. Log
Port py38-codecov success on xcode9.4. Log
Port py37-dlib success on xcode9.4. Log
Port py-dlib success on xcode9.4. Log
Port py38-dlib fail on xcode9.4. Log
Port py37-faiss success on xcode9.4. Log
Port libfaiss success on xcode8.3. Log
Port py37-codecov success on xcode8.3. Log
Port py-codecov success on xcode8.3. Log
Port py38-codecov success on xcode8.3. Log
Port py37-dlib success on xcode8.3. Log
Port py-dlib success on xcode8.3. Log
Port py38-dlib fail on xcode8.3. Log
Port py37-faiss success on xcode8.3. Log
Port py-faiss success on xcode8.3. Log
Port libfaiss success on xcode7.3. Log
Port py37-codecov success on xcode7.3. Log
Port py-codecov success on xcode7.3. Log
Port py38-codecov success on xcode7.3. Log
Port py37-dlib fail on xcode7.3. Log
Port py-dlib's dependencies fail on xcode7.3. Log
Port py38-dlib fail on xcode7.3. Log

The build timed out.

@macportsbot
Copy link

Travis Build #10163 Errored.

Lint results
--->  Verifying Portfile for libfaiss
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-codecov
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-dlib
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-faiss
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-imutils
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-moviepy
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-opencv
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-photomosaic
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-proglog
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-pytest-fixture-config
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-pytest-mock
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-pytest-shutil
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-pytest-virtualenv
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-scikit-build
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-setuptools-git
--->  0 errors and 0 warnings found.

Port libfaiss success on xcode10.3. Log
Port py37-codecov success on xcode10.3. Log
Port py-codecov success on xcode10.3. Log
Port py38-codecov success on xcode10.3. Log
Port py37-dlib success on xcode10.3. Log
Port libfaiss success on xcode9.4. Log
Port py37-codecov success on xcode9.4. Log
Port py-codecov success on xcode9.4. Log
Port py38-codecov success on xcode9.4. Log
Port py37-dlib success on xcode9.4. Log
Port py-dlib success on xcode9.4. Log
Port py38-dlib success on xcode9.4. Log
Port libfaiss success on xcode8.3. Log
Port py37-codecov success on xcode8.3. Log
Port py-codecov success on xcode8.3. Log
Port py38-codecov success on xcode8.3. Log
Port py37-dlib success on xcode8.3. Log
Port py-dlib success on xcode8.3. Log
Port py38-dlib success on xcode8.3. Log
Port libfaiss success on xcode7.3. Log
Port py37-codecov success on xcode7.3. Log
Port py-codecov success on xcode7.3. Log
Port py38-codecov success on xcode7.3. Log
Port py37-dlib fail on xcode7.3. Log
Port py-dlib's dependencies fail on xcode7.3. Log
Port py38-dlib fail on xcode7.3. Log

The build timed out.

@macportsbot
Copy link

Travis Build #10172 Errored.

Lint results
--->  Verifying Portfile for libfaiss
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-codecov
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-dlib
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-faiss
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-imutils
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-moviepy
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-opencv
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-photomosaic
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-proglog
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-pytest-fixture-config
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-pytest-mock
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-pytest-shutil
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-pytest-virtualenv
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-scikit-build
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-setuptools-git
--->  0 errors and 0 warnings found.

Port libfaiss success on xcode10.3. Log
Port py37-codecov success on xcode10.3. Log
Port py-codecov success on xcode10.3. Log
Port py38-codecov success on xcode10.3. Log
Port libfaiss success on xcode9.4. Log
Port py37-codecov success on xcode9.4. Log
Port py-codecov success on xcode9.4. Log
Port py38-codecov success on xcode9.4. Log
Port py37-dlib success on xcode9.4. Log
Port py-dlib success on xcode9.4. Log
Port libfaiss success on xcode8.3. Log
Port py37-codecov success on xcode8.3. Log
Port py-codecov success on xcode8.3. Log
Port py38-codecov success on xcode8.3. Log
Port py37-dlib success on xcode8.3. Log
Port py-dlib success on xcode8.3. Log
Port libfaiss success on xcode7.3. Log
Port py37-codecov success on xcode7.3. Log
Port py-codecov success on xcode7.3. Log
Port py38-codecov success on xcode7.3. Log
Port py37-dlib fail on xcode7.3. Log
Port py-dlib's dependencies fail on xcode7.3. Log
Port py38-dlib fail on xcode7.3. Log

The build timed out.

@macportsbot
Copy link

Travis Build #10176 Errored.

Lint results
--->  Verifying Portfile for libfaiss
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-codecov
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-dlib
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-faiss
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-imutils
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-moviepy
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-opencv
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-photomosaic
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-proglog
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-pytest-fixture-config
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-pytest-mock
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-pytest-shutil
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-pytest-virtualenv
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-scikit-build
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-setuptools-git
--->  0 errors and 0 warnings found.

Port libfaiss success on xcode10.3. Log
Port py37-codecov success on xcode10.3. Log
Port py-codecov success on xcode10.3. Log
Port py38-codecov success on xcode10.3. Log
Port py37-dlib success on xcode10.3. Log
Port py-dlib success on xcode10.3. Log
Port libfaiss success on xcode9.4. Log
Port py37-codecov success on xcode9.4. Log
Port py-codecov success on xcode9.4. Log
Port py38-codecov success on xcode9.4. Log
Port py37-dlib success on xcode9.4. Log
Port py-dlib success on xcode9.4. Log
Port py38-dlib success on xcode9.4. Log
Port libfaiss success on xcode8.3. Log
Port py37-codecov success on xcode8.3. Log
Port py-codecov success on xcode8.3. Log
Port py38-codecov success on xcode8.3. Log
Port py37-dlib success on xcode8.3. Log
Port py-dlib success on xcode8.3. Log
Port py38-dlib success on xcode8.3. Log
Port libfaiss success on xcode7.3. Log
Port py37-codecov success on xcode7.3. Log
Port py-codecov success on xcode7.3. Log
Port py38-codecov success on xcode7.3. Log
Port py37-dlib fail on xcode7.3. Log
Port py-dlib's dependencies fail on xcode7.3. Log
Port py38-dlib fail on xcode7.3. Log

The build timed out.

@macportsbot
Copy link

Travis Build #10179 Errored.

Lint results
--->  Verifying Portfile for libfaiss
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-codecov
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-dlib
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-faiss
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-imutils
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-moviepy
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-opencv
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-photomosaic
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-proglog
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-pytest-fixture-config
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-pytest-mock
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-pytest-shutil
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-pytest-virtualenv
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-scikit-build
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-setuptools-git
--->  0 errors and 0 warnings found.

Port libfaiss success on xcode10.3. Log
Port py37-codecov success on xcode10.3. Log
Port py-codecov success on xcode10.3. Log
Port py38-codecov success on xcode10.3. Log
Port py37-dlib success on xcode10.3. Log
Port py-dlib success on xcode10.3. Log
Port libfaiss success on xcode9.4. Log
Port py37-codecov success on xcode9.4. Log
Port py-codecov success on xcode9.4. Log
Port py38-codecov success on xcode9.4. Log
Port py37-dlib success on xcode9.4. Log
Port py-dlib success on xcode9.4. Log
Port py38-dlib success on xcode9.4. Log
Port libfaiss success on xcode8.3. Log
Port py37-codecov success on xcode8.3. Log
Port py-codecov success on xcode8.3. Log
Port py38-codecov success on xcode8.3. Log
Port py37-dlib success on xcode8.3. Log
Port py-dlib success on xcode8.3. Log
Port py38-dlib success on xcode8.3. Log
Port libfaiss success on xcode7.3. Log
Port py37-codecov success on xcode7.3. Log
Port py-codecov success on xcode7.3. Log
Port py38-codecov success on xcode7.3. Log
Port py37-dlib fail on xcode7.3. Log
Port py-dlib's dependencies fail on xcode7.3. Log
Port py38-dlib fail on xcode7.3. Log

The build timed out.

@essandess
Copy link
Contributor Author

@reneeotten I’ll do my best to apply your advice from #6314 (comment) to this PR in the next days/weeks.

Suggestion: please find a good place to permanently document these pointers for Python Portfiles, so that they’re not in obscure PR threads.

@essandess essandess force-pushed the py-opencv branch 4 times, most recently from 53a8c72 to b106bbb Compare February 18, 2020 22:25
@macportsbot
Copy link

Travis Build #10469 Errored.

Lint results
--->  Verifying Portfile for libfaiss
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-codecov
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-dlib
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-faiss
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-imutils
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-moviepy
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-opencv
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-photomosaic
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-proglog
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-pytest-fixture-config
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-pytest-mock
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-pytest-shutil
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-pytest-virtualenv
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-scikit-build
--->  0 errors and 0 warnings found.

Port libfaiss success on xcode10.3. Log
Port py37-codecov success on xcode10.3. Log
Port py-codecov success on xcode10.3. Log
Port py38-codecov success on xcode10.3. Log
Port libfaiss success on xcode9.4. Log
Port py37-codecov success on xcode9.4. Log
Port py-codecov success on xcode9.4. Log
Port py38-codecov success on xcode9.4. Log
Port py37-dlib success on xcode9.4. Log
Port py-dlib success on xcode9.4. Log
Port libfaiss success on xcode8.3. Log
Port py37-codecov success on xcode8.3. Log
Port py-codecov success on xcode8.3. Log
Port py38-codecov success on xcode8.3. Log
Port py37-dlib success on xcode8.3. Log
Port py-dlib success on xcode8.3. Log
Port libfaiss success on xcode7.3. Log
Port py37-codecov success on xcode7.3. Log
Port py-codecov success on xcode7.3. Log
Port py38-codecov success on xcode7.3. Log
Port py37-dlib fail on xcode7.3. Log
Port py-dlib's dependencies fail on xcode7.3. Log
Port py38-dlib fail on xcode7.3. Log

The build timed out.

@macportsbot
Copy link

Travis Build #10470 Errored.

Lint results
--->  Verifying Portfile for libfaiss
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-codecov
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-dlib
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-faiss
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-imutils
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-moviepy
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-opencv
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-photomosaic
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-proglog
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-pytest-fixture-config
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-pytest-mock
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-pytest-shutil
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-pytest-virtualenv
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-scikit-build
--->  0 errors and 0 warnings found.

Port libfaiss success on xcode10.3. Log
Port py37-codecov success on xcode10.3. Log
Port py-codecov success on xcode10.3. Log
Port py38-codecov success on xcode10.3. Log
Port py37-dlib success on xcode10.3. Log
Port py-dlib success on xcode10.3. Log
Port libfaiss success on xcode9.4. Log
Port py37-codecov success on xcode9.4. Log
Port py-codecov success on xcode9.4. Log
Port py38-codecov success on xcode9.4. Log
Port py37-dlib success on xcode9.4. Log
Port py-dlib success on xcode9.4. Log
Port libfaiss success on xcode8.3. Log
Port py37-codecov success on xcode8.3. Log
Port py-codecov success on xcode8.3. Log
Port py38-codecov success on xcode8.3. Log
Port py37-dlib success on xcode8.3. Log
Port py-dlib success on xcode8.3. Log
Port libfaiss success on xcode7.3. Log
Port py37-codecov success on xcode7.3. Log
Port py-codecov success on xcode7.3. Log
Port py38-codecov success on xcode7.3. Log
Port py37-dlib fail on xcode7.3. Log
Port py-dlib's dependencies fail on xcode7.3. Log
Port py38-dlib fail on xcode7.3. Log

The build timed out.

@macportsbot
Copy link

Travis Build #10480 Errored.

Lint results
--->  Verifying Portfile for libfaiss
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-codecov
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-dlib
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-faiss
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-imutils
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-moviepy
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-opencv
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-photomosaic
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-proglog
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-pytest-fixture-config
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-pytest-mock
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-pytest-shutil
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-pytest-virtualenv
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for py-scikit-build
--->  0 errors and 0 warnings found.

Port libfaiss's dependencies fail on xcode10.3. Log
Port py37-codecov success on xcode10.3. Log
Port py-codecov success on xcode10.3. Log
Port py38-codecov success on xcode10.3. Log
Port py37-dlib success on xcode10.3. Log
Port py-dlib success on xcode10.3. Log
Port libfaiss success on xcode9.4. Log
Port py37-codecov success on xcode9.4. Log
Port py-codecov success on xcode9.4. Log
Port py38-codecov success on xcode9.4. Log
Port py37-dlib success on xcode9.4. Log
Port py-dlib success on xcode9.4. Log
Port libfaiss success on xcode8.3. Log
Port py37-codecov success on xcode8.3. Log
Port py-codecov success on xcode8.3. Log
Port py38-codecov success on xcode8.3. Log
Port py37-dlib success on xcode8.3. Log
Port py-dlib success on xcode8.3. Log
Port libfaiss success on xcode7.3. Log
Port py37-codecov success on xcode7.3. Log
Port py-codecov success on xcode7.3. Log
Port py38-codecov success on xcode7.3. Log
Port py37-dlib fail on xcode7.3. Log
Port py-dlib's dependencies fail on xcode7.3. Log
Port py38-dlib fail on xcode7.3. Log

The build timed out.

@essandess
Copy link
Contributor Author

@reneeotten I’ll do my best to apply your advice from #6314 (comment) to this PR in the next days/weeks.

I believe that the submitted Portfiles in this PR all now adhere to these guidelines.

@reneeotten
Copy link
Contributor

@reneeotten I’ll do my best to apply your advice from #6314 (comment) to this PR in the next days/weeks.

I believe that the submitted Portfiles in this PR all now adhere to these guidelines.

Great - I'll take a look, give me a day or two.

Copy link
Contributor

@reneeotten reneeotten left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some review comments below.

python/py-dlib/Portfile Outdated Show resolved Hide resolved
python/py-dlib/Portfile Outdated Show resolved Hide resolved
python/py-dlib/Portfile Outdated Show resolved Hide resolved
python/py-dlib/Portfile Outdated Show resolved Hide resolved
python/py-imutils/Portfile Outdated Show resolved Hide resolved
python/py-pytest-mock/Portfile Outdated Show resolved Hide resolved
python/py-opencv/Portfile Outdated Show resolved Hide resolved
math/libfaiss/Portfile Outdated Show resolved Hide resolved
python/py-faiss/Portfile Outdated Show resolved Hide resolved
math/libfaiss/Portfile Outdated Show resolved Hide resolved
@essandess essandess mentioned this pull request Jul 13, 2020
11 tasks
@essandess essandess force-pushed the py-opencv branch 2 times, most recently from 69aa329 to f59f12d Compare July 13, 2020 19:15
@essandess
Copy link
Contributor Author

passionate == good

passionate than necessary!

@mascguy
Copy link
Member

mascguy commented Jan 24, 2021

Steve, I finally had a chance to review your opencv4 changes, and they look good overall. Thanks, too, for merging in the latest updates from yesterday!

Let's eliminate the copy-paste for phase post-destroot, though, by encapsulating that logic into a procedure.

Change your subport's post-destroot phase to:

        # Deconflict with port:opencv4 contents
        post-destroot {
            opencv4_post_destroot

            foreach f [exec port contents ${name}] {
                delete ${destroot}${f}
            }
        }

And change the parent port's version to - well, you already know, after seeing that - but:

proc opencv4_post_destroot {} {
    global prefix
    global destroot

    set bin_main_dir \
                    "${destroot}${prefix}/bin"
    set bin_port_dir \
                    "${destroot}${prefix}/libexec/opencv4/bin"

    # While the various configure-related options should catch everything, one or more
    # files may be missed. If so, ensure they're moved to the opencv4 bin area.
    opencv4_move_binaries \
                    ${bin_main_dir} \
                    ${bin_port_dir}

    # Create soft links for binaries, each prefixed with 'opencv4_'.
    opencv4_soft_link_binaries \
                    ${bin_main_dir} \
                    ${bin_port_dir} \
                    ${destroot} \
                    ${prefix}
}

post-destroot {
    opencv4_post_destroot
}

Be warned, I haven't actually tested these changes yet... so there could be a typo. But that's basically the gist. :-)

* Replace python* variants as py*-opencv subports to allow
  Portfile dependencies
@essandess
Copy link
Contributor Author

@mascguy Thanks—great idea. Yes, this works and installs correctly.

For posterity, I was barking up the wrong tree trying to incorporate the source from pypi's homepage of the cv2 package.

The work you and others did providing opencv's Python bindings in this Portfile is definitely the correct approach both because it works and because it's robust.

Thanks again.

Copy link
Member

@mascguy mascguy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, particularly the changes for port opencv4. Anyone else?

@mascguy
Copy link
Member

mascguy commented Jan 25, 2021

@reneeotten Any final thoughts/comments? Given how much work Steve has put into this PR, it would be great to see it approved and merged.

@kencu
Copy link
Contributor

kencu commented Jan 25, 2021

OK. Looks like you guys have settled on this. The CI system will never finish building it, so here goes, and good luck!

@kencu kencu merged commit 8769b70 into macports:master Jan 25, 2021
@essandess essandess deleted the py-opencv branch January 25, 2021 11:42
@mascguy
Copy link
Member

mascguy commented Jan 25, 2021

Thanks Ken!

And great job Steve, looking forward to collaborating with you in the future!

@mascguy
Copy link
Member

mascguy commented Jan 26, 2021

Steve, none of the following is a big deal, as I'm working on more changes to the various opencv* ports anyway. So if any corrections are necessary, then no problem!

But just wanted to confirm which variant(s) should exist for your new py3x-opencv subports:

$ port info py37-opencv
py37-opencv @4.5.0_2 (graphics, science)
Variants:             debug, eigen, tests

Debug makes sense, to enable symbols in the Python bindings. But how about eigen and tests?

Also, since we're supporting multiple OpenCV versions, do you mind if I add the major version to the subport names? (Basically just appending a '4' suffix to each.)

Cheers,
-Chris

@essandess
Copy link
Contributor Author

Chris,

Bottom line—I’ll defer to your preferences. FWIW, here was my thinking on these choices:

I went through all the variants, and these ones were conscious choices: debug obvs.; tests also because I believe that this also runs tests for the Python code, at least it does in the python-opencv package; eigen I had also turned on in the python-opencv package, but I believe now this is mistaken. Even that package doesn’t use it: https://github.com/skvark/opencv-python/search?q=eigen&type=issues

I am personally not a fan of keeping version numbers in port names and prefer to be up-to-date as possible, and am furthermore not aware of any dependency on, say, py-opencv3. But again I defer to your preferences.

essandess added a commit to essandess/macports-ports that referenced this pull request Mar 27, 2021
cjones051073 pushed a commit that referenced this pull request Mar 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

7 participants