This is an automated email from the ASF dual-hosted git repository.
mgrigorov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/avro.git
The following commit(s) were added to refs/heads/master by this push:
new 032d5ac07 AVRO-3865, AVRO-3866: [Build][Perl][Python] Refer to
share/VERSION.txt rather than copy it (#2508)
032d5ac07 is described below
commit 032d5ac07d94c8b07376793f3d35e6f54aedb499
Author: Kousuke Saruta <[email protected]>
AuthorDate: Fri Sep 22 17:53:20 2023 +0900
AVRO-3865, AVRO-3866: [Build][Perl][Python] Refer to share/VERSION.txt
rather than copy it (#2508)
---
lang/perl/MANIFEST | 1 -
lang/perl/Makefile.PL | 7 +------
lang/perl/build.sh | 1 -
lang/py/build.sh | 5 ++---
4 files changed, 3 insertions(+), 11 deletions(-)
diff --git a/lang/perl/MANIFEST b/lang/perl/MANIFEST
index bc8f9341a..d308e85ea 100644
--- a/lang/perl/MANIFEST
+++ b/lang/perl/MANIFEST
@@ -41,7 +41,6 @@ META.yml
LICENSE
NOTICE
README
-VERSION.txt
t/00_compile.t
t/01_names.t
t/01_schema.t
diff --git a/lang/perl/Makefile.PL b/lang/perl/Makefile.PL
index 69447e565..ffac5e9d1 100644
--- a/lang/perl/Makefile.PL
+++ b/lang/perl/Makefile.PL
@@ -19,12 +19,7 @@ use Config;
use inc::Module::Install;
my $version;
-for ('VERSION.txt', '../../share/VERSION.txt') {
- if (-f) {
- $version = `cat $_`;
- last;
- }
-}
+$version = `cat ../../share/VERSION.txt`;
chomp $version;
license 'apache';
diff --git a/lang/perl/build.sh b/lang/perl/build.sh
index 2b689276b..e7634dbab 100755
--- a/lang/perl/build.sh
+++ b/lang/perl/build.sh
@@ -58,7 +58,6 @@ case "$target" in
;;
dist)
- cp ../../share/VERSION.txt .
perl ./Makefile.PL && make dist
;;
diff --git a/lang/py/build.sh b/lang/py/build.sh
index 83eafe16c..d022d67a6 100755
--- a/lang/py/build.sh
+++ b/lang/py/build.sh
@@ -27,7 +27,6 @@ clean() {
'*.avsc' \
'*.egg-info' \
'*.py[co]' \
- 'VERSION.txt' \
'__pycache__' \
'.tox' \
'avro/test/interop' \
@@ -53,8 +52,8 @@ dist() (
doc() {
local doc_dir
- [[ -s VERSION.txt ]] || cp ../../share/VERSION.txt .
- doc_dir="../../build/avro-doc-$(<VERSION.txt)/api/py"
+ local version=$(cat ../../share/VERSION.txt)
+ doc_dir="../../build/avro-doc-$version/api/py"
python3 -m tox -e docs
mkdir -p "$doc_dir"
cp -a docs/build/* "$doc_dir"