forked from vpelletier/python-libusb1
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·21 lines (21 loc) · 1021 Bytes
/
setup.sh
File metadata and controls
executable file
·21 lines (21 loc) · 1021 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh -eu
export I_KNOW_HOW_TO_RELEASE_PYTHON_LIBUSB1=1
echo "Fetching libusb1 windows binary distribution..."
python3 setup.py --quiet update_libusb
echo "Building distributions..."
embedded_dll_path="usb1/libusb-1.0.dll"
for python_v in python2 python3; do
echo "$python_v bdist_wheel win32"
cp "build/win32/libusb-1.0.dll" "$embedded_dll_path"
"${python_v}" setup.py --quiet bdist_wheel --plat-name win32 clean --all
cp "build/win_amd64/libusb-1.0.dll" "$embedded_dll_path"
"${python_v}" setup.py --quiet bdist_wheel --plat-name win_amd64 clean --all
rm "$embedded_dll_path"
"${python_v}" setup.py --quiet bdist_wheel --plat-name any clean --all
done
python3 setup.py --quiet sdist clean --all
release_prefix="dist/libusb1-$(python3 -c 'import versioneer; print(versioneer.get_version())')"
echo "Done. Next, check their content, sign each:"
echo " for release in ${release_prefix}*; do gpg --armor --detach-sign \"\$release\"; done"
echo "and upload them:"
echo " twine upload ${release_prefix}*"