Package Details: python-url-normalize 1.4.3-17

Git Clone URL: https://aur.archlinux.org/python-url-normalize.git (read-only, click to copy)
Package Base: python-url-normalize
Description: URL normalization for Python
Upstream URL: https://github.com/niksite/url-normalize
Keywords: normalization uri
Licenses: MIT
Submitter: Kernald
Maintainer: carlosal1015 (JWCook, AutoUpdateBot)
Last Packager: carlosal1015
Votes: 8
Popularity: 0.000000
First Submitted: 2021-05-05 00:38 (UTC)
Last Updated: 2023-05-05 17:33 (UTC)

Latest Comments

« First ‹ Previous 1 2 3 4 Next › Last »

carlosal1015 commented on 2021-09-22 21:13 (UTC)

You are right @wuggen, the quick fix is for me to remove or comment on it, but let me do some more research.

wuggen commented on 2021-09-22 19:27 (UTC)

@carlosal1015 To be clear, I used an AUR helper to install the makedeps, but I used makepkg directly to build python-url-normalize. For the sake of completeness, I've just gone through and manually installed all of the AUR makedeps with makepkg and pacman, and then built python-url-normalize again with makepkg, with the same effect; no .py files are in the tarball.

I did however find that if I set BUILDDIR to /tmp/makepkg, then the package builds correctly. (The default /etc/makepkg.conf does not assign BUILDDIR a value at all; there's a commented-out assignment to it as a demonstration/suggestion.)

I see in the PKGBUILD that you set PYTHONPYCACHEPREFIX based on the value of BUILDDIR, but it seems that packages can't rely on BUILDDIR being set. Could that be the problem?

carlosal1015 commented on 2021-09-22 17:06 (UTC)

I really appreciate the information shared @JWCook, the problem that happens to the other people who have commented before is possibly that they are using an aur helper and not makepkg directly.

I am convinced that python-requests-cache maintenance will improve this week when it is 2 weeks flagged-out-of-date and will be transferred to another maintainer.

JWCook commented on 2021-09-22 16:12 (UTC)

Hi @carlosal1015, I don't have much experience with packaging for AUR specifically, but I'll help out if I can.

To get a little more context, is this build more difficult mainly because url-normalize doesn't include tests in its sdist on PyPI, so you have to use the source tarball from GitHub instead? At least that was a problem mentioned when packaging this for openSUSE: https://github.com/reclosedev/requests-cache/issues/221#issuecomment-817389295

carlosal1015 commented on 2021-09-22 05:06 (UTC) (edited on 2021-09-22 13:18 (UTC) by carlosal1015)

Thank you very much @wuggen, I found quite differences from my side building (see line 274, 331 and lines 35, 91 from paste.bin), will be nice try building with makepkg since aur helpers are not supported, I am doing manual build process.

I notice that the aur helper is tweaking the default values from /etc/makepkg.conf since BUILDIR is /home/aidan/.manual_install/aur/. Please do ls -R /home/aidan/.manual_install/aur and save in paste.bin.

If this time put the *.py file inside tarball, then we will create an issue for the respective aur helper.

I added as maintainer JWCook of python-requests-cache here since he has experience packaging for conda-forge.

wuggen commented on 2021-09-22 04:16 (UTC) (edited on 2021-09-22 04:40 (UTC) by wuggen)

@carlosal1015 Here's some output: https://pastebin.com/HMwf8XTy

Further info:

  • This is with a fresh clone of https://aur.archlinux.org/python-url-normalize.git, no PKGBUILD customizations.
  • I don't have pip installed globally; any global python packages are installed through pacman.
  • My /etc/makepkg.conf is the default installed with the pacman 6.0.1-2 package.

EDIT: did a dumb thing with checking the $pkgdir for .py files, here's a more convincing check than what's in the pastebin:

$ find pkg -name '*.py'
# No output

carlosal1015 commented on 2021-09-22 03:37 (UTC) (edited on 2021-09-22 03:49 (UTC) by carlosal1015)

Hi @wuggen, could you please share some value information in https://pastebin.com like the output of

$ git clone https://aur.archlinux.org/python-url-normalize.git
$ cd python-url-normalize
$ makepkg -s

also, the /etc/makepkg.conf and look the tarball, according the same output of @shanewstone, are you using the PKGBUILD from 1.4.3-6 or a custom? Record the screen and upload to youtube, vimeo could helps too.

Rebuilding now:

.BUILDINFO
.MTREE
.PKGINFO
usr/
usr/lib/
usr/lib/python3.9/
usr/lib/python3.9/site-packages/
usr/lib/python3.9/site-packages/url_normalize/
usr/lib/python3.9/site-packages/url_normalize-1.4.3.dist-info/
usr/lib/python3.9/site-packages/url_normalize-1.4.3.dist-info/LICENSE
usr/lib/python3.9/site-packages/url_normalize-1.4.3.dist-info/METADATA
usr/lib/python3.9/site-packages/url_normalize-1.4.3.dist-info/RECORD
usr/lib/python3.9/site-packages/url_normalize-1.4.3.dist-info/WHEEL
usr/lib/python3.9/site-packages/url_normalize/__init__.py
usr/lib/python3.9/site-packages/url_normalize/tools.py
usr/lib/python3.9/site-packages/url_normalize/url_normalize.py
usr/share/
usr/share/licenses/
usr/share/licenses/python-url-normalize/
usr/share/licenses/python-url-normalize/LICENSE

Also, could share output of pip list and pacman -Qs python-. If for example the BUILDDIR is /tmp/makepkg (look /etc/makepkg.conf), could you show ls -R /tmp/makepkg and show if the *.py is located out of $pkgdir path.

wuggen commented on 2021-09-22 03:24 (UTC)

@carlosal1015 PKGBUILD is still broken, it's only installing the following for me:

$ pacman -Ql python-url-normalize
python-url-normalize /usr/
python-url-normalize /usr/lib/
python-url-normalize /usr/lib/python3.9/
python-url-normalize /usr/lib/python3.9/site-packages/
python-url-normalize /usr/lib/python3.9/site-packages/url_normalize-1.4.3.dist-info/
python-url-normalize /usr/lib/python3.9/site-packages/url_normalize-1.4.3.dist-info/LICENSE
python-url-normalize /usr/lib/python3.9/site-packages/url_normalize-1.4.3.dist-info/METADATA
python-url-normalize /usr/lib/python3.9/site-packages/url_normalize-1.4.3.dist-info/RECORD
python-url-normalize /usr/lib/python3.9/site-packages/url_normalize-1.4.3.dist-info/WHEEL
python-url-normalize /usr/share/
python-url-normalize /usr/share/licenses/
python-url-normalize /usr/share/licenses/python-url-normalize/
python-url-normalize /usr/share/licenses/python-url-normalize/LICENSE

carlosal1015 commented on 2021-08-24 14:01 (UTC) (edited on 2021-08-24 15:22 (UTC) by carlosal1015)

Thank you so much @shanewstone, I tested with pkgrel version 6, could you confirm if it is compiling python-url-normalize 1.4.3-6 with makepkg or yay/aur or the configuration of /etc/makepkg.conf for look this behavior? With first one, the full content is here:

$ tar -I zstd -xvf python-url-normalize-1.4.3-6-any.pkg.tar.zst
.BUILDINFO
.MTREE
.PKGINFO
usr/
usr/lib/
usr/lib/python3.9/
usr/lib/python3.9/site-packages/
usr/lib/python3.9/site-packages/url_normalize/
usr/lib/python3.9/site-packages/url_normalize-1.4.3.dist-info/
usr/lib/python3.9/site-packages/url_normalize-1.4.3.dist-info/LICENSE
usr/lib/python3.9/site-packages/url_normalize-1.4.3.dist-info/METADATA
usr/lib/python3.9/site-packages/url_normalize-1.4.3.dist-info/RECORD
usr/lib/python3.9/site-packages/url_normalize-1.4.3.dist-info/WHEEL
usr/lib/python3.9/site-packages/url_normalize/__init__.py
usr/lib/python3.9/site-packages/url_normalize/tools.py
usr/lib/python3.9/site-packages/url_normalize/url_normalize.py
usr/share/
usr/share/licenses/
usr/share/licenses/python-url-normalize/
usr/share/licenses/python-url-normalize/LICENSE

With second version is here and we have

[aur@0037fe8bc2af ~]$ yay -Ql python-url-normalize
python-url-normalize /usr/
python-url-normalize /usr/lib/
python-url-normalize /usr/lib/python3.9/
python-url-normalize /usr/lib/python3.9/site-packages/
python-url-normalize /usr/lib/python3.9/site-packages/url_normalize-1.4.3.dist-info/
python-url-normalize /usr/lib/python3.9/site-packages/url_normalize-1.4.3.dist-info/LICENSE
python-url-normalize /usr/lib/python3.9/site-packages/url_normalize-1.4.3.dist-info/METADATA
python-url-normalize /usr/lib/python3.9/site-packages/url_normalize-1.4.3.dist-info/RECORD
python-url-normalize /usr/lib/python3.9/site-packages/url_normalize-1.4.3.dist-info/WHEEL
python-url-normalize /usr/lib/python3.9/site-packages/url_normalize/
python-url-normalize /usr/lib/python3.9/site-packages/url_normalize/__init__.py
python-url-normalize /usr/lib/python3.9/site-packages/url_normalize/tools.py
python-url-normalize /usr/lib/python3.9/site-packages/url_normalize/url_normalize.py
python-url-normalize /usr/share/
python-url-normalize /usr/share/licenses/
python-url-normalize /usr/share/licenses/python-url-normalize/
python-url-normalize /usr/share/licenses/python-url-normalize/LICENSE

I'm glad you were able to solve it yourself. Do not forget to add makedependency, like this https://github.com/archlinux/svntogit-community/blob/packages/jedi-language-server/trunk/PKGBUILD, for help to know how to install. If you think the check() function is unnecessary, then I can comment these lines on it so everyone is happy.

shanewstone commented on 2021-08-24 02:57 (UTC) (edited on 2021-08-24 02:59 (UTC) by shanewstone)

I am not sure why, but this PKGBUILD does not install any of the actual python files for this package... A simple import url_normalize in a python REPL fails as well. None of the long list of make dependencies are actually necessary, either, as far as I can tell. Try a pacman -Ql python-url-normalize:

python-url-normalize /usr/
python-url-normalize /usr/lib/
python-url-normalize /usr/lib/python3.9/
python-url-normalize /usr/lib/python3.9/site-packages/
python-url-normalize /usr/lib/python3.9/site-packages/url_normalize-1.4.3.dist-info/
python-url-normalize /usr/lib/python3.9/site-packages/url_normalize-1.4.3.dist-info/LICENSE
python-url-normalize /usr/lib/python3.9/site-packages/url_normalize-1.4.3.dist-info/METADATA
python-url-normalize /usr/lib/python3.9/site-packages/url_normalize-1.4.3.dist-info/RECORD
python-url-normalize /usr/lib/python3.9/site-packages/url_normalize-1.4.3.dist-info/WHEEL
python-url-normalize /usr/share/
python-url-normalize /usr/share/licenses/
python-url-normalize /usr/share/licenses/python-url-normalize/
python-url-normalize /usr/share/licenses/python-url-normalize/LICENSE

A very minimal PKGBUILD which works just fine (albeit lacking checks):

_pkgname=url-normalize
pkgname=python-${_pkgname}
pkgdesc="URL normalization for Python"
pkgver=1.4.3
pkgrel=7
arch=('any')
url="https://github.com/niksite/${_pkgname}"
license=(MIT)
depends=(python-six)
source=("$pkgname-$pkgver.tar.gz::${url}/archive/${pkgver}.tar.gz")
sha512sums=('46eaa1753b37e89d56cb19818144a7cf5b38653811720eb506732c35bb3732ef0c556420b22a9ee2c08e70e5b408aab7f44cea5e15d1ebe3d717c0c77706bfb8')

package() {

  cd "${_pkgname}-${pkgver}"

  install -Dm644 url_normalize/*.py -t "${pkgdir}/usr/lib/python3.9/site-packages/url_normalize"

  install -Dm644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
}

results in a file list for the package (pacman -Ql python-url-normalize):

python-url-normalize /usr/
python-url-normalize /usr/lib/
python-url-normalize /usr/lib/python3.9/
python-url-normalize /usr/lib/python3.9/site-packages/
python-url-normalize /usr/lib/python3.9/site-packages/url_normalize/
python-url-normalize /usr/lib/python3.9/site-packages/url_normalize/__init__.py
python-url-normalize /usr/lib/python3.9/site-packages/url_normalize/tools.py
python-url-normalize /usr/lib/python3.9/site-packages/url_normalize/url_normalize.py
python-url-normalize /usr/share/
python-url-normalize /usr/share/licenses/
python-url-normalize /usr/share/licenses/python-url-normalize/
python-url-normalize /usr/share/licenses/python-url-normalize/LICENSE