You are not logged in.

#1 2020-07-23 08:34:29

Helg1980
Member
From: Königsberg
Registered: 2020-07-23
Posts: 37

[SOLVED] Installation path in PKGBUILD

Hi,
Tell me please, how to correctly specify the installation path in PKGBUILD,
using the command setup.py to install the program in the usr/lib/${pkgname folder}

My option:

```
build() {
  cd "${srcdir}/cine-encoder-${pkgver}"
 
  python setup.py install --install-dir="/usr/lib/${pkgname}"
}

```

Is non-working.

Last edited by Helg1980 (2020-09-04 13:00:03)

Offline

#2 2020-07-23 08:54:19

StJimmy
Member
From: De Lage Landen
Registered: 2020-02-26
Posts: 71

Re: [SOLVED] Installation path in PKGBUILD

Firstly, it would be a good idea to wrap your code in code tags, which makes it easier to read.

Secondly, as far as I know, you're not supposed to use full paths in that way, as the command would directly install to /usr/lib, creating files not tracked by Pacman that may cause conflicts down the road. That's what ${pkgdir} is for.
The fact you're getting an error when it runs that command makes sense - you're trying to write to a system location as a normal user.

Last edited by StJimmy (2020-07-23 08:55:49)


Nanos gigantum humeris insidentes.

Offline

#3 2020-07-23 09:07:56

Helg1980
Member
From: Königsberg
Registered: 2020-07-23
Posts: 37

Re: [SOLVED] Installation path in PKGBUILD

I really appreciate your time, please tell me please how to correctly specify the location of the program.

Last edited by Helg1980 (2020-07-23 09:08:20)

Offline

#4 2020-07-23 09:18:07

StJimmy
Member
From: De Lage Landen
Registered: 2020-02-26
Posts: 71

Re: [SOLVED] Installation path in PKGBUILD

What you're asking can be found under the man page for PKGBUILD, i.e.

man PKGBUILD

and of course, the wiki page


Nanos gigantum humeris insidentes.

Offline

#5 2020-07-23 09:54:53

Helg1980
Member
From: Königsberg
Registered: 2020-07-23
Posts: 37

Re: [SOLVED] Installation path in PKGBUILD

The whole problem with documentation is that it is not good enough, there is no example for my case. Therefore, I turned to the forum and not because I have nothing to do ....

Offline

#6 2020-07-23 10:17:01

schard
Member
From: Hannover
Registered: 2016-05-06
Posts: 1,932
Website

Re: [SOLVED] Installation path in PKGBUILD

There are plenty of python packages in the official repos and the AUR that you can take as a template.
Furhtermore, the Wiki documents the general packaging very well.
Don't be a help vampire.

Offline

#7 2020-07-23 10:53:19

Helg1980
Member
From: Königsberg
Registered: 2020-07-23
Posts: 37

Re: [SOLVED] Installation path in PKGBUILD

one day you will need help, and I will write you the same thing

Offline

#8 2020-07-23 11:16:03

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

Re: [SOLVED] Installation path in PKGBUILD

Helg1980 wrote:

Is non-working.

Is not an error message.

Aside from the aforementioned PKGBUILD documentation, see also: https://wiki.archlinux.org/index.php/Py … guidelines


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

#9 2020-07-23 11:33:12

Helg1980
Member
From: Königsberg
Registered: 2020-07-23
Posts: 37

Re: [SOLVED] Installation path in PKGBUILD

The problem is that the documentation specifies the installation path:

$pkgdir/usr/lib/python3.8/site-packages/$pkgname directory.



It turns out that if Python is updated, my package will not work, and I want to install it in a different folder, for example:

"usr/lib/${pkgname}/" or "opt/${pkgname}/"



but no matter what I do, the package is still installed in the folder:

$pkgdir/usr/lib/python3.8/site-packages/$pkgname directory.

Last edited by Helg1980 (2020-07-23 11:41:05)

Offline

#10 2020-07-23 11:41:00

schard
Member
From: Hannover
Registered: 2016-05-06
Posts: 1,932
Website

Re: [SOLVED] Installation path in PKGBUILD

Helg1980 wrote:

It turns out that if Python is updated, my package will not work, and I want to install it in a different folder, for example

"usr/lib/${pkgname}/" or "opt/${pkgname}/"

This is intentional. If there's a new major python version released, all python packages need to be rebuild.

Helg1980 wrote:

but no matter what I do, the package is still installed in the folder

$pkgdir/usr/lib/python3.8/site-packages/$pkgname directory.

That's where it belongs.

Offline

#11 2020-07-23 11:42:31

Helg1980
Member
From: Königsberg
Registered: 2020-07-23
Posts: 37

Re: [SOLVED] Installation path in PKGBUILD

Now understand. Thanks!

Offline

Board footer

Powered by FluxBB