summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: c25e2547293a960c3de26ec33a46363889325977 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# SPDX-License-Identifier: AGPL-3.0
#
# Maintainer: Pellegrino Prevete <pellegrinoprevete@gmail.com>
# Maintainer: Truocolo <truocolo@aol.com>
# Contributor: Angel Velasquez <angvp@archlinux.org>
# Contributor: Felix Yan <felixonmars@archlinux.org>
# Contributor: Eli Schwartz <eschwartz@archlinux.org>

_py="python2"
_pkg="setuptools"
pkgname="${_py}-${_pkg}"
pkgver=44.1.1
pkgrel=2
epoch=2
pkgdesc="Easily download, build, install, upgrade, and uninstall Python packages"
arch=(
  'any')
license=(
  'PSF')
url="https://pypi.org/project/${_pkg}"
_url="https://github.com/pypa/${_pkg}"
depends=(
  "${_py}")
makedepends=(
  'git'
)
provides=(
  "${_py}-distribute")
replaces=(
  "${_py}-distribute")
source=(
  "${pkgname}-${pkgver}.tar.gz::${_url}/archive/v${pkgver}.tar.gz")
sha512sums=(
  'aabddfbd62b95ce7d8e68d582362361d32b91e65e6d00c393593521a2c1c383552e324ae64974049ae9880072c8741e2393e6482cd07ff7dd30615e91e9e1450')

export \
  SETUPTOOLS_INSTALL_WINDOWS_SPECIFIC_FILES=0

prepare() {
  # Remove post-release tag since we are using stable tags
  sed \
    -e '/tag_build = .post/d' \
    -e '/tag_date = 1/d' \
    -i "${_pkg}-${pkgver}/setup.cfg"

  cd \
    "${srcdir}/${_pkg}-${pkgver}"
  sed \
    -i \
    -e "s|^#\!.*/usr/bin/env python|#!/usr/bin/env ${_py}|" \
    "${_pkg}/command/easy_install.py"
}

build() {
  cd \
    "${_pkg}-${pkgver}"
  "${_py}" \
    bootstrap.py
  "${_py}" \
    setup.py \
      build
}

package() {
  cd \
    "${_pkg}-${pkgver}"
  "${_py}" \
    setup.py \
      install \
      --prefix=/usr \
      --root="${pkgdir}" \
      --optimize=1 \
      --skip-build
  rm \
    -f \
    "${pkgdir}/usr/bin/easy_install"
}

# vim:set sw=2 sts=-1 et: