Re: What should be in scripts shebangs for python2?
On, Thu Feb 20, 2014, Lev Serebryakov wrote: > Hello, Marcus. > You wrote 20 февраля 2014 г., 12:06:46: > > MvA> No, USE_PYTHON_BUILD=2 should provide lang/python2, which will install > MvA> /usr/local/bin/python2. This works for many ports, so I have no idea, > MvA> what's wrong > It works locally, but "pkg-fallout-buil...@freebsd.org" sends me e-mails, > where I see, that its software installs python27 but not python2 as dependency > and it fails: > > http://beefy2.isc.freebsd.org/bulk/91amd64-default/2014-02-19_20h54m43s/logs/libopencm3-0.0.20140213.log I can't recreate this in a local poudriere environment, so I have no idea, what is going on on the build cluster. Excerpt from the local build: [...] ===> Returning to build of libopencm3-0.0.20140218 ===> libopencm3-0.0.20140218 depends on executable: python2 - not found ===>Verifying install for python2 in /usr/ports/lang/python2 ===> Installing existing package /packages/All/python2-2_2.txz Installing python2-2_2... done ===> Returning to build of libopencm3-0.0.20140218 ===> libopencm3-0.0.20140218 depends on executable: gmake - [...] The port looks fine, make all-depends-list correctly lists lang/python2, stage builds work and all my poudriere installations handle it properly. My best guess is, that something on the build cluster (or that specific instance) goes wrong. Cheers Marcus pgpkhqo1RyBxj.pgp Description: PGP signature
Re: What should be in scripts shebangs for python2?
Hello, Marcus. You wrote 20 февраля 2014 г., 12:06:46: MvA> No, USE_PYTHON_BUILD=2 should provide lang/python2, which will install MvA> /usr/local/bin/python2. This works for many ports, so I have no idea, MvA> what's wrong It works locally, but "pkg-fallout-buil...@freebsd.org" sends me e-mails, where I see, that its software installs python27 but not python2 as dependency and it fails: http://beefy2.isc.freebsd.org/bulk/91amd64-default/2014-02-19_20h54m43s/logs/libopencm3-0.0.20140213.log MvA> with your port. Do you mind to send me a shar of the port, so I can MvA> have a look? It is committed, devel/libopencm3 Thank you! -- // Black Lion AKA Lev Serebryakov ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"
Re: What should be in scripts shebangs for python2?
Lev Serebryakov : Hello, Marcus. You wrote 19 февраля 2014 г., 19:55:00: MvA> In short: MvA> * Use ${PYTHON_CMD} to replace the shebang lines or references of the MvA> python command So, it is not possible to use "static" patch? It is pity :( It should be avoided, if possible. Especially, when it is a shebang line, since we have a quite powerful mechanism to replace shebangs with minimal effort. MvA> * Use the proper supported python version (yes for any, 2 or 3 for a MvA> branch, X.Y for a release) MvA>for USE_PYTHON_BUILD I've hoped, that USE_PYTHON_BUILD=2 guarantee me, that here is /usr/local/bin/python2 in system, but looks like it depends on something else. No, USE_PYTHON_BUILD=2 should provide lang/python2, which will install /usr/local/bin/python2. This works for many ports, so I have no idea, what's wrong with your port. Do you mind to send me a shar of the port, so I can have a look? [...] Cheers Marcus ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"
Re: What should be in scripts shebangs for python2?
Hello, Marcus. You wrote 19 февраля 2014 г., 19:55:00: MvA> In short: MvA> * Use ${PYTHON_CMD} to replace the shebang lines or references of the MvA> python command So, it is not possible to use "static" patch? It is pity :( MvA> * Use the proper supported python version (yes for any, 2 or 3 for a MvA> branch, X.Y for a release) MvA>for USE_PYTHON_BUILD I've hoped, that USE_PYTHON_BUILD=2 guarantee me, that here is /usr/local/bin/python2 in system, but looks like it depends on something else. On my system I get "lang/python2" dependency: # make build-depends-list /usr/ports/devel/gcc-arm-embedded /usr/ports/devel/gmake /usr/ports/lang/python2 /usr/ports/lang/python27 /usr/ports/ports-mgmt/pkg # But port building cluster fails (it doesn't try to install python2 at all): ===> libopencm3-0.0.20140213 depends on file: /usr/local/bin/python2.7 - not found ===>Verifying install for /usr/local/bin/python2.7 in /usr/ports/lang/python27 ===> Installing existing package /packages/All/python27-2.7.6_2.txz Installing python27-2.7.6_2...Installing gettext-0.18.3.1... done done Note that some of the standard modules are provided as separate ports since they require extra dependencies: bsddb databases/py-bsddb gdbmdatabases/py-gdbm sqlite3 databases/py-sqlite3 tkinter x11-toolkits/py-tkinter Install them as needed. ===> Returning to build of libopencm3-0.0.20140213 ===> libopencm3-0.0.20140213 depends on executable: gmake - not found ===> Building for libopencm3-0.0.20140213 GENHDR include/libopencm3/sam/3n/irq.json env: python2: No such file or directory gmake: *** [include/libopencm3/sam/3n/irq.json.genhdr] Error 127 -- // Black Lion AKA Lev Serebryakov ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"
Re: What should be in scripts shebangs for python2?
Lev Serebryakov : Hello, Freebsd-ports. My port uses some pythons scripts to configure (it is not pythonn-related by itself, only authors of this software use python scripts on build stage). How should I patch these scripts to work? It looks like /usr/local/bin/python2 is installed by devel/python2 port, and USE_PYTHON_BUILD=yes doesn't depends on this port, but on python27, which USE_PYTHON_BUILD=yes indicates that the port supports any python version, no matter, if the user chooses python2.X or python3.x as the default for the system. If your port is compatible with any python version and only uses python for configuring some bits, but does *not* need python at run-time, you should patch the scripts to use ${PYTHON_CMD}, via a ${REINPLACE_CMD} or the proper python_CMD= ${PYTHON_CMD} command for the shebang USES. If your port is only compatible for a specific branch (either 2.x OR 3.x), use the proper major number for USE_PYTHON_BUILD, e.g. USE_PYTHON_BUILD=2. If the port is only compatible with a specific release (e.g. 3.2), use USE_PYTHON_BUILD=X.Y. For those cases, you also can rely on ${PYTHON_CMD}, which points to whatever is the most appropriate version. In short: * Use ${PYTHON_CMD} to replace the shebang lines or references of the python command * Use the proper supported python version (yes for any, 2 or 3 for a branch, X.Y for a release) for USE_PYTHON_BUILD could be changed in future or by users's request, so I don't want to hardcode /usr/local/bin/python2.7, too... Indeed, do not do this. Cheers Marcus ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"
Re: What should be in scripts shebangs for python2?
On Wed, 19 Feb 2014 19:02:01 +0400 Lev Serebryakov wrote: > Hello, Freebsd-ports. > > My port uses some pythons scripts to configure (it is not pythonn-related > by itself, only authors of this software use python scripts on build > stage). > > How should I patch these scripts to work? It looks like > /usr/local/bin/python2 is installed by devel/python2 port, and > USE_PYTHON_BUILD=yes doesn't depends on this port, but on python27, which > could be changed in future or by users's request, so I don't want to > hardcode /usr/local/bin/python2.7, too... > I think it would be #!/usr/bin/env python2 -- // // Serpent7776 // ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"
What should be in scripts shebangs for python2?
Hello, Freebsd-ports. My port uses some pythons scripts to configure (it is not pythonn-related by itself, only authors of this software use python scripts on build stage). How should I patch these scripts to work? It looks like /usr/local/bin/python2 is installed by devel/python2 port, and USE_PYTHON_BUILD=yes doesn't depends on this port, but on python27, which could be changed in future or by users's request, so I don't want to hardcode /usr/local/bin/python2.7, too... -- // Black Lion AKA Lev Serebryakov ___ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"