Permalink
7 comments
on commit
Please
sign in to comment.
Browse files
cmake: redo +pythonXY and add dependencies on py3Y-sphinxcontrib-[var…
…ious] Closes: https://trac.macports.org/ticket/58339
- Loading branch information
| @@ -51,7 +51,7 @@ if {${subport} eq ${name}} { | ||
| checksums rmd160 2c883e9858a2d3d1c360a094ccd9c7bf38fdaa7f \ | ||
| sha256 a3cbf562b99270c0ff192f692139e98c605f292bfdbc04d70da0309a5358e71e \ | ||
| size 8850106 | ||
| revision 0 | ||
| revision 1 | ||
|
|
||
| master_sites ${homepage}/files/v${branch}/ | ||
| conflicts cmake-devel | ||
| @@ -80,7 +80,7 @@ if {${subport} eq ${name}} { | ||
| checksums rmd160 44f730f91005984e95f608c9e59dbb1d2a40288e \ | ||
| sha256 5f8d7f0b2f0369152ca4ef49cff1fa07d9c3faf792b188d1741440d6ab3bf68a \ | ||
| size 6878866 | ||
| revision 0 | ||
| revision 1 | ||
|
|
||
| use_bzip2 yes | ||
| master_sites https://gitlab.kitware.com/cmake/cmake/repository/archive${extract.suffix}?ref=${commit}& | ||
| @@ -200,17 +200,6 @@ post-patch { | ||
| # used, because the PYTHON_EXECUTABLE is used only when building | ||
| # docs -- so, when not building docs its setting makes no difference. | ||
|
|
||
| if {[variant_isset python27]} { | ||
| set PYTHON_VERSION_WITH_DOT "2.7" | ||
| } elseif {[variant_isset python34]} { | ||
| set PYTHON_VERSION_WITH_DOT "3.4" | ||
| } elseif {[variant_isset python35]} { | ||
| set PYTHON_VERSION_WITH_DOT "3.5" | ||
| } elseif {[variant_isset python36]} { | ||
| set PYTHON_VERSION_WITH_DOT "3.6" | ||
| } else { | ||
| set PYTHON_VERSION_WITH_DOT "3.7" | ||
| } | ||
| reinplace "s|__PYTHON_VERSION_WITH_DOT__|${PYTHON_VERSION_WITH_DOT}|g" ${worksrcpath}/macports.cmake | ||
This comment has been minimized.
This comment has been minimized.
enekochan
|
||
| } | ||
|
|
||
| @@ -273,48 +262,47 @@ if {[variant_isset gui]} { | ||
| } | ||
|
|
||
| variant docs description {Build documentation: HTML and manpages} { | ||
|
|
||
| configure.args-append \ | ||
| --mandir=share/man \ | ||
| --sphinx-man \ | ||
| --sphinx-html | ||
| --sphinx-html \ | ||
| --sphinx-build=${prefix}/bin/sphinx-build-${PYTHON_VERSION_WITH_DOT} | ||
|
|
||
| depends_build-append \ | ||
| port:py${PYTHON_VERSION_NO_DOT}-sphinx | ||
|
|
||
| # these are required for Py3X, but not Py27 | ||
| if {${PYTHON_VERSION_NO_DOT} ne "27"} { | ||
| depends_build-append \ | ||
| port:py${PYTHON_VERSION_NO_DOT}-sphinxcontrib-applehelp \ | ||
| port:py${PYTHON_VERSION_NO_DOT}-sphinxcontrib-devhelp \ | ||
| port:py${PYTHON_VERSION_NO_DOT}-sphinxcontrib-htmlhelp \ | ||
| port:py${PYTHON_VERSION_NO_DOT}-sphinxcontrib-jsmath \ | ||
| port:py${PYTHON_VERSION_NO_DOT}-sphinxcontrib-qthelp \ | ||
| port:py${PYTHON_VERSION_NO_DOT}-sphinxcontrib-serializinghtml \ | ||
| port:py${PYTHON_VERSION_NO_DOT}-sphinxcontrib-websupport | ||
| } | ||
| } | ||
|
|
||
| variant python27 conflicts python34 python35 python36 requires docs \ | ||
| description {Build documentation using Sphinx from Python 2.7} { | ||
| depends_build-append port:py27-sphinx | ||
| configure.args-append \ | ||
| --sphinx-build=${prefix}/bin/sphinx-build-2.7 | ||
| } | ||
| description {Build documentation using Sphinx from Python 2.7} {} | ||
|
|
||
| variant python34 conflicts python27 python35 python36 python37 requires docs \ | ||
| description {Build documentation using Sphinx from Python 3.4} { | ||
| depends_build-append port:py34-sphinx | ||
| configure.args-append \ | ||
| --sphinx-build=${prefix}/bin/sphinx-build-3.4 | ||
| } | ||
| description {Build documentation using Sphinx from Python 3.4} {} | ||
|
|
||
| variant python35 conflicts python27 python34 python36 python37 requires docs \ | ||
| description {Build documentation using Sphinx from Python 3.5} { | ||
| depends_build-append port:py35-sphinx | ||
| configure.args-append \ | ||
| --sphinx-build=${prefix}/bin/sphinx-build-3.5 | ||
| } | ||
| description {Build documentation using Sphinx from Python 3.5} {} | ||
|
|
||
| variant python36 conflicts python27 python34 python35 python37 requires docs \ | ||
| description {Build documentation using Sphinx from Python 3.6} { | ||
| depends_build-append port:py36-sphinx | ||
| configure.args-append \ | ||
| --sphinx-build=${prefix}/bin/sphinx-build-3.6 | ||
| } | ||
| description {Build documentation using Sphinx from Python 3.6} {} | ||
|
|
||
| variant python37 conflicts python27 python34 python35 python36 requires docs \ | ||
| description {Build documentation using Sphinx from Python 3.7} { | ||
| depends_build-append port:py37-sphinx | ||
| configure.args-append \ | ||
| --sphinx-build=${prefix}/bin/sphinx-build-3.7 | ||
| } | ||
| description {Build documentation using Sphinx from Python 3.7} {} | ||
|
|
||
| if {[variant_isset docs]} { | ||
|
|
||
| # default Python is 2.7 | ||
| if {![variant_isset python27] && | ||
| ![variant_isset python34] && | ||
| ![variant_isset python35] && | ||
| @@ -323,6 +311,7 @@ if {[variant_isset docs]} { | ||
| default_variants +python27 | ||
| } | ||
|
|
||
| # make sure -python27 is not specified alone | ||
| if {![variant_isset python27] && | ||
| ![variant_isset python34] && | ||
| ![variant_isset python35] && | ||
| @@ -331,4 +320,18 @@ if {[variant_isset docs]} { | ||
| ui_error "\n\nYou must select either the +python27, +python34, +python35, +python36, or +python37 variant when using variant +docs.\n" | ||
| return -code error "Invalid variant selection" | ||
| } | ||
|
|
||
| # determine Python-related variables | ||
| if {[variant_isset python27]} { | ||
| set PYTHON_VERSION_WITH_DOT "2.7" | ||
| } elseif {[variant_isset python34]} { | ||
| set PYTHON_VERSION_WITH_DOT "3.4" | ||
| } elseif {[variant_isset python35]} { | ||
| set PYTHON_VERSION_WITH_DOT "3.5" | ||
| } elseif {[variant_isset python36]} { | ||
| set PYTHON_VERSION_WITH_DOT "3.6" | ||
| } else { | ||
| set PYTHON_VERSION_WITH_DOT "3.7" | ||
| } | ||
| set PYTHON_VERSION_NO_DOT [join [split ${PYTHON_VERSION_WITH_DOT} "."] ""] | ||
| } | ||
7 comments
on commit f850901
This comment has been minimized.
This comment has been minimized.
|
There is a problem with this update, it is failing to build.
|
This comment has been minimized.
This comment has been minimized.
|
Yes, the variable is used before it's being set. Have to rethink this. |
This comment has been minimized.
This comment has been minimized.
|
No - that's not right. The variable is only set if the +docs variant is selected. Setting the +docs variant gets things going again. |
This comment has been minimized.
This comment has been minimized.
|
the line
probably just needs to be moved to the docs variant as well ? |
This comment has been minimized.
This comment has been minimized.
|
Yes that’s probably the correct solution. I’ve been in a meeting & can do this in around an hour if someone else hasn’t done it yet - MLD
On Mon, Apr 15, 2019, at 12:17 PM, Chris Jones wrote:
the line
` reinplace "s|__PYTHON_VERSION_WITH_DOT__|${PYTHON_VERSION_WITH_DOT}|g" ${worksrcpath}/macports.cmake
`
… probably just needs to be moved to the docs variant as well ?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <f850901#commitcomment-33183895>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AAJoxCHV0kebSeNLLpEqk9wYJBbyV4-Wks5vhKYBgaJpZM4cwWF0>.
|
This comment has been minimized.
This comment has been minimized.
|
Done. |
This comment has been minimized.
This comment has been minimized.
|
Thx! |
you have removed the lines that set
PYTHON_VERSION_WITH_DOTbut still try and refer to it.