Skip to content

Commit 8d1279c

Browse files
committed
out of tree build
1 parent ef326b3 commit 8d1279c

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

python/PKGBUILD

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,12 @@ prepare() {
9797
}
9898

9999
build() {
100-
cd "${srcdir}/Python-${pkgver}"
101-
102100
export MSYSTEM=CYGWIN
103-
./configure \
101+
102+
mkdir -p "${srcdir}/build-${MSYSTEM}"
103+
cd "${srcdir}/build-${MSYSTEM}"
104+
105+
"${srcdir}/Python-${pkgver}"/configure \
104106
--prefix=/usr \
105107
--build=${CHOST} \
106108
--host=${CHOST} \
@@ -119,16 +121,16 @@ build() {
119121
}
120122

121123
check() {
122-
cd "${srcdir}/Python-${pkgver}"
123-
"${srcdir}/Python-${pkgver}/python.exe" -m test.regrtest -x test_posixpath test_logging
124+
cd "${srcdir}/build-${MSYSTEM}"
125+
"./python.exe" -m test.regrtest -x test_posixpath test_logging
124126
}
125127

126128
package_python() {
127129
depends=('libbz2' 'libexpat' 'libffi' 'liblzma' 'ncurses' 'libopenssl' 'libreadline' 'mpdecimal' 'libsqlite' 'zlib' 'libxcrypt')
128130
provides=('python3')
129131
replaces=('python3')
130132

131-
cd "${srcdir}/Python-${pkgver}"
133+
cd "${srcdir}/build-${MSYSTEM}"
132134
make DESTDIR="${pkgdir}" install
133135

134136
# Why are these not done by default...
@@ -143,7 +145,7 @@ package_python() {
143145
install -Dm644 "$srcdir"/EXTERNALLY-MANAGED -t "${pkgdir}/usr/lib/python${_pybasever}/"
144146

145147
# License
146-
install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
148+
install -Dm644 "${srcdir}/Python-${pkgver}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
147149
}
148150

149151
package_python-devel() {

0 commit comments

Comments
 (0)