install doc with python group

classic Classic list List threaded Threaded
5 messages Options
db
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

install doc with python group

db
Which is the proper way to install documentation with python group?

This boilerplate works for the subport but not if I install the main port.

post-destroot {
    set docdir ${prefix}/share/${subport}
    xinstall -d ${destroot}${docdir}
    xinstall -m 644 -W ${worksrcpath} \
        CHANGES.txt \
        LICENSE \
        README.rst \
        ${destroot}${docdir}
}

Here's an extract from the log.

:debug:destroot Executing org.macports.destroot (py-setuptools_hg)
:debug:destroot system: echo py-setuptools_hg is a stub port > /opt/local/var/macports/build/_opt_local_myports_python_py-setuptools_hg/py-setuptools_hg/work/destroot/opt/local/share/doc/py-setuptools_hg/README
:debug:destroot Executing proc-post-org.macports.destroot-destroot-0
:info:destroot xinstall: mkdir /opt/local/var/macports/build/_opt_local_myports_python_py-setuptools_hg/py-setuptools_hg/work/destroot/opt/local/share/py-setuptools_hg
:error:destroot Failed to destroot py-setuptools_hg: xinstall: Unable to chdir to /opt/local/var/macports/build/_opt_local_myports_python_py-setuptools_hg/py-setuptools_hg/work/setuptools_hg-0.4, No such file or directory
:debug:destroot Error code: NONE
:debug:destroot Backtrace: xinstall: Unable to chdir to /opt/local/var/macports/build/_opt_local_myports_python_py-setuptools_hg/py-setuptools_hg/work/setuptools_hg-0.4, No such file or directory
:debug:destroot     while executing
:debug:destroot "$post $targetname"
:error:destroot See /opt/local/var/macports/logs/_opt_local_myports_python_py-setuptools_hg/py-setuptools_hg/main.log for details.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: install doc with python group

Joshua Root-8
On 2017-7-10 22:45 , db wrote:

> Which is the proper way to install documentation with python group?
>
> This boilerplate works for the subport but not if I install the main port.
>
> post-destroot {
>      set docdir ${prefix}/share/${subport}
>      xinstall -d ${destroot}${docdir}
>      xinstall -m 644 -W ${worksrcpath} \
>          CHANGES.txt \
>          LICENSE \
>          README.rst \
>          ${destroot}${docdir}
> }
>
> Here's an extract from the log.
>
> :debug:destroot Executing org.macports.destroot (py-setuptools_hg)
> :debug:destroot system: echo py-setuptools_hg is a stub port > /opt/local/var/macports/build/_opt_local_myports_python_py-setuptools_hg/py-setuptools_hg/work/destroot/opt/local/share/doc/py-setuptools_hg/README
> :debug:destroot Executing proc-post-org.macports.destroot-destroot-0
> :info:destroot xinstall: mkdir /opt/local/var/macports/build/_opt_local_myports_python_py-setuptools_hg/py-setuptools_hg/work/destroot/opt/local/share/py-setuptools_hg
> :error:destroot Failed to destroot py-setuptools_hg: xinstall: Unable to chdir to /opt/local/var/macports/build/_opt_local_myports_python_py-setuptools_hg/py-setuptools_hg/work/setuptools_hg-0.4, No such file or directory
> :debug:destroot Error code: NONE
> :debug:destroot Backtrace: xinstall: Unable to chdir to /opt/local/var/macports/build/_opt_local_myports_python_py-setuptools_hg/py-setuptools_hg/work/setuptools_hg-0.4, No such file or directory
> :debug:destroot     while executing
> :debug:destroot "$post $targetname"
> :error:destroot See /opt/local/var/macports/logs/_opt_local_myports_python_py-setuptools_hg/py-setuptools_hg/main.log for details.

Only the subports like py27-setuptools_hg and py35-setuptools_hg are
supposed to install any files. py-setuptools_hg is a stub port, and as
such has no distfiles and thus no extracted sources.

- Josh
db
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: install doc with python group

db
On 11 Jul 2017, at 14:44, Joshua Root <[hidden email]> wrote:
> Only the subports like py27-setuptools_hg and py35-setuptools_hg are supposed to install any files. py-setuptools_hg is a stub port, and as such has no distfiles and thus no extracted sources.

I know why it fails. The stub port does install the subport as a dependency though (first one of python.versions, I guess, which is not clear-cut in the guide). I suppose I could change ${worksrcpath} — how would you make the subport install the documentation when installing the stub port?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: install doc with python group

Rainer Müller-4
On 2017-07-11 15:23, db wrote:
> On 11 Jul 2017, at 14:44, Joshua Root <[hidden email]> wrote:
>> Only the subports like py27-setuptools_hg and py35-setuptools_hg are supposed to install any files. py-setuptools_hg is a stub port, and as such has no distfiles and thus no extracted sources.
>
> I know why it fails. The stub port does install the subport as a dependency though (first one of python.versions, I guess, which is not clear-cut in the guide). I suppose I could change ${worksrcpath} — how would you make the subport install the documentation when installing the stub port?

Do not install any additional files in the stub port. Wrap your code in
a section that is only executed when installing the subport:

if {${subport} ne ${name}} {
    post-destroot {
        ...
    }
}

Rainer
db
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: install doc with python group

db
On 11 Jul 2017, at 15:45, Rainer Müller <[hidden email]> wrote:
> Wrap your code in a section that is only executed when installing the subport:
> if {${subport} ne ${name}} {
>    post-destroot {

D'oh! Of course that did it. Thanks for point that out.
Loading...