LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   compiling wicd-1.7.4 to individual directory (https://www.linuxquestions.org/questions/slackware-14/compiling-wicd-1-7-4-to-individual-directory-4175584880/)

sithun 07-17-2016 09:10 AM

compiling wicd-1.7.4 to individual directory
 
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?

gmgf 07-17-2016 09:49 AM

Why ? you have a package here:

http://slackware.osuosl.org/slackwar...nt/extra/wicd/

mlangdn 07-18-2016 05:00 AM

I'm not a python expert but i think this will work:

Code:

python setup.py install --prefix=/my/prefix

sithun 07-22-2016 05:02 AM

Quote:

Originally Posted by gmgf (Post 5577348)

because i want to learn how to compile it.


Quote:

Originally Posted by mlangdn (Post 5577707)
I'm not a python expert but i think this will work:

Code:

python setup.py install --prefix=/my/prefix

i did it and have error: bad install directory or PYTHONPATH

gmgf 07-22-2016 05:31 AM

wicd is a daemon, i don't think it's a good exemple for a beginner ;)

Alien Bob 07-22-2016 05:33 AM

Come on, use your brain.
If there is a Slackware package, there's also its build script. Reading that script will teach you how to compile the package.
See http://slackware.osuosl.org/slackwar...icd.SlackBuild

gmgf 07-22-2016 06:14 AM

Quote:

Originally Posted by Alien Bob (Post 5579759)
Come on, use your brain.
If there is a Slackware package, there's also its build script. Reading that script will teach you how to compile the package.
See http://slackware.osuosl.org/slackwar...icd.SlackBuild

you can listen to a great master.

sithun 07-22-2016 08:20 AM

Quote:

Originally Posted by gmgf (Post 5579758)
wicd is a daemon, i don't think it's a good exemple for a beginner ;)

but must be a way to compile it

Quote:

Originally Posted by Alien Bob (Post 5579759)
Come on, use your brain.
If there is a Slackware package, there's also its build script. Reading that script will teach you how to compile the package.
See http://slackware.osuosl.org/slackwar...icd.SlackBuild

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'


Quote:

Originally Posted by gmgf (Post 5579765)
you can listen to a great master.

i will

bassmadrigal 07-22-2016 08:54 AM

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...

sithun 07-22-2016 10:43 AM

Quote:

Originally Posted by bassmadrigal (Post 5579844)
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

bassmadrigal 07-22-2016 12:14 PM

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.

sithun 07-23-2016 04:01 AM

Quote:

Originally Posted by bassmadrigal (Post 5579920)
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.


my thanks for all who helped me


All times are GMT -5. The time now is 02:24 AM.