Compare commits
No commits in common. "14aa8def2ebd43497e98f8ebab4a10f2663a4a17" and "771878775ef024bba2434bc37c9117fbc25f4d6a" have entirely different histories.
14aa8def2e
...
771878775e
1 changed files with 40 additions and 52 deletions
92
py.pypi.sh
92
py.pypi.sh
|
@ -41,59 +41,47 @@ tmp="${root}/tmp"
|
||||||
rm --force --recursive \
|
rm --force --recursive \
|
||||||
~/.cache/pip "${root}"
|
~/.cache/pip "${root}"
|
||||||
|
|
||||||
for version in "3.10" "3.11" "3.12"; do
|
python3 -m pip \
|
||||||
export VIRTUAL_ENV="/prj/venv/${version}"
|
download \
|
||||||
export OLD_PATH="${PATH}"
|
--dest "${root}" \
|
||||||
export PATH="${VIRTUAL_ENV}/bin:${PATH}"
|
"${@}"
|
||||||
|
|
||||||
sub="${root}/${version}"
|
prefix="Name: "
|
||||||
|
for wheel in "${root}/"*; do
|
||||||
python -m pip \
|
echo
|
||||||
download \
|
echo "${wheel}"
|
||||||
--dest "${sub}" \
|
file="$(basename "${wheel}")"
|
||||||
"${@}"
|
case "${file}" in
|
||||||
|
*.tar.gz)
|
||||||
prefix="Name: "
|
short="${file%.*}"
|
||||||
for wheel in "${sub}/"*; do
|
short="${short%.*}"
|
||||||
rm --force --recursive "${tmp}"
|
;;
|
||||||
echo
|
*.whl)
|
||||||
echo "${wheel}"
|
short="${file%.*}"
|
||||||
file="$(basename "${wheel}")"
|
;;
|
||||||
case "${file}" in
|
esac
|
||||||
*.tar.gz)
|
file_name="$(echo "${short}" | cut -d "-" -f 1)"
|
||||||
short="${file%.*}"
|
file_version="$(echo "${short}" | cut -d "-" -f 2)"
|
||||||
short="${short%.*}"
|
case "${file}" in
|
||||||
;;
|
*.tar.gz)
|
||||||
*.whl)
|
meta_data="${file_name}-${file_version}/${file_name}.egg-info/PKG-INFO"
|
||||||
short="${file%.*}"
|
tar xf "${wheel}" -C "${tmp}" "${meta_data}"
|
||||||
;;
|
;;
|
||||||
esac
|
*.whl)
|
||||||
file_name="$(echo "${short}" | cut -d "-" -f 1)"
|
meta_data="${file_name}-${file_version}.dist-info/METADATA"
|
||||||
file_version="$(echo "${short}" | cut -d "-" -f 2)"
|
unzip "${wheel}" "${meta_data}" -d "${tmp}"
|
||||||
case "${file}" in
|
;;
|
||||||
*.tar.gz)
|
esac
|
||||||
meta_data="${file_name}-${file_version}/${file_name}.egg-info/PKG-INFO"
|
name="$(grep "${prefix}" "${tmp}/${meta_data}" | sed "s|${prefix}||")"
|
||||||
tar xf "${wheel}" -C "${tmp}" "${meta_data}"
|
echo "${name}"
|
||||||
;;
|
name="$(echo "${name}" | tr "[:upper:]" "[:lower:]")"
|
||||||
*.whl)
|
name="$(echo "${name}" | tr "." "-")"
|
||||||
meta_data="${file_name}-${file_version}.dist-info/METADATA"
|
name="$(echo "${name}" | tr "_" "-")"
|
||||||
unzip "${wheel}" "${meta_data}" -d "${tmp}"
|
name="$(echo "${name}" | tr -d "\r")"
|
||||||
;;
|
echo "${name}"
|
||||||
esac
|
sub="${root}/simple/${name}"
|
||||||
name="$(grep "${prefix}" "${tmp}/${meta_data}" | sed "s|${prefix}||")"
|
mkdir --parents "${sub}"
|
||||||
echo "${name}"
|
mv -i "${root}/${file_name}-"* "${sub}/"
|
||||||
name="$(echo "${name}" | tr "[:upper:]" "[:lower:]")"
|
|
||||||
name="$(echo "${name}" | tr "." "-")"
|
|
||||||
name="$(echo "${name}" | tr "_" "-")"
|
|
||||||
name="$(echo "${name}" | tr -d "\r")"
|
|
||||||
echo "${name}"
|
|
||||||
simple="${sub}/simple/${name}"
|
|
||||||
mkdir --parents "${simple}"
|
|
||||||
mv -i "${sub}/${file_name}-"* "${simple}/"
|
|
||||||
done
|
|
||||||
|
|
||||||
export PATH="${OLD_PATH}"
|
|
||||||
unset OLD_PATH VIRTUAL_ENV
|
|
||||||
done
|
done
|
||||||
|
|
||||||
rm --force --recursive "${tmp}"
|
rm --force --recursive "${tmp}"
|
||||||
|
|
Loading…
Reference in a new issue