You are not logged in.

#1 2018-05-18 02:11:45

johnramsden
Member
Registered: 2017-08-07
Posts: 31

[SOLVED] Python packaging accompanying libraries not in AUR/repo

I have a python package that I have an accompanying library for. At this point no one is using the accompanying library except for me, so I don't think it would be useful to package it for Arch. What would be the recommended way of packaging my application? I read through the wiki but it didn't mention anything about libraries that were not in Arch or pypi.

What I have tried doing is adding my library as a git source, and then installing it, but when I have tried that I get the following error when I try to run my package:

pkg_resources.DistributionNotFound: The '<mylibrary>' distribution was not found and is required by <mypackage>

What I've tried doing is cloning my library, and then installing it the way the wiki describes.

For example:

package() {
        cd "${srcdir}/<mylibrary>"
        PIP_CONFIG_FILE=/dev/null pip install . --isolated --root="$pkgdir" --ignore-installed --no-deps

        cd "${srcdir}/${pkgname%-git}"
        PIP_CONFIG_FILE=/dev/null pip install . --isolated --root="$pkgdir" --ignore-installed --no-deps
}

I've tried a few ways that create a package, but the resulting package doesn't work. Is there a way to bundle a library in this manner without adding it to the AUR? If that's really the best option it's what I'll do but I'm sure there's also a way to install an accompanying Library without putting it in the AUR.

Part of the reason I'm not ready to add it to the AUR is that I'm still testing the program, but I'd like to be able to install it on my system with its dependencies.

Well I just install with pip in a venv, everything works fine, so I know the application works.

Last edited by johnramsden (2018-05-18 05:36:35)

Offline

#2 2018-05-18 02:33:50

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: [SOLVED] Python packaging accompanying libraries not in AUR/repo

Which package, what libraries, can we see a PKGBUILD that exactly reproduces your issue, etc.

Also why do you think you need pip? The usual way to install python things is with python setup.py install --root=$pkgdir, whereas pip is specifically mentioned "if you need it, e.g. for installing wheel packages".

Also you don't install *any* packages from PyPI, so the wiki doesn't mention doing so. It does mention some tips on how to download source tarballs from PyPI, but once past that it is all setuptools.

You can of course install your library as a separate PKGBUILD and a separate package; no rule says you are required to also upload it to the AUR.


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#3 2018-05-18 05:36:12

johnramsden
Member
Registered: 2017-08-07
Posts: 31

Re: [SOLVED] Python packaging accompanying libraries not in AUR/repo

I was going by the wiki mentioning installing it with pip, I had also tried wheel install method.

I ended up finding the solution to the error above being installing from an old branch where my library was named differently. As for installing the accompanying package, i've made a separate PKGBUILD and will just go with that method since it doesn't seem like your intended to install more than one thing in the same PKGBUILD.

Thanks for your help.

Offline

Board footer

Powered by FluxBB