[SOLVED] problem with slkbuild

You have a problem with Salix? Post here and we'll do what we can to help.
Post Reply
tasodan
Posts: 25
Joined: 6. Jan 2010, 09:43

[SOLVED] problem with slkbuild

Post by tasodan »

I've a problem with slkbuild, i want to create a package txz of this: But the source code doesn't use the classical sequence configure ---> make ---> make install, but "python setup.py install", so this was the build section of SLKBUILD that I've created:

Code: Select all

build() {
	cd $startdir/src/$pkgname-$pkgver
	python setup.py install -O1 --root="$startdir/pkg" --prefix=/usr
}
This creates file build-poackage.sh but it doesn't run:

Code: Select all

root[trash-cli]# sh build-package.sh 
tar -xf package.tar.gz
Traceback (most recent call last):
  File "setup.py", line 27, in <module>
    from setuptools import setup 
ImportError: No module named setuptools
build() failed.
How can I adjust my SLKBUILD?

EDIT: I solved installing setuptools...ahahah :mrgreen:
User avatar
thenktor
Salix Wizard
Posts: 2426
Joined: 6. Jun 2009, 14:47
Location: Franconia
Contact:

Re: problem with slkbuild

Post by thenktor »

Yes, not a slkbuild but a python problem ;)
Image
burnCDDA (burns audio CDs)
geBIERt (German beer blog)
Shador
Posts: 1295
Joined: 11. Jun 2009, 14:04
Location: Bavaria

Re: [SOLVED] problem with slkbuild

Post by Shador »

Usually before packaging a program, it's recommendable to build it "manually". As the last message told you your build() function failed and that's (almost) always your fault.
In this case it's as simple as installing my setuptools package from the repo (setuptools is afaik always build-time only dependency). :P
The error message is quite clear about it, too. Oh and don't panic due to errors, reading it solves the problem usually much faster and saves much time. :)
Image
User avatar
thenktor
Salix Wizard
Posts: 2426
Joined: 6. Jun 2009, 14:47
Location: Franconia
Contact:

Re: [SOLVED] problem with slkbuild

Post by thenktor »

Shador wrote:Usually before packaging a program, it's recommendable to build it "manually".
Not really needed. Just add a "|| return 1" after every important command (e.g. configure, make) and if something goes wrong you'll see the same error message as in a manual build immediately.
Image
burnCDDA (burns audio CDs)
geBIERt (German beer blog)
Shador
Posts: 1295
Joined: 11. Jun 2009, 14:04
Location: Bavaria

Re: [SOLVED] problem with slkbuild

Post by Shador »

thenktor wrote:
Shador wrote:Usually before packaging a program, it's recommendable to build it "manually".
Not really needed. Just add a "|| return 1" after every important command (e.g. configure, make) and if something goes wrong you'll see the same error message as in a manual build immediately.
That was not my point. It's make sense to know how to build a program before actually packaging it. This means for me that one has the deps installed, too.

Anyway that's what he already got, as it was the last command. Good tip though. :)
I already thought about using 'set -e' in my build scripts, which would exit on any error (with exceptions of course like ||, !, if, ...). This would force the exact opposite because for any "allowed" failure one had to append a "|| true".
Image
User avatar
thenktor
Salix Wizard
Posts: 2426
Joined: 6. Jun 2009, 14:47
Location: Franconia
Contact:

Re: [SOLVED] problem with slkbuild

Post by thenktor »

Yes, you're right. It may be a good idea to build manually first. :idea:
I've done this in the past, too. But in the meanwhile I've packages so much stuff, that I start right from the beginning with slkbuild. You just get used to such things ;)
Image
burnCDDA (burns audio CDs)
geBIERt (German beer blog)
toothandnail
Posts: 165
Joined: 20. Sep 2009, 17:30
Location: Oxfordshire, UK

Re: [SOLVED] problem with slkbuild

Post by toothandnail »

I find that my most frequent problems are making sure that everyting goes in the right place (so docs in /usr/doc/<pkgname>-<pkgver>, .dekstop in /usr/share/applications, etc). As a result, I always use slkbuild first. If it generates a package, I check the package for location specific stuff, then try the package out if everything had gone to the correct place.

Running the build-<pkgname> script with '2>&1 | tee build<pkgname>.log' means that I usually have a record of any configure or build errors anyway, so it is usually a last resort to try to build the application manually.

paul.
User avatar
thenktor
Salix Wizard
Posts: 2426
Joined: 6. Jun 2009, 14:47
Location: Franconia
Contact:

Re: [SOLVED] problem with slkbuild

Post by thenktor »

toothandnail wrote:Running the build-<pkgname> script with '2>&1 | tee build<pkgname>.log' means that I usually have a record of any configure or build errors anyway, so it is usually a last resort to try to build the application manually.
Try "slkbuild -X" ;)
Image
burnCDDA (burns audio CDs)
geBIERt (German beer blog)
Post Reply