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

add mingw-w64-python-xpra #5037

Merged
merged 4 commits into from
Mar 13, 2019
Merged

add mingw-w64-python-xpra #5037

merged 4 commits into from
Mar 13, 2019

Conversation

totaam
Copy link
Contributor

@totaam totaam commented Mar 8, 2019

For more information, see xpra.org and in particular this ticket: 1883: packaging for mingw64 / MSYS2

Copy link
Member

@mingwandroid mingwandroid left a comment

Choose a reason for hiding this comment

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

Great to see this. I love Xpra.

url='https://xpra.org'
license=('GPL2')
optdepends=('libnotify: notification support'
'gst-plugins-bad: extra audio codecs'
Copy link
Member

@Alexpux Alexpux Mar 11, 2019

Choose a reason for hiding this comment

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

All mingw packages have "${MINGW_PACKAGE_PREFIX}-" prefixes. Probably you must completely remove optdepends from here as every subpackage have its own optdepends

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Alexpux the idea was to have the common dependencies here, those that aren't python version specific.
Are you saying that I need to duplicate them into each package instead?
If so, can I not declare a common_optdepends variable and reference that? (feels cleaner than cut & paste)

Copy link
Member

@Alexpux Alexpux Mar 11, 2019

Choose a reason for hiding this comment

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

You must remove optdepends from header completely because:

  1. Packages described in it not present
  2. optdepends entries in subpackages override it.

Or if you mean that this is common deps for both python2 and python3 then you must fix packages names and in subpackages instead optdepends= write optdepends+=

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the feedback.

  1. I must have copied the optdepends from an archlinux example, fixed
  2. the deps are common to both python2 and python3, so I've used optdepends+=

…nds for xpra-common package, remove outdated websocket-client dependency (no longer used as per xpra ticket 2121)
@Alexpux
Copy link
Member

Alexpux commented Mar 11, 2019

@totaam see errors on CI:

error running (['uglifyjs', '--version'],),{'stderr': -1, 'stdout': -1}: [Error 2] The system cannot find the file specified
Warning: uglifyjs failed and return -1
Warning: yuicompressor module not found, cannot minify
Warning: no x264 and no vpx support!
 you should enable at least one of these two video encodings
'nvcc --version' failed with return code 1
stderr: None
updated ./xpra/build_info.py with:

And

found gcc version: 7.4.0
Traceback (most recent call last):
  File "setup.py", line 1929, in <module>
    **pkgconfig(*PYGTK_PACKAGES, ignored_tokens=gtk2_ignored_tokens)
  File "setup.py", line 702, in exec_pkgconfig
    (" or ".join(options), os.environ.get("PKG_CONFIG_PATH", "(empty)")))
Exception: ERROR: cannot find a valid pkg-config entry for pygobject-2.0 using PKG_CONFIG_PATH=C:\msys64\mingw32\lib\pkgconfig;C:\msys64\mingw32\share\pkgconfig
==> ERROR: A failure occurred in build().
    Aborting...
==> Removing installed dependencies...
checking dependencies...
Packages (13) mingw-w64-i68

@totaam
Copy link
Contributor Author

totaam commented Mar 11, 2019

@Alexpux Thanks, I am looking into this, but I can't seem to figure it out.

First the harmless warnings:

  • Warning: uglifyjs failed and return -1 and Warning: yuicompressor module not found, cannot minify - that's OK, the builtin html5 client won't be minified if none of the minifiers are found at build time
  • 'nvcc --version' failed with return code 1 - also not a problem, without CUDA you won't get the NVENC and NVFBC codecs, but xpra works fine without those
  • Warning: no x264 and no vpx support! - I don't understand this one, vpx and x264 are installed and the pkgconfig file is there too... same problem as:
  • Exception: ERROR: cannot find a valid pkg-config entry for pygobject-2.0 using PKG_CONFIG_PATH=C:\msys64\mingw32\lib\pkgconfig;C:\msys64\mingw32\share\pkgconfig - I don't understand why this is not found - it is detected on my build system VM that I use every day, just not on a fresh install or the msys2 CI system.

This should always return 0:

python -c "import subprocess;proc=subprocess.Popen(['pkg-config', '--exists', 'pygobject-2.0'], stdout=subprocess.PIPE, stderr=subprocess.PIPE);print(proc.communicate(), proc.wait())"

And if you run the pkg-config command by hand, it does:

# pkg-config --exists pygobject-2.0
# echo $?
0

Why is python subprocess.Popen failing on those systems?

@totaam
Copy link
Contributor Author

totaam commented Mar 11, 2019

Never mind, I found the solution here #5043, updated pull request will follow.

@Alexpux
Copy link
Member

Alexpux commented Mar 12, 2019

@totaam no need add twice dependencies to makedepends and depends. Does x265 need to be in deps too?

@totaam
Copy link
Contributor Author

totaam commented Mar 12, 2019

@Alexpux x265 is optional and not recommended at present.
makedepends is defined only once in the file.
depends is modified in the python2 vs python3 subpackages to add the python version-specific dependencies, the common bits are at the top. What do you suggest I should change here?

@Alexpux
Copy link
Member

Alexpux commented Mar 12, 2019

@totaam remove this from makedepends as it already in depends:

             #codec build deps:
             "${MINGW_PACKAGE_PREFIX}-ffmpeg"
             "${MINGW_PACKAGE_PREFIX}-libyuv"
             "${MINGW_PACKAGE_PREFIX}-libvpx"
             "${MINGW_PACKAGE_PREFIX}-x264-git"
             "${MINGW_PACKAGE_PREFIX}-libwebp"
             "${MINGW_PACKAGE_PREFIX}-libjpeg-turbo")

@totaam
Copy link
Contributor Author

totaam commented Mar 12, 2019

@Alexpux Ah, gotcha. Thanks.
I didn't know that you could skip makedepends if already in depends.

@Alexpux Alexpux merged commit d6fe411 into msys2:master Mar 13, 2019
@totaam totaam deleted the xpra branch March 13, 2019 06:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants