[aur-general] Help with python-magic-wormhole PKGBUILD

Eli Schwartz eschwartz at archlinux.org
Mon Dec 10 17:21:19 UTC 2018


On 12/10/18 12:19 PM, Eli Schwartz wrote:
> On 12/10/18 12:15 PM, Eli Schwartz wrote:
>> On 12/10/18 11:54 AM, Storm Dragon via aur-general wrote:
>>> So just to make sure, this all boils down to, this shouldn't be a split
>>> package, and the probablem with taholafs should be solved by that
>>> package maintainer instead of depending on me? Would it be ok to unsplit
>>> the package and go back to a python3 only distribution now?
>>
>> If taholafs requires the ability to "import wormhole" in a python2
>> program, then it is fine to provide a split package.
>>
>> However, the split python2 package should only contain the library
>> module, and should rm -rf "${pkgdir}"/usr/bin
>>
>> ...
>>
>> Is taholafs not in the AUR? There are no AUR packages which depend on
>> magic-wormhole, and I cannot find anything when searching for "taholafs".
> 
> I've written up an untested PKGBUILD that expresses what I believe you
> want. Note how I've fixed up the url and the two package names it
> provides, and installed the LICENSE file which you *must* install for
> MIT-licensed software.
> 
> Also note the addition of the testsuite, and the reliance on a dummy
> array _deps=() to track the twelve module dependencies, which are super
> annoying to enter four times over.
> 
> paste: https://paste.xinu.at/DsTdAi/
> 
> inline:
> 
> # Maintainer: Storm Dragon <stormdragon2976 at gmail.com>
> # Contributor: Eli Schwartz <eschwartz at archlinux.org>
> 
> pkgbase=magic-wormhole
> pkgname=('magic-wormhole' 'python2-magic-wormhole')
> pkgver=0.11.2
> pkgrel=1
> pkgdesc="Securely transfer data between computers"
> arch=('any')
> url="https://magic-wormhole.readthedocs.io/en/latest/welcome.html"
> license=('MIT')
> _deps=('autobahn' 'click' 'cffi' 'hkdf' 'humanize' 'idna' 'ipaddress'
> 'pynacl'
>        'service-identity' 'spake2' 'tqdm' 'txtorcon')
> makedepends=('python2-setuptools' 'python-setuptools')
> checkdepends=("${_deps[@]/#/python-}" "${_deps[@]/#/python2-}"
> 'python-mock' 'python2-mock')
> source=("https://files.pythonhosted.org/packages/source/${pkgbase::1}/${pkgbase}/${pkgbase}-${pkgver}.tar.gz")
> sha512sums=('890c0f1f946dfd9a9bde2ec0079c55dc23b328e04780e6baf8c580dfd068bf37a5b2e00e12119be6529a6e0893d4f711145e04c349ccfdf7ef91e87cef785d36')
> 
> build() {
>   cd "${srcdir}/${_pkgname}-${pkgver}"
>   python setup.py build
>   python2 setup.py build
> }
> 
> check() {
>   cd "${srcdir}/${_pkgname}-${pkgver}"
> 
>   python setup.py test
>   python2 setup.py test
> }
> 
> package_magic-wormhole() {
>   pkgdesc="Securely transfer data between computers"
>   depends=("${_deps[@]/#/python-}")
>   cd "${srcdir}/${_pkgname}-${pkgver}"
> 
>   python2 setup.py install --root="${pkgdir}/" --optimize=1

This is obviously a copy-paste error and must be "python".

>   install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
> }
> 
> package_python2-magic-wormhole() {
>   pkgdesc="Library to securely transfer data between computers"
>   depends=("${_deps[@]/#/python2-}")
>   cd "${srcdir}/${_pkgname}-${pkgver}"
> 
>   python2 setup.py install --root="${pkgdir}/" --optimize=1
>   rm -rf "${pkgdir}"/usr/bin
>   install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
> }
> 
> 


-- 
Eli Schwartz
Bug Wrangler and Trusted User

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.archlinux.org/pipermail/aur-general/attachments/20181210/ceedc68d/attachment.asc>


More information about the aur-general mailing list