diff options
author | Danny Rawlins <monster.romster@gmail.com> | 2017-02-05 15:09:50 +1100 |
---|---|---|
committer | Danny Rawlins <monster.romster@gmail.com> | 2017-02-05 15:09:50 +1100 |
commit | 98b518ca810aca003505dc1e3a8b90e01f27ab69 (patch) | |
tree | 8061ec8e96c7d03d963cd1f8fe00006b831633bb /python-setuptools/Pkgfile | |
parent | a42a8ea1819d49f76e770a75b00f4c833cf61904 (diff) | |
download | opt-98b518ca810aca003505dc1e3a8b90e01f27ab69.tar.gz opt-98b518ca810aca003505dc1e3a8b90e01f27ab69.tar.xz |
setuptools -> python-setuptools
Diffstat (limited to 'python-setuptools/Pkgfile')
-rw-r--r-- | python-setuptools/Pkgfile | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/python-setuptools/Pkgfile b/python-setuptools/Pkgfile new file mode 100644 index 000000000..5b73e003b --- /dev/null +++ b/python-setuptools/Pkgfile @@ -0,0 +1,43 @@ +# Description: Easily download, build, install, upgrade, and uninstall Python packages. +# URL: https://pypi.python.org/pypi/setuptools +# Maintainer: Danny Rawlins, crux at romster dot me +# Depends on: python-appdirs python-packaging python-pip + +name=python-setuptools +version=34.1.1 +release=1 +#source=(https://github.com/pypa/setuptools/archive/v$version.tar.gz) +source=(https://pypi.python.org/packages/e2/51/3ea582a6d64dcd36858a10de31d43ca8ea0a3be5386dd0caf6503167cdfb/setuptools-$version.zip + https://bootstrap.pypa.io/get-pip.py) + +build() { + cd ${name#*-}-$version + + export SETUPTOOLS_INSTALL_WINDOWS_SPECIFIC_FILES=0 + + if [ "$(pkginfo -i | egrep -c '^python-(setuptools|appdirs|pyparsing|six|pip|packaging) ')" != 6 ]; then + install -d build + /usr/bin/python $SRC/get-pip.py --root=$SRC/build + + local PYTHONVERSION=$(/usr/bin/python -c 'import sys; print("%s.%s" % sys.version_info[:2])') + + PYTHONPATH=$SRC/build/usr/lib/python$PYTHONVERSION/site-packages \ + /usr/bin/python bootstrap.py + + PYTHONPATH=$SRC/build/usr/lib/python$PYTHONVERSION/site-packages \ + /usr/bin/python setup.py build + + PYTHONPATH=$SRC/build/usr/lib/python$PYTHONVERSION/site-packages \ + /usr/bin/python setup.py install \ + --prefix=/usr --root=$PKG --optimize=1 + else + + /usr/bin/python bootstrap.py + /usr/bin/python setup.py build + + /usr/bin/python setup.py install \ + --prefix=/usr --root=$PKG --optimize=1 + fi + + unset SETUPTOOLS_INSTALL_WINDOWS_SPECIFIC_FILES +} |