APKBUILD examples:Python: Difference between revisions
Dubiousjim (talk | contribs) (Category:Python) |
mNo edit summary |
||
| Line 14: | Line 14: | ||
python setup.py install --prefix=/usr --root="$pkgdir" || return 1 | python setup.py install --prefix=/usr --root="$pkgdir" || return 1 | ||
} | } | ||
</pre> | |||
Source located at [http://pypi.python.or PyPi] | |||
<pre> | |||
_pkgname=ShortName | |||
... | |||
source="http://pypi.python.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz" | |||
</pre> | </pre> | ||
[[Category:Development]] [[Category:Python]] | [[Category:Development]] [[Category:Python]] | ||
Revision as of 16:43, 6 August 2012
A lot of Python packages use the distutils framework. This mean that the build() and the package() section looks a bit different compared to an application which uses make.
depends="python"
makedepends="python-dev"
...
build() {
cd "$_builddir"
python setup.py build || return 1
}
package() {
cd "$_builddir"
python setup.py install --prefix=/usr --root="$pkgdir" || return 1
}
Source located at PyPi
_pkgname=ShortName
...
source="http://pypi.python.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"