You are not logged in.

#1 2020-04-19 15:31:07

kynguyen98
Member
Registered: 2020-04-19
Posts: 3

[SOLVED]AUR with pip problem

So I created my first AUR package that uses pip to install my software with other dependencies but whenever I uninstall the software with regular pacman it did not remove them, I have to use pip again to uninstall it. Am I dumb to use AUR that uses pip while pip is a package installer or AUR didn't compatible with pip
Here is my code again I'm new so don't judge my build, please 

pkgname=stm32pio
pkgver=1.0.1
pkgrel=1
#epoch=
pkgdesc="Automate managing STM32CubeMX + PlatformIO projects" 
arch=('x86_64')
url="https://github.com/kynguyen98/stm32pio"
license=('MIT')
#groups=()
depends=(python-pip python jre8-openjdk)
makedepends=(git python-pip)
#checkdepends=()
optdepends=('code: for text editing')
#provides=(stm32pio)
#conflicts=()
#replaces=()
#backup=()
#options=()
#install=
#changelog=
source=($url"/archive/v${pkgver}.tar.gz")
#("$pkgname-$pkgver.tar.gz""$pkgname-$pkgver.patch")
#noextract=()
md5sums=('SKIP')
#validpgpkeys=()

#prepare() {
#	cd "$pkgname-$pkgver"
#	patch -p1 -i "$srcdir/$pkgname-$pkgver.patch"
#}

#build() {
#	cd "$pkgname-$pkgver"
#	./configure --prefix=/usr
#	make
#}

#check() {
#	cd "$pkgname-$pkgver"
#	make -k check
#}

package() {
	cd "$srcdir/$pkgname-$pkgver"
#    cd src/stm32pio-1.0
#	make DESTDIR="$srcdir/$pkgname-$pkgver" install
	make install
#    make install --root="$pkgdir/" --optimize=1
}

Last edited by kynguyen98 (2020-04-19 17:15:09)

Offline

#2 2020-04-19 15:36:55

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,520
Website

Re: [SOLVED]AUR with pip problem

So you ran pip as root and installed a bunch of python tools circumventing pacman.  Yes, this was a very bad idea.

You seem aware already that you need to remove these with pip, so I'm not clear what you are asking.  Your only actual question was "Am I dumb" ... do you want an answer?

General PKGBUILD notes:
- That PKGBUILD does almost nothing, and what it does do is wrong.  It creates an empty package, effectively a meta package with some dependencies ... which aren't actually dependencies of the tool you wanted to install
- All the commented lines are highly distracting, get rid of them
- Arch should be any, nothing is compiled
- Python-pip would be a makedepends, but you have it as both make and regular depends.  If a package is in the depends array, it should not also be in makedepends.  Of course in this case, it shouldn't be there at all.
- Git is listed as a makedepends, but git is never used.  Get rid of git.
- 'Code' as an optdepends is ridiculous.  A text editor many be an useful, but there is absolutely no reason to just list your favorite one there.
- Do not 'SKIP' checksums for static sources
- You commented out a proper make call using DESTDIR.  The fact that your makefile would ignore DESTDIR should have been a red flag.  Your package function does not install anything into $pkgdir, so it results in an empty package.

EDIT: I just saw you also uploaded this to the AUR.  If you are still learning, winging it and botching a PKGBUILD on your system is one thing, but please do not upload something to the AUR when it is clear you haven't even glanced at the proper documentation.

Last edited by Trilby (2020-04-19 16:05:32)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2020-04-19 16:02:23

yochananmarqos
Member
Registered: 2020-02-05
Posts: 196

Re: [SOLVED]AUR with pip problem

Please see Python package guidelines and use your setup.py.

Offline

#4 2020-04-19 16:03:18

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

Re: [SOLVED]AUR with pip problem

Mod note: Moving to AUR Issues


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 2020-04-19 16:20:59

kynguyen98
Member
Registered: 2020-04-19
Posts: 3

Re: [SOLVED]AUR with pip problem

Trilby wrote:

So you ran pip as root and installed a bunch of python tools circumventing pacman.  Yes, this was a very bad idea.

You seem aware already that you need to remove these with pip, so I'm not clear what you are asking.  Your only actual question was "Am I dumb" ... do you want an answer?

General PKGBUILD notes:
- That PKGBUILD does almost nothing, and what it does do is wrong.  It creates an empty package, effectively a meta package with some dependencies ... which aren't actually dependencies of the tool you wanted to install
- All the commented lines are highly distracting, get rid of them
- Arch should be any, nothing is compiled
- Python-pip would be a makedepends, but you have it as both make and regular depends.  If a package is in the depends array, it should not also be in makedepends.  Of course in this case, it shouldn't be there at all.
- Git is listed as a makedepends, but git is never used.  Get rid of git.
- 'Code' as an optdepends is ridiculous.  A text editor many be an useful, but there is absolutely no reason to just list your favorite one there.
- Do not 'SKIP' checksums for static sources
- You commented out a proper make call using DESTDIR.  The fact that your makefile would ignore DESTDIR should have been a red flag.  Your package function does not install anything into $pkgdir, so it results in an empty package.

EDIT: I just saw you also uploaded this to the AUR.  If you are still learning, winging it and botching a PKGBUILD on your system is one thing, but please do not upload something to the AUR when it is clear you haven't even glanced at the proper documentation.

Yeah sorry and thank you pointing out my flaw I'll try to do more research about this

Offline

#6 2020-04-19 20:19:05

kynguyen98
Member
Registered: 2020-04-19
Posts: 3

Re: [SOLVED]AUR with pip problem

Thanks guys for letting me know my flaws in the PKGBUILD I have updated my build

Last edited by kynguyen98 (2020-04-19 20:19:36)

Offline

#7 2020-04-19 21:00:08

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,520
Website

Re: [SOLVED]AUR with pip problem

And you uploaded it to the AUR again after only addressing a few of the critiques.

I can acknowledge that you did address a few of them very well, but you seem to have stopped half way.

In addition to the points in my previous post, the current package is missing the license file and the source download name is not unique (see the big red warning box under the "source" section of the wiki page on PKGBUILDs).

Last edited by Trilby (2020-04-19 21:19:31)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

Board footer

Powered by FluxBB