[SOLVED] compiling wicd-1.7.4 to individual directory
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
usually when i compile package i do make install DESTDIR=, but when i unpacked wicd-1.7.4 i saw unusual for me setup.py. in output of python setup.py --help i do not found something about selection of installation directory. how can i compile it to individual directory?
sorry, i use gnu/linux only for few week and do not understood many things. i read this script and run python setup.py configure --no-install-kde --no-install-gnome-shell-extensions, python setup.py build. then, read output of console i compile and install babel and pytz, after try again to build wicd i have error: OSError:[Errno 2] No such file or directory: '/usr/lib64/python2.7/site-packages/babel/locale-data'
If you run the SlackBuild, it will compile wicd for you. There is no magic being done, you can read through the script and see exactly what it's accomplishing.
But, your last post confused me. Am I understanding that you did successfully compile wicd, then installed babel and pytz, then tried to recompile wicd again (why? if it completed the first time), but it failed this time?
Maybe providing some more output of your errors might give us some insight on what is going wrong.
Maybe you could also provide us your goal behind compiling wicd rather than just using the pre-compiled binary that Pat provided...
If you run the SlackBuild, it will compile wicd for you. There is no magic being done, you can read through the script and see exactly what it's accomplishing.
But, your last post confused me. Am I understanding that you did successfully compile wicd, then installed babel and pytz, then tried to recompile wicd again (why? if it completed the first time), but it failed this time?
Maybe providing some more output of your errors might give us some insight on what is going wrong.
Maybe you could also provide us your goal behind compiling wicd rather than just using the pre-compiled binary that Pat provided...
no, i can not compile wicd because it is require pybabel after i run python setup.py build. i compiled babel and next that wicd required was pytz. i compiled it too
Looking at the SlackBuild, Pat builds wicd without pybabel (which I assume is a combination of babel and pytz, but I'm too lazy to research that) by using a patch and for loop.
Code:
# Bypass the need for pybabel (thanks, dapal!)
zcat $CWD/manually-compile-translations.diff.gz | patch -p1 || exit 1
for pofile in $(find po/ -type f -name "*.po") ; do
mkdir -p translations/$(basename ${pofile} .po)/LC_MESSAGES
msgfmt -o translations/$(basename ${pofile} .po)/LC_MESSAGES/wicd.mo ${pofile}
done
The patch removes a few sections from the setup.py file that compiles translations and then does them using the for loop.
After running that patch and for loop, you should be able to compile wicd using the following (assuming you're running 64bit, otherwise remove the 64 from the two lib dirs). You could also remove the kde section if you want, but it shouldn't matter even if you don't have kde installed. However, Pat also applies two other patches, wicd-1421918.patch.gz and curses_bitrate_fix.patch.gz, both of which could affect your usage of wicd once it's compiled, so I'd recommend using those patches. They're available on the link Alien Bob provided and the patch commands are in the SlackBuild.
Code:
python setup.py configure \
--lib=/usr/lib64/wicd \
--kdedir=/usr/share/autostart \
--backends=/usr/lib64/wicd/backends \
--no-install-gnome-shell-extensions
python setup.py install
---or--
python setup.py install --root=$PKG # if you want to install it to a temporary directory to create a Slackware package
Reading through the SlackBuild provides you everything you need to do to compile wicd on Slackware. pybabel usage has not been tested on Slackware since wicd is specifically patched to not use that, so if you insist to go that route, I couldn't tell you whether it is going to work or not.
But, considering you're only a few weeks into Linux, personally, I wouldn't jump this deep into compiling software (trying to get pybabel working on wicd on Slackware when it's been pretty much untested and specifically patched out of the official package) until you have a good feel for how it all works. If you do still want to pursue this, we can try to help, but you need to give us more information, like the output of your commands when they fail. We can't do much with vague wording without error messages.
Long story short, when there's a SlackBuild available, it is almost always recommended to use that to build software unless you're specifically trying to enable something that isn't default. But even then, you can usually just modify the SlackBuild to suit your purposes rather than starting over from scratch and reinventing the wheel.
Looking at the SlackBuild, Pat builds wicd without pybabel (which I assume is a combination of babel and pytz, but I'm too lazy to research that) by using a patch and for loop.
Code:
# Bypass the need for pybabel (thanks, dapal!)
zcat $CWD/manually-compile-translations.diff.gz | patch -p1 || exit 1
for pofile in $(find po/ -type f -name "*.po") ; do
mkdir -p translations/$(basename ${pofile} .po)/LC_MESSAGES
msgfmt -o translations/$(basename ${pofile} .po)/LC_MESSAGES/wicd.mo ${pofile}
done
The patch removes a few sections from the setup.py file that compiles translations and then does them using the for loop.
After running that patch and for loop, you should be able to compile wicd using the following (assuming you're running 64bit, otherwise remove the 64 from the two lib dirs). You could also remove the kde section if you want, but it shouldn't matter even if you don't have kde installed. However, Pat also applies two other patches, wicd-1421918.patch.gz and curses_bitrate_fix.patch.gz, both of which could affect your usage of wicd once it's compiled, so I'd recommend using those patches. They're available on the link Alien Bob provided and the patch commands are in the SlackBuild.
Code:
python setup.py configure \
--lib=/usr/lib64/wicd \
--kdedir=/usr/share/autostart \
--backends=/usr/lib64/wicd/backends \
--no-install-gnome-shell-extensions
python setup.py install
---or--
python setup.py install --root=$PKG # if you want to install it to a temporary directory to create a Slackware package
Reading through the SlackBuild provides you everything you need to do to compile wicd on Slackware. pybabel usage has not been tested on Slackware since wicd is specifically patched to not use that, so if you insist to go that route, I couldn't tell you whether it is going to work or not.
But, considering you're only a few weeks into Linux, personally, I wouldn't jump this deep into compiling software (trying to get pybabel working on wicd on Slackware when it's been pretty much untested and specifically patched out of the official package) until you have a good feel for how it all works. If you do still want to pursue this, we can try to help, but you need to give us more information, like the output of your commands when they fail. We can't do much with vague wording without error messages.
Long story short, when there's a SlackBuild available, it is almost always recommended to use that to build software unless you're specifically trying to enable something that isn't default. But even then, you can usually just modify the SlackBuild to suit your purposes rather than starting over from scratch and reinventing the wheel.
thanks a lot, it is work, i check, but my way was little another. at first i tried to create blank file nano /usr/lib64/python2.7/site-packages/babel/locale-data . then python setup.py build of wicd said me that locale-data not a directory. well, rm /usr/lib64/python2.7/site-packages/babel/locale-data&&mkdir /usr/lib64/python2.7/site-packages/babel/locale-data . python setup.py build said: "RuntimeError: The Babel data files are not available. This usually happens because you are using a source checkout from Babel and you did not build the data files. Just make sure to run "python setup.py import_cldr" before installing the library.". i went to babel source directory and saw that python setup.py import_cldr required internet connection. using iw i connected to wi-fi and repeat. after installation of recompiled babel package wicd was compiled without errors.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.