Skip to content

Commit

Permalink
V1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Baekalfen authored Apr 19, 2020
1 parent 9eb9385 commit c1d9d74
Show file tree
Hide file tree
Showing 170 changed files with 13,127 additions and 8,496 deletions.
48 changes: 48 additions & 0 deletions .deploy.sh
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
27 changes: 0 additions & 27 deletions .flake8

This file was deleted.

51 changes: 1 addition & 50 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,32 +27,7 @@ var/
.installed.cfg
*.egg

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*,cover

# Translations
*.mo
*.pot

# Django stuff:
*.log

# Sphinx documentation
docs/_build/
Expand All @@ -65,16 +40,6 @@ Report/*.pdf
Report/*.aux
Report/*.log

profile0
profile1
profile2
profile3

# Avoid uploading output of CoreDump
*.dump
*.dump.bmp
dump*.bmp

# Don't want to see any ROMs being uploaded
# This project is not for pirating games!
*.gb
Expand All @@ -98,15 +63,6 @@ tmp.state

/recordings

# Files from venv and dependencies
/bin
/include
/lib-python
/lib_pypy
/pip-selfcheck.json
/site-packages
/share

/bin
/include
/lib-python
Expand All @@ -121,11 +77,7 @@ Projects/Projects.aux
Projects/Projects.bbl
Projects/Projects.blg
Projects/Projects.out

# Autoenv scripts
.in
.out
.env
Projects/Projects.log

bootrom/bootrom.map
bootrom/bootrom.obj
Expand All @@ -134,6 +86,5 @@ bootrom/logo.asm
bootrom/pyboy.png
bootrom/PYBOY_ROM.bin

pyboy.tar.gz
test.replay
ci_secrets.tar
17 changes: 13 additions & 4 deletions .pre-commit-config.yaml
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
16 changes: 16 additions & 0 deletions .style.yapf
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
Loading

0 comments on commit c1d9d74

Please sign in to comment.