-
Notifications
You must be signed in to change notification settings - Fork 489
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
170 changed files
with
13,127 additions
and
8,496 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
if [[ "$OS" == "Windows_NT" && "$MSYS" == "" ]]; then | ||
echo "Native Windows" | ||
PY='/c/Program Files/Python37/python.exe' | ||
else | ||
echo "Unix-like" | ||
PY=python3 | ||
fi | ||
|
||
"$PY" -m pip install wheel twine | ||
"$PY" setup.py sdist bdist_wheel | ||
|
||
if [ "$MANYLINUX" ]; then | ||
"$PY" -m pip install auditwheel | ||
auditwheel repair dist/*.whl | ||
|
||
# Patching in the correct SDL2 | ||
cd wheelhouse | ||
|
||
yum -y install zip | ||
for f in *.whl; do | ||
echo "Patching $f file..." | ||
SDLNAME=$(unzip -l $f | egrep -wo "(pyboy.libs/libSDL2.*$)") | ||
mkdir -p pyboy.libs | ||
cp /usr/local/lib/libSDL2-2.0.so.0 $SDLNAME | ||
# Updating single SDL2 file in the .zip (.whl) | ||
zip $f $SDLNAME | ||
done | ||
cd .. | ||
|
||
rm -rf dist/*.whl | ||
mv wheelhouse/*.whl dist/ | ||
fi | ||
|
||
"$PY" -m twine upload --non-interactive -u '__token__' -p $PYPI_TOKEN dist/* | ||
# "$PY" -m twine upload --non-interactive --repository-url https://test.pypi.org/legacy/ -u '__token__' -p $PYPI_TOKEN_TEST dist/*.whl --verbose | ||
|
||
if [ "$PYPI_SOURCE" ]; then | ||
# Pure source. We can only upload it once. It's randomly done from the manylinux platform | ||
"$PY" -m twine upload --non-interactive -u '__token__' -p $PYPI_TOKEN dist/*.tar.gz | ||
# "$PY" -m twine upload --non-interactive --repository-url https://test.pypi.org/legacy/ -u '__token__' -p $PYPI_TOKEN_TEST dist/*.tar.gz | ||
|
||
# Initiate the Docker Hub build process | ||
curl -X POST $DOCKER_HUB_BUILD_POST | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,18 @@ | ||
exclude: opcodes.py | ||
repos: | ||
- repo: local | ||
hooks: | ||
- id: unify | ||
name: unify | ||
entry: unify --quote '"' --in-place --recursive | ||
language: system | ||
types: [python] | ||
pass_filenames: true | ||
- repo: https://github.com/pre-commit/mirrors-yapf | ||
rev: '' # Use the sha / tag you want to point at | ||
hooks: | ||
- id: yapf | ||
- repo: https://github.com/pre-commit/mirrors-isort | ||
rev: v4.3.21 | ||
hooks: | ||
- id: isort | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v2.4.0 | ||
hooks: | ||
- id: flake8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
[style] | ||
based_on_style = facebook | ||
spaces_before_comment = 1 | ||
column_limit = 120 | ||
align_closing_bracket_with_visual_indent = false | ||
dedent_closing_brackets = true | ||
coalesce_brackets = true | ||
indent_closing_brackets = false | ||
indent_dictionary_value = true | ||
join_multiple_lines = false | ||
split_penalty_after_opening_bracket = 0 | ||
split_penalty_before_if_expr = 30 | ||
split_penalty_for_added_line_split = 30 | ||
split_before_logical_operator = false | ||
split_before_bitwise_operator = false | ||
arithmetic_precedence_indication = true |
Oops, something went wrong.