summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Blakeney2019-07-09 16:55:55 +1000
committerMark Blakeney2019-07-09 18:24:34 +1000
commit9488263c813a64d5a7066ad942bca500271f57dd (patch)
treefeb4c749db2f598bc43f4544959d0cbeabc5c506
parentcfb4faf6fa152a502ee2ea6bd8ef747c03281158 (diff)
downloadaur-9488263c813a64d5a7066ad942bca500271f57dd.tar.gz
Fix embedded versions strings for Arch build
-rw-r--r--.SRCINFO2
-rw-r--r--Makefile2
-rw-r--r--PKGBUILD11
3 files changed, 12 insertions, 3 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 0720039231b7..c57be13fc5da 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = python-ptvsd
pkgdesc = Python debugger package for use with Visual Studio and Visual Studio Code
pkgver = 4.2.10
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/microsoft/ptvsd
arch = x86_64
license = MIT
diff --git a/Makefile b/Makefile
index 9af49826fe04..834f96fcd485 100644
--- a/Makefile
+++ b/Makefile
@@ -18,6 +18,6 @@ sum: $(src)
updpkgsums
clean:
- rm -rf $(inf) $(nam)-* *.tar *.tar.xz *.tar.gz pkg/ src/ *.part
+ rm -rf $(inf) $(nam)-* *.tar *.tar.xz pkg/ src/ *.part
# vim: se ts=4:
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