You are not logged in.

#1 2019-11-22 23:15:25

xanb
Member
Registered: 2012-07-24
Posts: 420

Trying to make a package

I try to create a package from hug. After a lot of errors, I write this PKGBUILD:

$ cat PKGBUILD 
_name="hug"
pkgname=('python-hug')
pkgver='2.4.8'
pkgrel=2
pkgdesc="Embrace the APIs of the future"
url="https://github.com/hugapi/hug"
depends=('python' 'falkon')
makedepends=('python-setuptools')
license=('MIT')
arch=('any')
source=("https://github.com/hugapi/hug/archive/${pkgver}.tar.gz")
sha256sums=('06cd6293fa71e1d101fbb89b8e6816a7c77025801231117f8f73409592db278e')

build() {
	    cd "$srcdir/${_name}-${pkgver}"
	    python setup.py build
	}

package() {
	    depends+=()
	    cd "$srcdir/${_name}-${pkgver}"
		python setup.py install --root="$pkgdir" --optimize=1
	    }

but it seems hug depends on falkon 1 because after running hug application I get:

 _build_master
    ws.require(__requires__)
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 900, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 786, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'falcon==1.4.1' distribution was not found and is required by hug

Anyone could help me to write PKGBUILD definitively? Is this true that it depends on falkon=1.4.1. In github, it says it depends on 2.0.0.

Thanks in advance,


Owning one OpenRC (artoo way) and other three systemd machines

Offline

#2 2019-11-22 23:37:49

loqs
Member
Registered: 2014-03-06
Posts: 19,097

Re: Trying to make a package

The requirements from master is 2.0.0 but the PKGBUILD is using 2.4.8 release so https://github.com/hugapi/hug/blob/2.4. … common.txt

Offline

#3 2019-11-22 23:39:30

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: Trying to make a package

The current version depends on 2.0.0 whereas the old version which you are building does indeed depend on 1.4.1......
https://github.com/hugapi/hug/blob/2.4. … common.txt

Do you have a reason for trying to build an old version of hug instead of the latest?


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#4 2019-11-23 12:55:13

xanb
Member
Registered: 2012-07-24
Posts: 420

Re: Trying to make a package

Slithery wrote:

The current version depends on 2.0.0 whereas the old version which you are building does indeed depend on 1.4.1......
https://github.com/hugapi/hug/blob/2.4. … common.txt

Do you have a reason for trying to build an old version of hug instead of the latest?

Thanks a lot. I just put this version because it appears in the web page (right top corner). Modifying the PKGBUILD with latest version (which depends on falkon 2.0.0,) ) I get:

 hug -f 
Traceback (most recent call last):
  File "/usr/bin/hug", line 6, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3251, in <module>
    def _initialize_master_working_set():
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3234, in _call_aside
    f(*args, **kwargs)
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3263, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 583, in _build_master
    ws.require(__requires__)
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 900, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 786, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'falcon==2.0.0' distribution was not found and is required by hug

My PKGBUILD is

 cat PKGBUILD 
_name="hug"
pkgname=('python-hug')
pkgver='2.6.0'
pkgrel=1
pkgdesc="Embrace the APIs of the future"
url="https://github.com/hugapi/hug"
depends=('python' 'falkon')
makedepends=('python-setuptools')
license=('MIT')
arch=('any')
source=("https://github.com/hugapi/hug/archive/${pkgver}.tar.gz")
sha256sums=('c54b04ed5ce0e436ddf9e8e00f838b4ed740a914cf3af9bef055e11375fc1ebe')

build() {
	    cd "$srcdir/${_name}-${pkgver}"
	    python setup.py build
	}

package() {
	    depends+=()
	    cd "$srcdir/${_name}-${pkgver}"
		python setup.py install --root="$pkgdir" --optimize=1
	    }

Is there any way to  patch `common`file and specify that falkon should be >= 2.0,0 and not == 2.0.0?

Thanks,

Last edited by xanb (2019-11-23 13:03:39)


Owning one OpenRC (artoo way) and other three systemd machines

Offline

#5 2019-11-23 13:13:36

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

Re: Trying to make a package

The package you are trying to build depends on falcon which is a python web framework.  But you listed in the dependencies, falkon, which is a web browser.  The current release of falcon is 2.0.0.

Last edited by Trilby (2019-11-23 13:14:58)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#6 2019-11-23 16:13:24

xanb
Member
Registered: 2012-07-24
Posts: 420

Re: Trying to make a package

Trilby wrote:

The package you are trying to build depends on falcon which is a python web framework.  But you listed in the dependencies, falkon, which is a web browser.  The current release of falcon is 2.0.0.

Mmmm... Sorry.
Which is falcon package?


Owning one OpenRC (artoo way) and other three systemd machines

Offline

#7 2019-11-23 16:24:07

progandy
Member
Registered: 2012-05-17
Posts: 5,321

Re: Trying to make a package

xanb wrote:

Which is falcon package?

Most likely it will have "falcon" in its name. It may be called python-falcon since it is a framework for python.  If it isn't available in the official repositories, then you can look in the AUR. If you cannot find it, then you'll have to create your own package for that as well.

Last edited by progandy (2019-11-23 16:25:08)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |

Offline

#8 2019-11-23 17:10:30

loqs
Member
Registered: 2014-03-06
Posts: 19,097

Re: Trying to make a package

Offline

#9 2019-11-23 21:46:21

xanb
Member
Registered: 2012-07-24
Posts: 420

Re: Trying to make a package

Thanks a lot,
So the PKGBUILD will be:

_name="hug"
pkgname=('python-hug')
pkgver='2.6.0'
pkgrel=2
pkgdesc="Embrace the APIs of the future"
url="https://github.com/hugapi/hug"
depends=('python' 'python-falcon')
makedepends=('python-setuptools')
license=('MIT')
arch=('any')
source=("https://github.com/hugapi/hug/archive/${pkgver}.tar.gz")
sha256sums=('c54b04ed5ce0e436ddf9e8e00f838b4ed740a914cf3af9bef055e11375fc1ebe')

build() {
	    cd "$srcdir/${_name}-${pkgver}"
	    python setup.py build
	}

package() {
	    depends+=()
	    cd "$srcdir/${_name}-${pkgver}"
		python setup.py install --root="$pkgdir" --optimize=1
	    }

Owning one OpenRC (artoo way) and other three systemd machines

Offline

#10 2019-11-23 22:05:03

xanb
Member
Registered: 2012-07-24
Posts: 420

Re: Trying to make a package

After all of your comments, I submit the PKGBUILD to AUR but it seems it does not have git repo. How can I solve that?


Owning one OpenRC (artoo way) and other three systemd machines

Offline

#11 2019-11-23 22:20:14

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: Trying to make a package

By reading the AUR wiki page...


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#12 2019-11-23 22:28:41

progandy
Member
Registered: 2012-05-17
Posts: 5,321

Re: Trying to make a package

xanb wrote:

but it seems it does not have git repo. How can I solve that?

Please don't stop reading after seeing "404 - Page not found". There is more information on that error page.

Note: Git clone URLs are not meant to be opened in a browser.


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |

Offline

Board footer

Powered by FluxBB