View previous topic :: View next topic |
Author |
Message |
crocket Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
Joined: 29 Apr 2017 Posts: 558
|
Posted: Sat Apr 29, 2017 2:23 pm Post subject: Can anyone check my very short dev-python/td-watson ebuild? |
|
|
This is the first ebuild that I ever wrote. I put it in my local overlay, built it, and installed it successfully.
Code: | EAPI=6
PYTHON_COMPAT=( python2_7 python{3_4,3_5,3_6} )
inherit distutils-r1
DESCRIPTION="A wonderful CLI to track your time!"
HOMEPAGE="https://github.com/TailorDev/Watson"
SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64"
RDEPEND="
=dev-python/arrow-0*[${PYTHON_USEDEP}]
=dev-python/click-6*[${PYTHON_USEDEP}]
=dev-python/requests-2*[${PYTHON_USEDEP}]"
DEPEND=""
|
Because I merely copied some fragments from other python ebuilds, I don't know what the following line means.
Code: | SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz" |
How is
possible? Although I know bash a bit, I really don't understand
Based on requirements.txt, I wrote
Code: | RDEPEND="
=dev-python/arrow-0*[${PYTHON_USEDEP}]
=dev-python/click-6*[${PYTHON_USEDEP}]
=dev-python/requests-2*[${PYTHON_USEDEP}]"
DEPEND=""
|
But, I don't know whether I got dependencies right because I haven't built dev-python/td-watson in a clean gentoo system.
Is there a way to cheaply and cleanly establish a clean gentoo system every time? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Hu Administrator
![Administrator Administrator](/images/ranks/rank-admin.gif)
Joined: 06 Mar 2007 Posts: 21918
|
Posted: Sat Apr 29, 2017 4:39 pm Post subject: |
|
|
mirror:// is a magic protocol that Portage resolves as a list of URLs, where the list chosen depends on the "host" passed to mirror://. In this case, it will pick mirrors associated with PyPI. I believe this list is maintained in /usr/portage/profiles/thirdpartymirrors.
${P:0:1} is a bash substitution. Starting at offset 0, it copies up to 1 character from $P to the output. Try it on a shell variable whose value you know, like $HOME or $USER. Use values other than 0 or 1 to see what happens. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
crocket Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
Joined: 29 Apr 2017 Posts: 558
|
Posted: Sat Apr 29, 2017 11:53 pm Post subject: |
|
|
Hu wrote: | mirror:// is a magic protocol that Portage resolves as a list of URLs, where the list chosen depends on the "host" passed to mirror://. In this case, it will pick mirrors associated with PyPI. I believe this list is maintained in /usr/portage/profiles/thirdpartymirrors.
${P:0:1} is a bash substitution. Starting at offset 0, it copies up to 1 character from $P to the output. Try it on a shell variable whose value you know, like $HOME or $USER. Use values other than 0 or 1 to see what happens. |
Thanks. How do I know I got dependencies right? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Hu Administrator
![Administrator Administrator](/images/ranks/rank-admin.gif)
Joined: 06 Mar 2007 Posts: 21918
|
Posted: Sun Apr 30, 2017 12:22 am Post subject: |
|
|
You could inspect all the files to see exactly what Python modules they require, then verify that all such modules are provided by packages that are listed in your RDEPEND (or are provided by packages that are part of @system).
You could punt and let users report missing dependencies if/when they are found. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|