File tree Expand file tree Collapse file tree 2 files changed +21
-5
lines changed Expand file tree Collapse file tree 2 files changed +21
-5
lines changed Original file line number Diff line number Diff line change 13
13
exit 1
14
14
else
15
15
source " ${ROOT} /bin/dist-functions"
16
- check_file " ${DIST} /neo4j-driver-${VERSION} .tar.gz"
17
- check_file " ${DIST} /neo4j-${VERSION} .tar.gz"
16
+ for PACKAGE in " neo4j-driver" " neo4j" ; do
17
+ NORMALIZED_PACKAGE=" $( normalize_dist_name " $PACKAGE " ) "
18
+ if ! (check_file " ${DIST} /${NORMALIZED_PACKAGE} -${VERSION} .tar.gz" \
19
+ || check_file " ${DIST} /${PACKAGE} -${VERSION} .tar.gz" ); then
20
+ STATUS=1
21
+ fi
22
+ done
18
23
fi
19
24
20
25
exit ${STATUS}
Original file line number Diff line number Diff line change @@ -39,16 +39,23 @@ function set_deprecated {
39
39
sed -i ' s/^deprecated_package = .*/deprecated_package = ' $1 ' /g' " ${SRC} /neo4j/_meta.py"
40
40
}
41
41
42
+ # distribution normalization according to PEP 625 https://peps.python.org/pep-0625/
43
+ function normalize_dist_name
44
+ {
45
+ echo $1 | sed ' s/[._-]\+/_/g' | tr ' [:upper:]' ' [:lower:]'
46
+ }
47
+
42
48
function check_file
43
49
{
44
50
FILE=$1
45
- echo -n " Checking file $( basename ${FILE} ) ... "
51
+ echo -n " Checking file $( basename " ${FILE} " ) ... "
46
52
if [ -f " ${FILE} " ]
47
53
then
48
54
echo " OK"
55
+ return 0
49
56
else
50
57
echo " missing"
51
- STATUS= 1
58
+ return 1
52
59
fi
53
60
}
54
61
@@ -100,7 +107,11 @@ function set_metadata_and_setup
100
107
find . -name * .pyc -delete
101
108
rm -rf " ${SRC} /*.egg-info" 2> /dev/null
102
109
python -m build $*
103
- check_file " ${DIST} /${PACKAGE} -${VERSION} .tar.gz"
110
+ NORMALIZED_PACKAGE=" $( normalize_dist_name $PACKAGE ) "
111
+ if ! (check_file " ${DIST} /${NORMALIZED_PACKAGE} -${VERSION} .tar.gz" \
112
+ || check_file " ${DIST} /${PACKAGE} -${VERSION} .tar.gz" ); then
113
+ STATUS=1
114
+ fi
104
115
105
116
trap - EXIT
106
117
cleanup
You can’t perform that action at this time.
0 commit comments