summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorMark Blakeney2019-07-09 16:55:55 +1000
committerMark Blakeney2019-07-09 18:24:34 +1000
commit9488263c813a64d5a7066ad942bca500271f57dd (patch)
treefeb4c749db2f598bc43f4544959d0cbeabc5c506 /PKGBUILD
parentcfb4faf6fa152a502ee2ea6bd8ef747c03281158 (diff)
downloadaur-9488263c813a64d5a7066ad942bca500271f57dd.tar.gz
Fix embedded versions strings for Arch build
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD11
1 files changed, 10 insertions, 1 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 87360886c83e..7ad637401080 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
_pkgname=ptvsd
pkgname=python-$_pkgname
pkgver=4.2.10
-pkgrel=1
+pkgrel=2
pkgdesc="Python debugger package for use with Visual Studio and Visual Studio Code"
url="https://github.com/microsoft/$_pkgname"
license=("MIT")
@@ -34,8 +34,17 @@ _badfiles=(
build() {
cd $_pkgname-$pkgver
+
+ _vers="$pkgver-$pkgrel-arch"
+ echo "Setting build version to $_vers in $PWD/setup.py"
+ sed -i "/version=/s/=.*/=\'$_vers\',/" setup.py
+
python setup.py build
cd build/lib/$_pkgname
+
+ echo "Setting embedded version to $_vers in $PWD/_version.py"
+ sed -i "/\"version\":/s/\"[^\"]*\"$/\"$_vers\"/" _version.py
+
echo "Removing legacy/unneeded files for Arch Linux .."
for f in "${_badfiles[@]}"; do
rm -v $f