blob: a0969d24f090fb86f28301a28d5d8a734ab920a7 (
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
|
# WARNING! If you get an error along the lines of
# "error: cannot copy tree 'build/scripts-3.11': not a directory", STOP!
#
# You might be tempted, but do *NOT* `mkdir build/scripts-3.XX`.
#
# This happens because upstream is using the git repo which doesn't have the metadata.
# It doesn't affect upstream because their setuptools already has a directory .egg-info,
# whereas if we have an .egg-info file, then it will result in "error: invalid command 'egg_info'"
# when trying to build any python package that uses setuptools.
#
# That said, let's build from the source tarball which already has the metadata.
# Add the tarball
source[0]="https://pypi.python.org/packages/source/s/setuptools/setuptools-$pkgver.tar.gz"
sha512sums[0]='SKIP'
# Work around the directory name containing the version.
eval "$(
declare -f prepare | \
sed -r 's/cd setuptools;?$/cd setuptools-$pkgver/' | sed '/git /d'
)"
eval "$(
declare -f build | \
sed -r 's/cd setuptools;?$/cd setuptools-$pkgver/'
)"
eval "$(
declare -f package | \
sed -r 's/cd setuptools;?$/cd setuptools-$pkgver/'
)"
eval "$(
declare -f check | \
sed -r 's/cd setuptools;?$/cd setuptools-$pkgver/'
)"
# Skip the last patch as it doesn't apply
eval "$(
declare -f prepare | \
sed '/add-dependency.patch/d'
)"
unset check
|