You are not logged in.

#1 2013-07-25 22:16:22

asymptote
Member
Registered: 2013-07-25
Posts: 7

makechrootpkg & configure.py script

I have source I want to package that contains a "configure.py" script.

sudo makechrootpkg -c -r $CHROOT
. . .
==> Starting build()...
/usr/bin/env: python: No such file or directory
==> ERROR: A failure occurred in build().
    Aborting...
    ==> ERROR: Build failed, check /home/xxx/chroot/xxx/build

The offending script:

configure.py: #! /usr/bin/env python

PKGBUILD contains:

build() {
        cd "$srcdir/$pkgname-$pkgver"
       ./configure.py 
        make
}

The package will build if I omit the python script.
It just looks at cpuinfo and  optimizes the build flags.

Any help appreciated!

Offline

#2 2013-07-25 22:19:47

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,787
Website

Re: makechrootpkg & configure.py script

Have you got python listed as a dependency or make-dependency in the PKGBUILD?

EDIT: Assuming that python 3 is the python that the script requires. If at all possible, you should petition the developers/maintainers of the script to be less ambiguous. "/usr/bin/env python" will result in a python 2 or python 3 interpreter, depending on which system you're using. Arch uses python 3 as "python". If the script requires python 2, you will need to modify the shebang (using sed in the PKGBUILD, for example) to reflect this. Unless you can get the change made upstream, of course.

Last edited by WorMzy (2013-07-25 22:25:41)


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#3 2013-07-25 22:32:25

asymptote
Member
Registered: 2013-07-25
Posts: 7

Re: makechrootpkg & configure.py script

WorMzy wrote:

Have you got python listed as a dependency or make-dependency in the PKGBUILD?

No.

I didn't think "depends" applied in this case.
I interpreted it as a dependancy nessary to run on the installed system rather than to the build process.

Do I just specify 'python' in  the depends array?

Edit: actually the scripts runs under both version. - Tried that.

Last edited by asymptote (2013-07-25 22:34:40)

Offline

#4 2013-07-25 22:36:25

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,787
Website

Re: makechrootpkg & configure.py script

If it is required for the running of the finished package, it should be in the depends array. If it is only required for the building of the final package, it should be in the makedepends array. If it is required for building and/or optionally required for the final package, it should be in the makedepends and optdepends arrays.

Last edited by WorMzy (2013-07-25 22:36:36)


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#5 2013-07-25 22:57:52

asymptote
Member
Registered: 2013-07-25
Posts: 7

Re: makechrootpkg & configure.py script

WorMzy wrote:

If it is required for the running of the finished package, it should be in the depends array. If it is only required for the building of the final package, it should be in the makedepends array. If it is required for building and/or optionally required for the final package, it should be in the makedepends and optdepends arrays.

I used the makedepends array and that solved the issue.

Thank you!

Offline

Board footer

Powered by FluxBB